From b1b3a6b8d241388eef6d31029e2791a8e9cfaeba Mon Sep 17 00:00:00 2001 From: rathnor Date: Tue, 8 Jun 2004 13:15:30 +0000 Subject: more nls updates --- ChangeLog | 3 +++ nls/Makefile.am | 2 +- nls/fluxbox-nls.hh | 17 +++++++++----- nls/nlsinfo | 38 ++++++++++++++++++-------------- src/MenuCreator.cc | 4 ++-- src/WorkspaceMenu.cc | 4 ++-- util/Makefile.am | 6 ++--- util/bsetroot.cc | 62 +++++++++++++++++++++++++--------------------------- 8 files changed, 72 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2dae14..0fac41c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.10: *04/06/08: + * Fix up bsetroot nls, and couple of other tweaks (Simon) + util/Makefile.am bsetroot.cc nls/Makefile.am fluxbox-nls.hh nlsinfo + MenuCreator.cc WorkspaceMenu.cc * Some man page license updates c/- Han fluxbox.1.in bsetroot.1 startfluxbox.1 *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: fluxbox-nls.hh: chmod +x nlsinfo - ./nlsinfo -H -N FBNLS $(top_srcdir)/src > fluxbox-nls.hh + ./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 @@ -// This file generated by nlsinfo -H -N FBNLS ../src, on Mon Jun 7 21:30:58 2004 +// This file generated by nlsinfo -H -N FBNLS ../src ../util, on Tue Jun 8 23:00:01 2004 #ifndef FLUXBOX_NLS_HH #define FLUXBOX_NLS_HH @@ -165,8 +165,7 @@ enum { ToolbarOnHead = 0x9, ToolbarPlacement = 0xa, ToolbarToolbar = 0xb, - ToolbarToolbarTitle = 0xc, - ToolbarWidthPercent = 0xd, + ToolbarWidthPercent = 0xc, WindowSet = 0xf, WindowUnnamed = 0x1, @@ -178,8 +177,9 @@ enum { WindowmenuLower = 0x4, WindowmenuMaximize = 0x5, WindowmenuRaise = 0x6, - WindowmenuShade = 0x7, - WindowmenuStick = 0x8, + WindowmenuSendTo = 0x7, + WindowmenuShade = 0x8, + WindowmenuStick = 0x9, WorkspaceSet = 0x11, WorkspaceDefaultNameFormat = 0x1, @@ -187,7 +187,12 @@ enum { WorkspaceNewWorkspace = 0x3, WorkspaceRemoveLast = 0x4, - mainSet = 0x12, + bsetrootSet = 0x12, + bsetrootMustSpecify = 0x1, + bsetrootNoPixmapAtoms = 0x2, + bsetrootUsage = 0x3, + + mainSet = 0x13, mainDISPLAYRequiresArg = 0x1, mainErrorBadAlloc = 0x2, 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"})) { if (scalar(@ARGV) == 0) { - print STDERR "Must give one more argument - the directory to scan\n"; - exit(1); -} elsif (scalar(@ARGV) > 1) { - print STDERR "Too many arguments, none expected after directory to scan\n"; + print STDERR "Must give at least one more argument - the directory to scan\n"; exit(1); } -my $dir = $ARGV[0]; -my $file; -if (!defined($opts{"f"}) && ! -d $dir ) { - print STDERR "$dir is not a directory, aborting\n"; - exit(2); +my @args = @ARGV; +if (!defined($opts{"f"})) { + foreach my $dir (@args) { + if (! -d $dir) { + print STDERR "$dir is not a directory, aborting\n"; + exit(2); + } + } } elsif (defined($opts{"f"})) { - $file = $dir; - undef $dir; $recurse = 0; - if (! -r $file) { - print STDERR "$file is not a readable file, aborting\n"; - exit(2); + foreach my $file (@args) { + if (! -r $file) { + print STDERR "$file is not a readable file, aborting\n"; + exit(2); + } } } @@ -150,10 +150,14 @@ if (!defined($opts{"f"}) && ! -d $dir ) { my %sets; -if (defined($dir)) { - process_dir($dir); +if (defined($opts{"f"})) { + foreach my $file (@args) { + process_file($file); + } } else { - process_file($file); + foreach my $dir (@args) { + process_dir($dir); + } } # 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuCreator.cc,v 1.7 2004/06/07 22:23:50 fluxgen Exp $ +// $Id: MenuCreator.cc,v 1.8 2004/06/08 13:15:30 rathnor Exp $ #include "MenuCreator.hh" @@ -396,7 +396,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type, } } else if (type == "sendto") { - menu.insert(label.empty()?_FBTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label.c_str(), new SendToMenu(win)); + menu.insert(label.empty()?_FBTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"):label.c_str(), new SendToMenu(win)); } else if (type == "layer") { BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber()); 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WorkspaceMenu.cc,v 1.3 2004/06/07 22:01:11 fluxgen Exp $ +// $Id: WorkspaceMenu.cc,v 1.4 2004/06/08 13:15:30 rathnor Exp $ #include "WorkspaceMenu.hh" @@ -91,7 +91,7 @@ void WorkspaceMenu::init(BScreen &screen) { removeAll(); - setLabel(_FBTEXT(Workspace, MenuTitle, "Workspace", "Title of main workspace menu")); + setLabel(_FBTEXT(Workspace, MenuTitle, "Workspaces", "Title of main workspace menu")); RefCount new_workspace(new SimpleCommand(screen, &BScreen::addWorkspace)); RefCount remove_last(new SimpleCommand(screen, &BScreen::removeLastWorkspace)); 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 bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox bin_PROGRAMS= bsetroot bsetroot_SOURCES= bsetroot.cc bsetroot.hh -bsetroot_LDADD= ../src/FbRootWindow.o ../src/I18n.o \ - ../src/FbAtoms.o ../src/FbTk/libFbTk.a +bsetroot_LDADD= ../src/FbRootWindow.o ../src/FbAtoms.o \ + ../src/FbTk/libFbTk.a MAINTAINERCLEANFILES= Makefile.in EXTRA_DIST= fbsetbg fluxbox-generate_menu.in \ @@ -33,7 +33,5 @@ fluxbox-generate_menu: fluxbox-generate_menu.in ../src/FbRootWindow.o: cd ../src && ${MAKE} FbRootWindow.o -../src/I18n.o: - cd ../src && ${MAKE} I18n.o ../src/FbAtoms.o: 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 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// $Id: bsetroot.cc,v 1.20 2003/08/12 01:34:13 fluxgen Exp $ +// $Id: bsetroot.cc,v 1.21 2004/06/08 13:15:30 rathnor Exp $ #include "bsetroot.hh" -#include "../src/I18n.hh" +#include "../src/FbTk/I18n.hh" #include "../src/FbTk/ImageControl.hh" #include "../src/FbRootWindow.hh" @@ -106,12 +106,11 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name) } if ((mod + sol + grd) != true) { - fprintf(stderr, - I18n::instance()-> - getMessage( - FBNLS::bsetrootSet, FBNLS::bsetrootMustSpecify, - "%s: error: must specify on of: -solid, -mod, -gradient\n"), - m_app_name); + _FB_USES_NLS; + cerr<getMessage( - FBNLS::bsetrootSet, FBNLS::bsetrootUsage, - "%s 2.2 : (c) 2003 Fluxbox Development Team\n" - "%s 2.1 : (c) 2002 Claes Nasten\n" - "%s 2.0 : (c) 1997-2000 Brad Hughes\n\n" - " -display display connection\n" - " -mod modula pattern\n" - " -foreground, -fg modula foreground color\n" - " -background, -bg modula background color\n\n" - " -gradient gradient texture\n" - " -from gradient start color\n" - " -to gradient end color\n\n" - " -solid solid color\n\n" - " -help print this help text and exit\n"), - m_app_name, m_app_name); - + _FB_USES_NLS; + cerr< display connection\n" + " -mod modula pattern\n" + " -foreground, -fg modula foreground color\n" + " -background, -bg modula background color\n\n" + " -gradient gradient texture\n" + " -from gradient start color\n" + " -to gradient end color\n\n" + " -solid solid color\n\n" + " -help print this help text and exit\n", + "bsetroot usage options")<= argc) { - fprintf(stderr, - I18n::instance()->getMessage( - FBNLS::mainSet, FBNLS::mainDISPLAYRequiresArg, - "error: '-display' requires an argument\n")); - + _FB_USES_NLS; + cerr<<_FBTEXT(main, DISPLAYRequiresArg, + "error: '-display' requires an argument", + "option requires an argument")<