all repos — fluxbox @ b1b3a6b8d241388eef6d31029e2791a8e9cfaeba

custom fork of the fluxbox windowmanager

more nls updates
rathnor rathnor
commit

b1b3a6b8d241388eef6d31029e2791a8e9cfaeba

parent

b659c2583c5a8825da34b94977fab213ab7946d4

M ChangeLogChangeLog

@@ -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:
M nls/Makefile.amnls/Makefile.am

@@ -18,4 +18,4 @@ rm -f *\~

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
M nls/fluxbox-nls.hhnls/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 @@ ToolbarLayer = 0x8,

ToolbarOnHead = 0x9, ToolbarPlacement = 0xa, ToolbarToolbar = 0xb, - ToolbarToolbarTitle = 0xc, - ToolbarWidthPercent = 0xd, + ToolbarWidthPercent = 0xc, WindowSet = 0xf, WindowUnnamed = 0x1,

@@ -178,8 +177,9 @@ WindowmenuLayer = 0x3,

WindowmenuLower = 0x4, WindowmenuMaximize = 0x5, WindowmenuRaise = 0x6, - WindowmenuShade = 0x7, - WindowmenuStick = 0x8, + WindowmenuSendTo = 0x7, + WindowmenuShade = 0x8, + WindowmenuStick = 0x9, WorkspaceSet = 0x11, WorkspaceDefaultNameFormat = 0x1,

@@ -187,7 +187,12 @@ WorkspaceMenuTitle = 0x2,

WorkspaceNewWorkspace = 0x3, WorkspaceRemoveLast = 0x4, - mainSet = 0x12, + bsetrootSet = 0x12, + bsetrootMustSpecify = 0x1, + bsetrootNoPixmapAtoms = 0x2, + bsetrootUsage = 0x3, + + mainSet = 0x13, mainDISPLAYRequiresArg = 0x1, mainErrorBadAlloc = 0x2, mainErrorBadCast = 0x3,
M nls/nlsinfonls/nlsinfo

@@ -120,27 +120,27 @@ }

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 @@ # Actually do stuff! (finally...)

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
M src/MenuCreator.ccsrc/MenuCreator.cc

@@ -20,7 +20,7 @@ // 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 // 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 @@ menu.insert(it->first, it->second);

} } 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)
M src/WorkspaceMenu.ccsrc/WorkspaceMenu.cc

@@ -19,7 +19,7 @@ // 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 // 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 @@ _FB_USES_NLS;

removeAll(); - setLabel(_FBTEXT(Workspace, MenuTitle, "Workspace", "Title of main workspace menu")); + setLabel(_FBTEXT(Workspace, MenuTitle, "Workspaces", "Title of main workspace menu")); RefCount<Command> new_workspace(new SimpleCommand<BScreen, int>(screen, &BScreen::addWorkspace)); RefCount<Command> remove_last(new SimpleCommand<BScreen, int>(screen, &BScreen::removeLastWorkspace)); insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"),
M util/Makefile.amutil/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 @@ -chmod 755 fluxbox-generate_menu

../src/FbRootWindow.o: cd ../src && ${MAKE} FbRootWindow.o -../src/I18n.o: - cd ../src && ${MAKE} I18n.o ../src/FbAtoms.o: cd ../src && ${MAKE} FbAtoms.o
M util/bsetroot.ccutil/bsetroot.cc

@@ -18,11 +18,11 @@ // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

// 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 @@ usage();

} 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<<m_app_name<< + _FBTEXT(bsetroot, MustSpecify, + "Error: must specify one of: -solid, -mod, -gradient\n", + "user didn't give one of the required options")<<endl; usage(2); }

@@ -187,7 +186,8 @@ atom_root = XInternAtom(display(), "_XROOTPMAP_ID", false);

atom_eroot = XInternAtom(display(), "ESETROOT_PMAP_ID", false); if (atom_root == None || atom_eroot == None) { - cerr<<"couldn't create pixmap atoms, giving up!"<<endl; + _FB_USES_NLS; + cerr<<_FBTEXT(bsetroot, NoPixmapAtoms, "Couldn't create pixmap atoms, giving up!", "Couldn't create atoms to point at root pixmap")<<endl; exit(1); }

@@ -390,23 +390,21 @@ /**

Shows information about usage */ void bsetroot::usage(int exit_code) { - fprintf(stderr, - I18n::instance()->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 <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"), - m_app_name, m_app_name); - + _FB_USES_NLS; + cerr<<m_app_name<<" 2.2 : (c) 2003 Fluxbox Development Team"<<endl; + cerr<<m_app_name<<" 2.1 : (c) 2002 Claes Nasten"<<endl; + cerr<<m_app_name<<" 2.0 : (c) 1997-2000 Brad Hughes\n"<<endl; + cerr<<_FBTEXT(bsetroot, Usage, + " -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", + "bsetroot usage options")<<endl; exit(exit_code); }

@@ -415,18 +413,18 @@ int main(int argc, char **argv) {

char *display_name = (char *) 0; int i = 1; - NLSInit("fluxbox.cat"); + FbTk::NLSInit("fluxbox.cat"); for (; i < argc; i++) { if (! strcmp(argv[i], "-display")) { // check for -display option if ((++i) >= 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")<<endl; + ::exit(1); }