more nls updates
This commit is contained in:
parent
b659c2583c
commit
b1b3a6b8d2
8 changed files with 72 additions and 64 deletions
|
@ -1,6 +1,9 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 0.9.10:
|
Changes for 0.9.10:
|
||||||
*04/06/08:
|
*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
|
* Some man page license updates c/- Han
|
||||||
fluxbox.1.in bsetroot.1 startfluxbox.1
|
fluxbox.1.in bsetroot.1 startfluxbox.1
|
||||||
*04/06/07:
|
*04/06/07:
|
||||||
|
|
|
@ -18,4 +18,4 @@ distclean-local:
|
||||||
|
|
||||||
fluxbox-nls.hh:
|
fluxbox-nls.hh:
|
||||||
chmod +x nlsinfo
|
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
|
||||||
|
|
|
@ -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
|
#ifndef FLUXBOX_NLS_HH
|
||||||
#define FLUXBOX_NLS_HH
|
#define FLUXBOX_NLS_HH
|
||||||
|
@ -165,8 +165,7 @@ enum {
|
||||||
ToolbarOnHead = 0x9,
|
ToolbarOnHead = 0x9,
|
||||||
ToolbarPlacement = 0xa,
|
ToolbarPlacement = 0xa,
|
||||||
ToolbarToolbar = 0xb,
|
ToolbarToolbar = 0xb,
|
||||||
ToolbarToolbarTitle = 0xc,
|
ToolbarWidthPercent = 0xc,
|
||||||
ToolbarWidthPercent = 0xd,
|
|
||||||
|
|
||||||
WindowSet = 0xf,
|
WindowSet = 0xf,
|
||||||
WindowUnnamed = 0x1,
|
WindowUnnamed = 0x1,
|
||||||
|
@ -178,8 +177,9 @@ enum {
|
||||||
WindowmenuLower = 0x4,
|
WindowmenuLower = 0x4,
|
||||||
WindowmenuMaximize = 0x5,
|
WindowmenuMaximize = 0x5,
|
||||||
WindowmenuRaise = 0x6,
|
WindowmenuRaise = 0x6,
|
||||||
WindowmenuShade = 0x7,
|
WindowmenuSendTo = 0x7,
|
||||||
WindowmenuStick = 0x8,
|
WindowmenuShade = 0x8,
|
||||||
|
WindowmenuStick = 0x9,
|
||||||
|
|
||||||
WorkspaceSet = 0x11,
|
WorkspaceSet = 0x11,
|
||||||
WorkspaceDefaultNameFormat = 0x1,
|
WorkspaceDefaultNameFormat = 0x1,
|
||||||
|
@ -187,7 +187,12 @@ enum {
|
||||||
WorkspaceNewWorkspace = 0x3,
|
WorkspaceNewWorkspace = 0x3,
|
||||||
WorkspaceRemoveLast = 0x4,
|
WorkspaceRemoveLast = 0x4,
|
||||||
|
|
||||||
mainSet = 0x12,
|
bsetrootSet = 0x12,
|
||||||
|
bsetrootMustSpecify = 0x1,
|
||||||
|
bsetrootNoPixmapAtoms = 0x2,
|
||||||
|
bsetrootUsage = 0x3,
|
||||||
|
|
||||||
|
mainSet = 0x13,
|
||||||
mainDISPLAYRequiresArg = 0x1,
|
mainDISPLAYRequiresArg = 0x1,
|
||||||
mainErrorBadAlloc = 0x2,
|
mainErrorBadAlloc = 0x2,
|
||||||
mainErrorBadCast = 0x3,
|
mainErrorBadCast = 0x3,
|
||||||
|
|
38
nls/nlsinfo
38
nls/nlsinfo
|
@ -120,27 +120,27 @@ if (defined($opts{"r"})) {
|
||||||
|
|
||||||
|
|
||||||
if (scalar(@ARGV) == 0) {
|
if (scalar(@ARGV) == 0) {
|
||||||
print STDERR "Must give one more argument - the directory to scan\n";
|
print STDERR "Must give at least 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";
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my $dir = $ARGV[0];
|
my @args = @ARGV;
|
||||||
my $file;
|
if (!defined($opts{"f"})) {
|
||||||
if (!defined($opts{"f"}) && ! -d $dir ) {
|
foreach my $dir (@args) {
|
||||||
print STDERR "$dir is not a directory, aborting\n";
|
if (! -d $dir) {
|
||||||
exit(2);
|
print STDERR "$dir is not a directory, aborting\n";
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
} elsif (defined($opts{"f"})) {
|
} elsif (defined($opts{"f"})) {
|
||||||
$file = $dir;
|
|
||||||
undef $dir;
|
|
||||||
$recurse = 0;
|
$recurse = 0;
|
||||||
|
|
||||||
if (! -r $file) {
|
foreach my $file (@args) {
|
||||||
print STDERR "$file is not a readable file, aborting\n";
|
if (! -r $file) {
|
||||||
exit(2);
|
print STDERR "$file is not a readable file, aborting\n";
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,10 +150,14 @@ if (!defined($opts{"f"}) && ! -d $dir ) {
|
||||||
|
|
||||||
my %sets;
|
my %sets;
|
||||||
|
|
||||||
if (defined($dir)) {
|
if (defined($opts{"f"})) {
|
||||||
process_dir($dir);
|
foreach my $file (@args) {
|
||||||
|
process_file($file);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
process_file($file);
|
foreach my $dir (@args) {
|
||||||
|
process_dir($dir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now we have the data, we need to print it out
|
# Now we have the data, we need to print it out
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "MenuCreator.hh"
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type == "sendto") {
|
} 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") {
|
} else if (type == "layer") {
|
||||||
BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
|
BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
|
||||||
if (screen == 0)
|
if (screen == 0)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "WorkspaceMenu.hh"
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ void WorkspaceMenu::init(BScreen &screen) {
|
||||||
|
|
||||||
removeAll();
|
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> new_workspace(new SimpleCommand<BScreen, int>(screen, &BScreen::addWorkspace));
|
||||||
RefCount<Command> remove_last(new SimpleCommand<BScreen, int>(screen, &BScreen::removeLastWorkspace));
|
RefCount<Command> remove_last(new SimpleCommand<BScreen, int>(screen, &BScreen::removeLastWorkspace));
|
||||||
insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"),
|
insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"),
|
||||||
|
|
|
@ -4,8 +4,8 @@ INCLUDES= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk
|
||||||
bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox
|
bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox
|
||||||
bin_PROGRAMS= bsetroot
|
bin_PROGRAMS= bsetroot
|
||||||
bsetroot_SOURCES= bsetroot.cc bsetroot.hh
|
bsetroot_SOURCES= bsetroot.cc bsetroot.hh
|
||||||
bsetroot_LDADD= ../src/FbRootWindow.o ../src/I18n.o \
|
bsetroot_LDADD= ../src/FbRootWindow.o ../src/FbAtoms.o \
|
||||||
../src/FbAtoms.o ../src/FbTk/libFbTk.a
|
../src/FbTk/libFbTk.a
|
||||||
|
|
||||||
MAINTAINERCLEANFILES= Makefile.in
|
MAINTAINERCLEANFILES= Makefile.in
|
||||||
EXTRA_DIST= fbsetbg fluxbox-generate_menu.in \
|
EXTRA_DIST= fbsetbg fluxbox-generate_menu.in \
|
||||||
|
@ -33,7 +33,5 @@ fluxbox-generate_menu: fluxbox-generate_menu.in
|
||||||
|
|
||||||
../src/FbRootWindow.o:
|
../src/FbRootWindow.o:
|
||||||
cd ../src && ${MAKE} FbRootWindow.o
|
cd ../src && ${MAKE} FbRootWindow.o
|
||||||
../src/I18n.o:
|
|
||||||
cd ../src && ${MAKE} I18n.o
|
|
||||||
../src/FbAtoms.o:
|
../src/FbAtoms.o:
|
||||||
cd ../src && ${MAKE} FbAtoms.o
|
cd ../src && ${MAKE} FbAtoms.o
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
// 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
|
// 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 "bsetroot.hh"
|
||||||
|
|
||||||
#include "../src/I18n.hh"
|
#include "../src/FbTk/I18n.hh"
|
||||||
#include "../src/FbTk/ImageControl.hh"
|
#include "../src/FbTk/ImageControl.hh"
|
||||||
#include "../src/FbRootWindow.hh"
|
#include "../src/FbRootWindow.hh"
|
||||||
|
|
||||||
|
@ -106,12 +106,11 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mod + sol + grd) != true) {
|
if ((mod + sol + grd) != true) {
|
||||||
fprintf(stderr,
|
_FB_USES_NLS;
|
||||||
I18n::instance()->
|
cerr<<m_app_name<<
|
||||||
getMessage(
|
_FBTEXT(bsetroot, MustSpecify,
|
||||||
FBNLS::bsetrootSet, FBNLS::bsetrootMustSpecify,
|
"Error: must specify one of: -solid, -mod, -gradient\n",
|
||||||
"%s: error: must specify on of: -solid, -mod, -gradient\n"),
|
"user didn't give one of the required options")<<endl;
|
||||||
m_app_name);
|
|
||||||
|
|
||||||
usage(2);
|
usage(2);
|
||||||
}
|
}
|
||||||
|
@ -187,7 +186,8 @@ void bsetroot::setRootAtoms(Pixmap pixmap, int screen) {
|
||||||
atom_eroot = XInternAtom(display(), "ESETROOT_PMAP_ID", false);
|
atom_eroot = XInternAtom(display(), "ESETROOT_PMAP_ID", false);
|
||||||
|
|
||||||
if (atom_root == None || atom_eroot == None) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,23 +390,21 @@ void bsetroot::gradient() {
|
||||||
Shows information about usage
|
Shows information about usage
|
||||||
*/
|
*/
|
||||||
void bsetroot::usage(int exit_code) {
|
void bsetroot::usage(int exit_code) {
|
||||||
fprintf(stderr,
|
_FB_USES_NLS;
|
||||||
I18n::instance()->getMessage(
|
cerr<<m_app_name<<" 2.2 : (c) 2003 Fluxbox Development Team"<<endl;
|
||||||
FBNLS::bsetrootSet, FBNLS::bsetrootUsage,
|
cerr<<m_app_name<<" 2.1 : (c) 2002 Claes Nasten"<<endl;
|
||||||
"%s 2.2 : (c) 2003 Fluxbox Development Team\n"
|
cerr<<m_app_name<<" 2.0 : (c) 1997-2000 Brad Hughes\n"<<endl;
|
||||||
"%s 2.1 : (c) 2002 Claes Nasten\n"
|
cerr<<_FBTEXT(bsetroot, Usage,
|
||||||
"%s 2.0 : (c) 1997-2000 Brad Hughes\n\n"
|
" -display <string> display connection\n"
|
||||||
" -display <string> display connection\n"
|
" -mod <x> <y> modula pattern\n"
|
||||||
" -mod <x> <y> modula pattern\n"
|
" -foreground, -fg <color> modula foreground color\n"
|
||||||
" -foreground, -fg <color> modula foreground color\n"
|
" -background, -bg <color> modula background color\n\n"
|
||||||
" -background, -bg <color> modula background color\n\n"
|
" -gradient <texture> gradient texture\n"
|
||||||
" -gradient <texture> gradient texture\n"
|
" -from <color> gradient start color\n"
|
||||||
" -from <color> gradient start color\n"
|
" -to <color> gradient end color\n\n"
|
||||||
" -to <color> gradient end color\n\n"
|
" -solid <color> solid color\n\n"
|
||||||
" -solid <color> solid color\n\n"
|
" -help print this help text and exit\n",
|
||||||
" -help print this help text and exit\n"),
|
"bsetroot usage options")<<endl;
|
||||||
m_app_name, m_app_name);
|
|
||||||
|
|
||||||
exit(exit_code);
|
exit(exit_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,18 +413,18 @@ int main(int argc, char **argv) {
|
||||||
char *display_name = (char *) 0;
|
char *display_name = (char *) 0;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
NLSInit("fluxbox.cat");
|
FbTk::NLSInit("fluxbox.cat");
|
||||||
|
|
||||||
for (; i < argc; i++) {
|
for (; i < argc; i++) {
|
||||||
if (! strcmp(argv[i], "-display")) {
|
if (! strcmp(argv[i], "-display")) {
|
||||||
// check for -display option
|
// check for -display option
|
||||||
|
|
||||||
if ((++i) >= argc) {
|
if ((++i) >= argc) {
|
||||||
fprintf(stderr,
|
_FB_USES_NLS;
|
||||||
I18n::instance()->getMessage(
|
cerr<<_FBTEXT(main, DISPLAYRequiresArg,
|
||||||
FBNLS::mainSet, FBNLS::mainDISPLAYRequiresArg,
|
"error: '-display' requires an argument",
|
||||||
"error: '-display' requires an argument\n"));
|
"option requires an argument")<<endl;
|
||||||
|
|
||||||
::exit(1);
|
::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue