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 | |
parent | b659c2583c5a8825da34b94977fab213ab7946d4 (diff) | |
download | fluxbox_lack-b1b3a6b8d241388eef6d31029e2791a8e9cfaeba.zip fluxbox_lack-b1b3a6b8d241388eef6d31029e2791a8e9cfaeba.tar.bz2 |
more nls updates
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | nls/Makefile.am | 2 | ||||
-rw-r--r-- | nls/fluxbox-nls.hh | 17 | ||||
-rw-r--r-- | nls/nlsinfo | 38 | ||||
-rw-r--r-- | src/MenuCreator.cc | 4 | ||||
-rw-r--r-- | src/WorkspaceMenu.cc | 4 | ||||
-rw-r--r-- | util/Makefile.am | 6 | ||||
-rw-r--r-- | util/bsetroot.cc | 62 |
8 files changed, 72 insertions, 64 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.10: | 2 | Changes for 0.9.10: |
3 | *04/06/08: | 3 | *04/06/08: |
4 | * Fix up bsetroot nls, and couple of other tweaks (Simon) | ||
5 | util/Makefile.am bsetroot.cc nls/Makefile.am fluxbox-nls.hh nlsinfo | ||
6 | MenuCreator.cc WorkspaceMenu.cc | ||
4 | * Some man page license updates c/- Han | 7 | * Some man page license updates c/- Han |
5 | fluxbox.1.in bsetroot.1 startfluxbox.1 | 8 | fluxbox.1.in bsetroot.1 startfluxbox.1 |
6 | *04/06/07: | 9 | *04/06/07: |
diff --git a/nls/Makefile.am b/nls/Makefile.am index 7dbdc15..7b47ac5 100644 --- a/nls/Makefile.am +++ b/nls/Makefile.am | |||
@@ -18,4 +18,4 @@ distclean-local: | |||
18 | 18 | ||
19 | fluxbox-nls.hh: | 19 | fluxbox-nls.hh: |
20 | chmod +x nlsinfo | 20 | chmod +x nlsinfo |
21 | ./nlsinfo -H -N FBNLS $(top_srcdir)/src > fluxbox-nls.hh | 21 | ./nlsinfo -H -N FBNLS $(top_srcdir)/src $(top_srcdir)/util > fluxbox-nls.hh |
diff --git a/nls/fluxbox-nls.hh b/nls/fluxbox-nls.hh index 40e3001..9cac48f 100644 --- a/nls/fluxbox-nls.hh +++ b/nls/fluxbox-nls.hh | |||
@@ -1,4 +1,4 @@ | |||
1 | // This file generated by nlsinfo -H -N FBNLS ../src, on Mon Jun 7 21:30:58 2004 | 1 | // This file generated by nlsinfo -H -N FBNLS ../src ../util, on Tue Jun 8 23:00:01 2004 |
2 | 2 | ||
3 | #ifndef FLUXBOX_NLS_HH | 3 | #ifndef FLUXBOX_NLS_HH |
4 | #define FLUXBOX_NLS_HH | 4 | #define FLUXBOX_NLS_HH |
@@ -165,8 +165,7 @@ enum { | |||
165 | ToolbarOnHead = 0x9, | 165 | ToolbarOnHead = 0x9, |
166 | ToolbarPlacement = 0xa, | 166 | ToolbarPlacement = 0xa, |
167 | ToolbarToolbar = 0xb, | 167 | ToolbarToolbar = 0xb, |
168 | ToolbarToolbarTitle = 0xc, | 168 | ToolbarWidthPercent = 0xc, |
169 | ToolbarWidthPercent = 0xd, | ||
170 | 169 | ||
171 | WindowSet = 0xf, | 170 | WindowSet = 0xf, |
172 | WindowUnnamed = 0x1, | 171 | WindowUnnamed = 0x1, |
@@ -178,8 +177,9 @@ enum { | |||
178 | WindowmenuLower = 0x4, | 177 | WindowmenuLower = 0x4, |
179 | WindowmenuMaximize = 0x5, | 178 | WindowmenuMaximize = 0x5, |
180 | WindowmenuRaise = 0x6, | 179 | WindowmenuRaise = 0x6, |
181 | WindowmenuShade = 0x7, | 180 | WindowmenuSendTo = 0x7, |
182 | WindowmenuStick = 0x8, | 181 | WindowmenuShade = 0x8, |
182 | WindowmenuStick = 0x9, | ||
183 | 183 | ||
184 | WorkspaceSet = 0x11, | 184 | WorkspaceSet = 0x11, |
185 | WorkspaceDefaultNameFormat = 0x1, | 185 | WorkspaceDefaultNameFormat = 0x1, |
@@ -187,7 +187,12 @@ enum { | |||
187 | WorkspaceNewWorkspace = 0x3, | 187 | WorkspaceNewWorkspace = 0x3, |
188 | WorkspaceRemoveLast = 0x4, | 188 | WorkspaceRemoveLast = 0x4, |
189 | 189 | ||
190 | mainSet = 0x12, | 190 | bsetrootSet = 0x12, |
191 | bsetrootMustSpecify = 0x1, | ||
192 | bsetrootNoPixmapAtoms = 0x2, | ||
193 | bsetrootUsage = 0x3, | ||
194 | |||
195 | mainSet = 0x13, | ||
191 | mainDISPLAYRequiresArg = 0x1, | 196 | mainDISPLAYRequiresArg = 0x1, |
192 | mainErrorBadAlloc = 0x2, | 197 | mainErrorBadAlloc = 0x2, |
193 | mainErrorBadCast = 0x3, | 198 | mainErrorBadCast = 0x3, |
diff --git a/nls/nlsinfo b/nls/nlsinfo index c7e5772..2a3eec7 100644 --- a/nls/nlsinfo +++ b/nls/nlsinfo | |||
@@ -120,27 +120,27 @@ if (defined($opts{"r"})) { | |||
120 | 120 | ||
121 | 121 | ||
122 | if (scalar(@ARGV) == 0) { | 122 | if (scalar(@ARGV) == 0) { |
123 | print STDERR "Must give one more argument - the directory to scan\n"; | 123 | print STDERR "Must give at least one more argument - the directory to scan\n"; |
124 | exit(1); | ||
125 | } elsif (scalar(@ARGV) > 1) { | ||
126 | print STDERR "Too many arguments, none expected after directory to scan\n"; | ||
127 | exit(1); | 124 | exit(1); |
128 | } | 125 | } |
129 | 126 | ||
130 | 127 | ||
131 | my $dir = $ARGV[0]; | 128 | my @args = @ARGV; |
132 | my $file; | 129 | if (!defined($opts{"f"})) { |
133 | if (!defined($opts{"f"}) && ! -d $dir ) { | 130 | foreach my $dir (@args) { |
134 | print STDERR "$dir is not a directory, aborting\n"; | 131 | if (! -d $dir) { |
135 | exit(2); | 132 | print STDERR "$dir is not a directory, aborting\n"; |
133 | exit(2); | ||
134 | } | ||
135 | } | ||
136 | } elsif (defined($opts{"f"})) { | 136 | } elsif (defined($opts{"f"})) { |
137 | $file = $dir; | ||
138 | undef $dir; | ||
139 | $recurse = 0; | 137 | $recurse = 0; |
140 | 138 | ||
141 | if (! -r $file) { | 139 | foreach my $file (@args) { |
142 | print STDERR "$file is not a readable file, aborting\n"; | 140 | if (! -r $file) { |
143 | exit(2); | 141 | print STDERR "$file is not a readable file, aborting\n"; |
142 | exit(2); | ||
143 | } | ||
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
@@ -150,10 +150,14 @@ if (!defined($opts{"f"}) && ! -d $dir ) { | |||
150 | 150 | ||
151 | my %sets; | 151 | my %sets; |
152 | 152 | ||
153 | if (defined($dir)) { | 153 | if (defined($opts{"f"})) { |
154 | process_dir($dir); | 154 | foreach my $file (@args) { |
155 | process_file($file); | ||
156 | } | ||
155 | } else { | 157 | } else { |
156 | process_file($file); | 158 | foreach my $dir (@args) { |
159 | process_dir($dir); | ||
160 | } | ||
157 | } | 161 | } |
158 | 162 | ||
159 | # Now we have the data, we need to print it out | 163 | # Now we have the data, we need to print it out |
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 6bf9c29..a2bdb5c 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: MenuCreator.cc,v 1.7 2004/06/07 22:23:50 fluxgen Exp $ | 23 | // $Id: MenuCreator.cc,v 1.8 2004/06/08 13:15:30 rathnor Exp $ |
24 | 24 | ||
25 | #include "MenuCreator.hh" | 25 | #include "MenuCreator.hh" |
26 | 26 | ||
@@ -396,7 +396,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type, | |||
396 | } | 396 | } |
397 | 397 | ||
398 | } else if (type == "sendto") { | 398 | } else if (type == "sendto") { |
399 | menu.insert(label.empty()?_FBTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label.c_str(), new SendToMenu(win)); | 399 | menu.insert(label.empty()?_FBTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"):label.c_str(), new SendToMenu(win)); |
400 | } else if (type == "layer") { | 400 | } else if (type == "layer") { |
401 | BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber()); | 401 | BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber()); |
402 | if (screen == 0) | 402 | if (screen == 0) |
diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc index 3e93e92..7e4f351 100644 --- a/src/WorkspaceMenu.cc +++ b/src/WorkspaceMenu.cc | |||
@@ -19,7 +19,7 @@ | |||
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 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: WorkspaceMenu.cc,v 1.3 2004/06/07 22:01:11 fluxgen Exp $ | 22 | // $Id: WorkspaceMenu.cc,v 1.4 2004/06/08 13:15:30 rathnor Exp $ |
23 | 23 | ||
24 | #include "WorkspaceMenu.hh" | 24 | #include "WorkspaceMenu.hh" |
25 | 25 | ||
@@ -91,7 +91,7 @@ void WorkspaceMenu::init(BScreen &screen) { | |||
91 | 91 | ||
92 | removeAll(); | 92 | removeAll(); |
93 | 93 | ||
94 | setLabel(_FBTEXT(Workspace, MenuTitle, "Workspace", "Title of main workspace menu")); | 94 | setLabel(_FBTEXT(Workspace, MenuTitle, "Workspaces", "Title of main workspace menu")); |
95 | RefCount<Command> new_workspace(new SimpleCommand<BScreen, int>(screen, &BScreen::addWorkspace)); | 95 | RefCount<Command> new_workspace(new SimpleCommand<BScreen, int>(screen, &BScreen::addWorkspace)); |
96 | RefCount<Command> remove_last(new SimpleCommand<BScreen, int>(screen, &BScreen::removeLastWorkspace)); | 96 | RefCount<Command> remove_last(new SimpleCommand<BScreen, int>(screen, &BScreen::removeLastWorkspace)); |
97 | insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"), | 97 | insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"), |
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 | ||