-// -*- mode++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
// bsetroot.cc for Blackbox - an X11 Window manager
// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org>
// Copyright (c) 1997 - 2000, 2002 Brad Hughes <bhughes at trolltech.com>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
-}
-#include <cctype>
+#ifdef HAVE_CTYPE_H
+# include <ctype.h>
+#endif // HAVE_CTYPE_H
+}
-#include "../src/i18n.hh"
-#include "../src/GCCache.hh"
-#include "../src/Texture.hh"
-#include "../src/Util.hh"
+#include "gccache.hh"
+#include "texture.hh"
+#include "util.hh"
#include "bsetroot.hh"
-
-I18n i18n;
-
bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
: BaseDisplay(argv[0], dpy_name) {
if ((mod + sol + grd) != True) {
fprintf(stderr,
- i18n(bsetrootSet, bsetrootMustSpecify,
- "%s: error: must specify one of: -solid, -mod, -gradient\n"),
+ "%s: error: must specify one of: -solid, -mod, -gradient\n",
getApplicationName());
usage(2);
std::string::const_iterator it = grad.begin(), end = grad.end();
for (; it != end; ++it)
- descr += std::tolower(*it);
+ descr += tolower(*it);
std::string::size_type pos;
while ((pos = descr.find("raised")) != std::string::npos)
void bsetroot::usage(int exit_code) {
fprintf(stderr,
- i18n(bsetrootSet, bsetrootUsage,
- "%s 2.0\n\n"
- "Copyright (c) 1997-2000, 2002 Bradley T Hughes\n"
- "Copyright (c) 2001-2002 Sean 'Shaleh' Perry\n\n"
- " -display <string> display connection\n"
- " -mod <x> <y> modula pattern\n"
- " -foreground, -fg <color> modula foreground color\n"
- " -background, -bg <color> modula background color\n\n"
- " -gradient <texture> gradient texture\n"
- " -from <color> gradient start color\n"
- " -to <color> gradient end color\n\n"
- " -solid <color> solid color\n\n"
- " -help print this help text and exit\n"),
+ "%s 2.0\n\n"
+ "Copyright (c) 1997-2000, 2002 Bradley T Hughes\n"
+ "Copyright (c) 2001-2002 Sean 'Shaleh' Perry\n\n"
+ " -display <string> use display connection\n"
+ " -mod <x> <y> modula pattern\n"
+ " -foreground, -fg <color> modula foreground color\n"
+ " -background, -bg <color> modula background color\n\n"
+ " -gradient <texture> gradient texture\n"
+ " -from <color> gradient start color\n"
+ " -to <color> gradient end color\n\n"
+ " -solid <color> solid color\n\n"
+ " -help print this help text and exit\n",
getApplicationName());
exit(exit_code);
int main(int argc, char **argv) {
char *display_name = (char *) 0;
- i18n.openCatalog("openbox.cat");
-
for (int i = 1; i < argc; i++) {
if (! strcmp(argv[i], "-display")) {
// check for -display option
if ((++i) >= argc) {
- fprintf(stderr, i18n(mainSet, mainDISPLAYRequiresArg,
- "error: '-display' requires an argument\n"));
+ fprintf(stderr, "error: '-display' requires an argument\n");
::exit(1);
}