diff options
author | rathnor <rathnor> | 2004-06-08 13:15:30 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-06-08 13:15:30 (GMT) |
commit | b1b3a6b8d241388eef6d31029e2791a8e9cfaeba (patch) | |
tree | 0203940d67dee1025c11dd997ecb825d18db0f03 /util | |
parent | b659c2583c5a8825da34b94977fab213ab7946d4 (diff) | |
download | fluxbox_paul-b1b3a6b8d241388eef6d31029e2791a8e9cfaeba.zip fluxbox_paul-b1b3a6b8d241388eef6d31029e2791a8e9cfaeba.tar.bz2 |
more nls updates
Diffstat (limited to 'util')
-rw-r--r-- | util/Makefile.am | 6 | ||||
-rw-r--r-- | util/bsetroot.cc | 62 |
2 files changed, 32 insertions, 36 deletions
diff --git a/util/Makefile.am b/util/Makefile.am index 66376f4..3e45aa6 100644 --- a/util/Makefile.am +++ b/util/Makefile.am | |||
@@ -4,8 +4,8 @@ INCLUDES= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk | |||
4 | bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox | 4 | bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox |
5 | bin_PROGRAMS= bsetroot | 5 | bin_PROGRAMS= bsetroot |
6 | bsetroot_SOURCES= bsetroot.cc bsetroot.hh | 6 | bsetroot_SOURCES= bsetroot.cc bsetroot.hh |
7 | bsetroot_LDADD= ../src/FbRootWindow.o ../src/I18n.o \ | 7 | bsetroot_LDADD= ../src/FbRootWindow.o ../src/FbAtoms.o \ |
8 | ../src/FbAtoms.o ../src/FbTk/libFbTk.a | 8 | ../src/FbTk/libFbTk.a |
9 | 9 | ||
10 | MAINTAINERCLEANFILES= Makefile.in | 10 | MAINTAINERCLEANFILES= Makefile.in |
11 | EXTRA_DIST= fbsetbg fluxbox-generate_menu.in \ | 11 | EXTRA_DIST= fbsetbg fluxbox-generate_menu.in \ |
@@ -33,7 +33,5 @@ fluxbox-generate_menu: fluxbox-generate_menu.in | |||
33 | 33 | ||
34 | ../src/FbRootWindow.o: | 34 | ../src/FbRootWindow.o: |
35 | cd ../src && ${MAKE} FbRootWindow.o | 35 | cd ../src && ${MAKE} FbRootWindow.o |
36 | ../src/I18n.o: | ||
37 | cd ../src && ${MAKE} I18n.o | ||
38 | ../src/FbAtoms.o: | 36 | ../src/FbAtoms.o: |
39 | cd ../src && ${MAKE} FbAtoms.o | 37 | cd ../src && ${MAKE} FbAtoms.o |
diff --git a/util/bsetroot.cc b/util/bsetroot.cc index 5b4f9e8..9735e05 100644 --- a/util/bsetroot.cc +++ b/util/bsetroot.cc | |||
@@ -18,11 +18,11 @@ | |||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | 20 | ||
21 | // $Id: bsetroot.cc,v 1.20 2003/08/12 01:34:13 fluxgen Exp $ | 21 | // $Id: bsetroot.cc,v 1.21 2004/06/08 13:15:30 rathnor Exp $ |
22 | 22 | ||
23 | #include "bsetroot.hh" | 23 | #include "bsetroot.hh" |
24 | 24 | ||
25 | #include "../src/I18n.hh" | 25 | #include "../src/FbTk/I18n.hh" |
26 | #include "../src/FbTk/ImageControl.hh" | 26 | #include "../src/FbTk/ImageControl.hh" |
27 | #include "../src/FbRootWindow.hh" | 27 | #include "../src/FbRootWindow.hh" |
28 | 28 | ||
@@ -106,12 +106,11 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | if ((mod + sol + grd) != true) { | 108 | if ((mod + sol + grd) != true) { |
109 | fprintf(stderr, | 109 | _FB_USES_NLS; |
110 | I18n::instance()-> | 110 | cerr<<m_app_name<< |
111 | getMessage( | 111 | _FBTEXT(bsetroot, MustSpecify, |
112 | FBNLS::bsetrootSet, FBNLS::bsetrootMustSpecify, | 112 | "Error: must specify one of: -solid, -mod, -gradient\n", |
113 | "%s: error: must specify on of: -solid, -mod, -gradient\n"), | 113 | "user didn't give one of the required options")<<endl; |
114 | m_app_name); | ||
115 | 114 | ||
116 | usage(2); | 115 | usage(2); |
117 | } | 116 | } |
@@ -187,7 +186,8 @@ void bsetroot::setRootAtoms(Pixmap pixmap, int screen) { | |||
187 | atom_eroot = XInternAtom(display(), "ESETROOT_PMAP_ID", false); | 186 | atom_eroot = XInternAtom(display(), "ESETROOT_PMAP_ID", false); |
188 | 187 | ||
189 | if (atom_root == None || atom_eroot == None) { | 188 | if (atom_root == None || atom_eroot == None) { |
190 | cerr<<"couldn't create pixmap atoms, giving up!"<<endl; | 189 | _FB_USES_NLS; |
190 | cerr<<_FBTEXT(bsetroot, NoPixmapAtoms, "Couldn't create pixmap atoms, giving up!", "Couldn't create atoms to point at root pixmap")<<endl; | ||
191 | exit(1); | 191 | exit(1); |
192 | } | 192 | } |
193 | 193 | ||
@@ -390,23 +390,21 @@ void bsetroot::gradient() { | |||
390 | Shows information about usage | 390 | Shows information about usage |
391 | */ | 391 | */ |
392 | void bsetroot::usage(int exit_code) { | 392 | void bsetroot::usage(int exit_code) { |
393 | fprintf(stderr, | 393 | _FB_USES_NLS; |
394 | I18n::instance()->getMessage( | 394 | cerr<<m_app_name<<" 2.2 : (c) 2003 Fluxbox Development Team"<<endl; |
395 | FBNLS::bsetrootSet, FBNLS::bsetrootUsage, | 395 | cerr<<m_app_name<<" 2.1 : (c) 2002 Claes Nasten"<<endl; |
396 | "%s 2.2 : (c) 2003 Fluxbox Development Team\n" | 396 | cerr<<m_app_name<<" 2.0 : (c) 1997-2000 Brad Hughes\n"<<endl; |
397 | "%s 2.1 : (c) 2002 Claes Nasten\n" | 397 | cerr<<_FBTEXT(bsetroot, Usage, |
398 | "%s 2.0 : (c) 1997-2000 Brad Hughes\n\n" | 398 | " -display <string> display connection\n" |
399 | " -display <string> display connection\n" | 399 | " -mod <x> <y> modula pattern\n" |
400 | " -mod <x> <y> modula pattern\n" | 400 | " -foreground, -fg <color> modula foreground color\n" |
401 | " -foreground, -fg <color> modula foreground color\n" | 401 | " -background, -bg <color> modula background color\n\n" |
402 | " -background, -bg <color> modula background color\n\n" | 402 | " -gradient <texture> gradient texture\n" |
403 | " -gradient <texture> gradient texture\n" | 403 | " -from <color> gradient start color\n" |
404 | " -from <color> gradient start color\n" | 404 | " -to <color> gradient end color\n\n" |
405 | " -to <color> gradient end color\n\n" | 405 | " -solid <color> solid color\n\n" |
406 | " -solid <color> solid color\n\n" | 406 | " -help print this help text and exit\n", |
407 | " -help print this help text and exit\n"), | 407 | "bsetroot usage options")<<endl; |
408 | m_app_name, m_app_name); | ||
409 | |||
410 | exit(exit_code); | 408 | exit(exit_code); |
411 | } | 409 | } |
412 | 410 | ||
@@ -415,18 +413,18 @@ int main(int argc, char **argv) { | |||
415 | char *display_name = (char *) 0; | 413 | char *display_name = (char *) 0; |
416 | int i = 1; | 414 | int i = 1; |
417 | 415 | ||
418 | NLSInit("fluxbox.cat"); | 416 | FbTk::NLSInit("fluxbox.cat"); |
419 | 417 | ||
420 | for (; i < argc; i++) { | 418 | for (; i < argc; i++) { |
421 | if (! strcmp(argv[i], "-display")) { | 419 | if (! strcmp(argv[i], "-display")) { |
422 | // check for -display option | 420 | // check for -display option |
423 | 421 | ||
424 | if ((++i) >= argc) { | 422 | if ((++i) >= argc) { |
425 | fprintf(stderr, | 423 | _FB_USES_NLS; |
426 | I18n::instance()->getMessage( | 424 | cerr<<_FBTEXT(main, DISPLAYRequiresArg, |
427 | FBNLS::mainSet, FBNLS::mainDISPLAYRequiresArg, | 425 | "error: '-display' requires an argument", |
428 | "error: '-display' requires an argument\n")); | 426 | "option requires an argument")<<endl; |
429 | 427 | ||
430 | ::exit(1); | 428 | ::exit(1); |
431 | } | 429 | } |
432 | 430 | ||