all repos — fluxbox @ 2526e4bce821eedcd4bcc13e0f27ac7b9e255350

custom fork of the fluxbox windowmanager

moved nls defines to enums in namespace FBNLS
fluxgen fluxgen
commit

2526e4bce821eedcd4bcc13e0f27ac7b9e255350

parent

bd05695cfa6d066e5e5368d857eef8c0b11987c1

M src/BaseDisplay.ccsrc/BaseDisplay.cc

@@ -22,7 +22,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: BaseDisplay.cc,v 1.11 2002/03/23 02:02:00 pekdon Exp $ +// $Id: BaseDisplay.cc,v 1.12 2002/04/04 11:28:19 fluxgen Exp $ // use GNU extensions #ifndef _GNU_SOURCE

@@ -107,11 +107,7 @@ XGetErrorText(d, e->error_code, errtxt, 128);

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayXError, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXError, "%s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n"), base_display->getApplicationName(), errtxt, e->error_code, e->request_code, e->minor_code, e->resourceid);

@@ -165,11 +161,7 @@ }

fprintf(stderr, i18n->getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplaySignalCaught, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::BaseDisplaySet, FBNLS::BaseDisplaySignalCaught, "%s: signal %d caught\n"), base_display->getApplicationName(), sig);

@@ -179,23 +171,15 @@

re_enter = 1; fprintf(stderr, i18n->getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayShuttingDown, - #else // !NLS - 0, 0, - #endif // NLS - "shutting down\n")); + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayShuttingDown, + "shutting down\n")); base_display->shutdown(); } if (sig != SIGTERM && sig != SIGINT) { fprintf(stderr, i18n->getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayAborting, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayAborting, "aborting... dumping core\n")); abort(); }

@@ -260,25 +244,17 @@ if (! (m_display = XOpenDisplay(dpy_name))) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayXConnectFail, - #else // !NLS - 0, 0, - #endif // NLS - "BaseDisplay::BaseDisplay: connection to X server failed.\n")); + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail, + "BaseDisplay::BaseDisplay: connection to X server failed.\n")); throw static_cast<int>(2); //throw error 2 } else if (fcntl(ConnectionNumber(m_display), F_SETFD, 1) == -1) { fprintf(stderr, i18n-> getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayCloseOnExecFail, - #else // !NLS - 0, 0, - #endif // NLS - "BaseDisplay::BaseDisplay: couldn't mark display connection " - "as close-on-exec\n")); + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayCloseOnExecFail, + "BaseDisplay::BaseDisplay: couldn't mark display connection " + "as close-on-exec\n")); throw static_cast<int>(2); //throw error 2 } //initiate atoms

@@ -332,11 +308,7 @@ #ifdef DEBUG

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - BaseDisplaySet, BaseDisplayBadWindowRemove, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::BaseDisplaySet, FBNLS::BaseDisplayBadWindowRemove, "BaseDisplay::eventLoop(): removing bad window " "from event queue\n")); #endif // DEBUG
M src/Basemenu.ccsrc/Basemenu.cc

@@ -22,7 +22,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: Basemenu.cc,v 1.17 2002/04/03 23:08:19 fluxgen Exp $ +// $Id: Basemenu.cc,v 1.18 2002/04/04 11:28:19 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -281,7 +281,7 @@

if (title_vis) { const char *s = (menu.label) ? menu.label : i18n->getMessage( - BasemenuSet, BasemenuBlackboxMenu, + FBNLS::BasemenuSet, FBNLS::BasemenuBlackboxMenu, "fluxbox Menu"); int l = strlen(s);

@@ -484,11 +484,7 @@ void Basemenu::redrawTitle(void) {

I18n *i18n = I18n::instance(); char *text = (char *) ((menu.label) ? menu.label : i18n->getMessage( -#ifdef NLS - BasemenuSet, BasemenuBlackboxMenu, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::BasemenuSet, FBNLS::BasemenuBlackboxMenu, "fluxbox Menu")); int dx = menu.bevel_w, len = strlen(text); unsigned int l;
M src/Configmenu.ccsrc/Configmenu.cc

@@ -22,7 +22,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: Configmenu.cc,v 1.11 2002/04/03 12:08:53 fluxgen Exp $ +// $Id: Configmenu.cc,v 1.12 2002/04/04 11:28:19 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library

@@ -48,105 +48,51 @@

I18n *i18n = I18n::instance(); setLabel(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuConfigOptions, -#else // !NLS - 0, 0, -#endif // NLS - "Config options")); + FBNLS::ConfigmenuSet, FBNLS::ConfigmenuConfigOptions, + "Config options")); setInternalMenu(); focusmenu = new Focusmenu(this); placementmenu = new Placementmenu(this); tabmenu = new Tabmenu(this); - + using namespace FBNLS; insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuFocusModel, -#else // !NLS - 0, 0, -#endif // NLS - "Focus Model"), focusmenu); + ConfigmenuSet, ConfigmenuFocusModel, + "Focus Model"), focusmenu); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuWindowPlacement, -#else //! NLS - 0, 0, -#endif // NLS - "Window Placement"), placementmenu); + ConfigmenuSet, ConfigmenuWindowPlacement, + "Window Placement"), placementmenu); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuTabPlacement, -#else // !NLS - 0, 0, -#endif // NLS - "Tab Placement"), tabmenu); + ConfigmenuSet, ConfigmenuTabPlacement, + "Tab Placement"), tabmenu); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuImageDithering, -#else // !NLS - 0, 0, -#endif // NLS - "Image Dithering"), 1); + ConfigmenuSet, ConfigmenuImageDithering, + "Image Dithering"), 1); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuOpaqueMove, -#else // !NLS - 0, 0, -#endif // NLS - "Opaque Window Moving"), 2); + ConfigmenuSet, ConfigmenuOpaqueMove, + "Opaque Window Moving"), 2); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuFullMax, -#else // !NLS - 0, 0, -#endif // NLS - "Full Maximization"), 3); + ConfigmenuSet, ConfigmenuFullMax, + "Full Maximization"), 3); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuFocusNew, -#else // !NLS - 0, 0, -#endif // NLS - "Focus New Windows"), 4); + ConfigmenuSet, ConfigmenuFocusNew, + "Focus New Windows"), 4); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuFocusLast, -#else // !NLS - 0, 0, -#endif // NLS - "Focus Last Window on Workspace"), 5); + ConfigmenuSet, ConfigmenuFocusLast, + "Focus Last Window on Workspace"), 5); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuMaxOverSlit, -#else // !NLS - 0, 0, -#endif // NLS - "Maxmize Over Slit"), 6); - - + ConfigmenuSet, ConfigmenuMaxOverSlit, + "Maxmize Over Slit"), 6); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuTabs, -#else // !NLS - 0, 0, -#endif // NLS - "Use Tabs"), CMENU_USE_TABS); - insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuIcons, -#else // !NLS - 0, 0, -#endif // NLS - "Use Icons"), CMENU_USE_ICONS); - insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuSloppyWindowGrouping, -#else // !NLS - 0, 0, -#endif // NLS - "Sloppy Window Grouping"), CMENU_SLOPPY_WIN_GROUP); + ConfigmenuSet, ConfigmenuTabs, + "Use Tabs"), CMENU_USE_TABS); + insert(i18n->getMessage( + ConfigmenuSet, ConfigmenuIcons, + "Use Icons"), CMENU_USE_ICONS); + insert(i18n->getMessage( + ConfigmenuSet, ConfigmenuSloppyWindowGrouping, + "Sloppy Window Grouping"), CMENU_SLOPPY_WIN_GROUP); update(); setItemSelected(8, screen->doMaxOverSlit());

@@ -253,52 +199,33 @@

Configmenu::Focusmenu::Focusmenu(Configmenu *cm) : Basemenu(cm->screen) { configmenu = cm; I18n *i18n = I18n::instance(); + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuFocusModel, -#else // !NLS - 0, 0, -#endif // NLS - "Focus Model")); + ConfigmenuSet, ConfigmenuFocusModel, + "Focus Model")); setInternalMenu(); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuClickToFocus, -#else // !NLS - 0, 0, -#endif // NLS - "Click To Focus"), 1); + ConfigmenuSet, ConfigmenuClickToFocus, + "Click To Focus"), 1); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuSloppyFocus, -#else // !NLS - 0, 0, -#endif // NLS - "Sloppy Focus"), 2); + ConfigmenuSet, ConfigmenuSloppyFocus, + "Sloppy Focus"), 2); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuSemiSloppyFocus, -#else // !NLS - 0, 0, -#endif // NLS - "Semi Sloppy Focus"), 3); + ConfigmenuSet, ConfigmenuSemiSloppyFocus, + "Semi Sloppy Focus"), 3); insert(i18n->getMessage( -#ifdef NLS - ConfigmenuSet, ConfigmenuAutoRaise, -#else // !NLS - 0, 0, -#endif // NLS - "Auto Raise"), 4); + ConfigmenuSet, ConfigmenuAutoRaise, + "Auto Raise"), 4); update(); setItemSelected(0, !(configmenu->screen->isSloppyFocus() || - configmenu->screen->isSemiSloppyFocus())); + configmenu->screen->isSemiSloppyFocus())); setItemSelected(1, configmenu->screen->isSloppyFocus()); setItemSelected(2, configmenu->screen->isSemiSloppyFocus()); setItemEnabled(3, (configmenu->screen->isSloppyFocus() || - configmenu->screen->isSemiSloppyFocus())); + configmenu->screen->isSemiSloppyFocus())); setItemSelected(3, configmenu->screen->doAutoRaise()); }

@@ -366,7 +293,7 @@

Configmenu::Placementmenu::Placementmenu(Configmenu *cm) : Basemenu(cm->screen) { configmenu = cm; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( ConfigmenuSet, ConfigmenuWindowPlacement, "Window Placement"));

@@ -495,6 +422,7 @@

Configmenu::Tabmenu::Tabmenu(Configmenu *cm) : Basemenu(cm->screen) { configmenu = cm; I18n *i18n = I18n::instance(); + using namespace FBNLS; setLabel(i18n->getMessage( ConfigmenuSet, ConfigmenuTabPlacement,
M src/Icon.ccsrc/Icon.cc

@@ -39,12 +39,8 @@ setInternalMenu();

screen = scrn; setLabel(I18n::instance()->getMessage( -#ifdef NLS - IconSet, IconIcons, -#else // !NLS - 0, 0, -#endif // NLS - "Icons")); + FBNLS::IconSet, FBNLS::IconIcons, + "Icons")); update(); }
M src/Image.ccsrc/Image.cc

@@ -25,7 +25,7 @@

// stupid macros needed to access some functions in version 2 of the GNU C // library -// $Id: Image.cc,v 1.6 2002/03/19 00:04:36 fluxgen Exp $ +// $Id: Image.cc,v 1.7 2002/04/04 11:28:19 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -134,11 +134,7 @@ height, control->getDepth());

if (pixmap == None) { fprintf(stderr, I18n::instance()->getMessage( -#ifdef NLS - ImageSet, ImageErrorCreatingSolidPixmap, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ImageSet, FBNLS::ImageErrorCreatingSolidPixmap, "BImage::render_solid: error creating pixmap\n")); return None; }

@@ -278,19 +274,15 @@ XImage *BImage::renderXImage(void) {

I18n *i18n = I18n::instance(); XImage *image = XCreateImage(control->getBaseDisplay()->getXDisplay(), - control->getVisual(), control->getDepth(), ZPixmap, 0, 0, - width, height, 32, 0); + control->getVisual(), control->getDepth(), ZPixmap, 0, 0, + width, height, 32, 0); if (! image) { fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageErrorCreatingXImage, -#else // !NLS - 0, 0, -#endif // NLS - "BImage::renderXImage: error creating XImage\n")); + FBNLS::ImageSet, FBNLS::ImageErrorCreatingXImage, + "BImage::renderXImage: error creating XImage\n")); return (XImage *) 0; }

@@ -565,12 +557,8 @@ default:

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageUnsupVisual, -#else // !NLS - 0, 0, -#endif // NLS - "BImage::renderXImage: unsupported visual\n")); + FBNLS::ImageSet, FBNLS::ImageUnsupVisual, + "BImage::renderXImage: unsupported visual\n")); delete [] d; XDestroyImage(image); return (XImage *) 0;

@@ -672,7 +660,7 @@ default:

fprintf(stderr, i18n-> getMessage( - ImageSet, ImageUnsupVisual, + FBNLS::ImageSet, FBNLS::ImageUnsupVisual, "BImage::renderXImage: unsupported visual\n")); delete [] d; XDestroyImage(image);

@@ -689,17 +677,13 @@ Pixmap BImage::renderPixmap(void) {

I18n *i18n = I18n::instance(); Pixmap pixmap = XCreatePixmap(control->getBaseDisplay()->getXDisplay(), - control->getDrawable(), width, height, control->getDepth()); + control->getDrawable(), width, height, control->getDepth()); if (pixmap == None) { fprintf(stderr, - i18n->getMessage( -#ifdef NLS - ImageSet, ImageErrorCreatingPixmap, -#else // !NLS - 0, 0, -#endif // NLS - "BImage::renderPixmap: error creating pixmap\n")); + i18n->getMessage( + FBNLS::ImageSet, FBNLS::ImageErrorCreatingPixmap, + "BImage::renderPixmap: error creating pixmap\n")); return None; }

@@ -1939,15 +1923,11 @@ if (colors_per_channel < 2 || ncolors > (1 << screen_depth)) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageInvalidColormapSize, -#else // !NLS - 0, 0, -#endif // NLS - "BImageControl::BImageControl: invalid colormap size %d " - "(%d/%d/%d) - reducing"), - ncolors, colors_per_channel, colors_per_channel, - colors_per_channel); + FBNLS::ImageSet, FBNLS::ImageInvalidColormapSize, + "BImageControl::BImageControl: invalid colormap size %d " + "(%d/%d/%d) - reducing"), + ncolors, colors_per_channel, colors_per_channel, + colors_per_channel); colors_per_channel = (1 << screen_depth) / 3; }

@@ -1957,13 +1937,9 @@ if (! colors) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageErrorAllocatingColormap, -#else // !NLS - 0, 0, -#endif // NLS - "BImageControl::BImageControl: error allocating " - "colormap\n")); + FBNLS::ImageSet, FBNLS::ImageErrorAllocatingColormap, + "BImageControl::BImageControl: error allocating " + "colormap\n")); throw static_cast<int>(1); //throw exit code 1 }

@@ -1996,11 +1972,7 @@ for (i = 0; i < ncolors; i++) {

if (! XAllocColor(basedisplay->getXDisplay(), colormap, &colors[i])) { fprintf(stderr, i18n->getMessage( -#ifdef NLS - ImageSet, ImageColorAllocFail, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ImageSet, FBNLS::ImageColorAllocFail, "couldn't alloc color %i %i %i\n"), colors[i].red, colors[i].green, colors[i].blue); colors[i].flags = 0;

@@ -2071,11 +2043,7 @@ if (colors_per_channel < 2 || ncolors > (1 << screen_depth)) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageInvalidColormapSize, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ImageSet, FBNLS::ImageInvalidColormapSize, "BImageControl::BImageControl: invalid colormap size %d " "(%d/%d/%d) - reducing"), ncolors, colors_per_channel, colors_per_channel,

@@ -2089,11 +2057,7 @@ if (! colors) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageErrorAllocatingColormap, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ImageSet, FBNLS::ImageErrorAllocatingColormap, "BImageControl::BImageControl: error allocating " "colormap\n")); throw static_cast<int>(1); // throw exit code 1

@@ -2118,11 +2082,7 @@ &colors[i])) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageColorAllocFail, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ImageSet, FBNLS::ImageColorAllocFail, "couldn't alloc color %i %i %i\n"), colors[i].red, colors[i].green, colors[i].blue); colors[i].flags = 0;

@@ -2178,12 +2138,8 @@ default:

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - ImageSet, ImageUnsupVisual, -#else // !NLS - 0, 0, -#endif // NLS - "BImageControl::BImageControl: unsupported visual %d\n"), + FBNLS::ImageSet, FBNLS::ImageUnsupVisual, + "BImageControl::BImageControl: unsupported visual %d\n"), getVisual()->c_class); throw static_cast<int>(1); //throw error code 1

@@ -2219,10 +2175,10 @@

if (cache.size() > 0) { fprintf(stderr, I18n::instance()-> - getMessage( - ImageSet, ImagePixmapRelease, - "BImageContol::~BImageControl: pixmap cache - " - "releasing %d pixmaps\n"), cache.size()); + getMessage( + FBNLS::ImageSet, FBNLS::ImagePixmapRelease, + "BImageContol::~BImageControl: pixmap cache - " + "releasing %d pixmaps\n"), cache.size()); CacheList::iterator it = cache.begin(); CacheList::iterator it_end = cache.end();

@@ -2294,7 +2250,7 @@ #ifdef DEBUG

fprintf(stderr, I18n::instance()-> getMessage( - ImageSet, ImagePixmapCacheLarge, + FBNLS::ImageSet, FBNLS::ImagePixmapCacheLarge, "BImageControl::renderImage: cache is large, " "forcing cleanout\n")); #endif // DEBUG
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,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: Screen.cc,v 1.41 2002/04/03 23:02:16 fluxgen Exp $ +// $Id: Screen.cc,v 1.42 2002/04/04 11:28:19 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -104,11 +104,7 @@ static int anotherWMRunning(Display *display, XErrorEvent *) {

fprintf(stderr, I18n::instance()-> getMessage( -#ifdef NLS - ScreenSet, ScreenAnotherWMRunning, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::ScreenSet, FBNLS::ScreenAnotherWMRunning, "BScreen::BScreen: an error occured while querying the X server.\n" " another window manager already running on display %s.\n"), DisplayString(display));

@@ -252,15 +248,11 @@

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenManagingScreen, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::BScreen: managing screen %d " - "using visual 0x%lx, depth %d\n"), - getScreenNumber(), XVisualIDFromVisual(getVisual()), - getDepth()); + FBNLS::ScreenSet, FBNLS::ScreenManagingScreen, + "BScreen::BScreen: managing screen %d " + "using visual 0x%lx, depth %d\n"), + getScreenNumber(), XVisualIDFromVisual(getVisual()), + getDepth()); rootmenu = 0;

@@ -311,11 +303,7 @@ (unsigned char *)netwmsupported, (sizeof netwmsupported)/sizeof netwmsupported[0]);

#endif //!NEWWMSPEC const char *s = i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenPositionLength, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::ScreenSet, FBNLS::ScreenPositionLength, "0: 0000 x 0: 0000"); int l = strlen(s);

@@ -393,11 +381,7 @@ }

workspacemenu->insert(i18n-> getMessage( - #ifdef NLS - IconSet, IconIcons, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::IconSet, FBNLS::IconIcons, "Icons"), iconmenu); workspacemenu->update();

@@ -555,12 +539,8 @@ theme->reconfigure();

I18n *i18n = I18n::instance(); const char *s = i18n->getMessage( -#ifdef NLS - ScreenSet, ScreenPositionLength, -#else // !NLS - 0, 0, -#endif // NLS - "0: 0000 x 0: 0000"); + FBNLS::ScreenSet, FBNLS::ScreenPositionLength, + "0: 0000 x 0: 0000"); int l = strlen(s); if (i18n->multibyte()) {

@@ -1251,11 +1231,7 @@ }

} else { fprintf(stderr, i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenEmptyMenuFile, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::ScreenSet, FBNLS::ScreenEmptyMenuFile, "%s: Empty menu file"), fluxbox->getMenuFilename()); }

@@ -1267,36 +1243,20 @@

if (defaultMenu) { rootmenu->setInternalMenu(); rootmenu->insert(i18n->getMessage( - #ifdef NLS - ScreenSet, Screenxterm, - #else // !NLS - 0, 0, - #endif // NLS - "xterm"), - BScreen::EXECUTE, - i18n->getMessage( - #ifdef NLS - ScreenSet, Screenxterm, - #else // !NLS - 0, 0, - #endif // NLS - "xterm")); + FBNLS::ScreenSet, FBNLS::Screenxterm, + "xterm"), + BScreen::EXECUTE, + i18n->getMessage( + FBNLS::ScreenSet, FBNLS::Screenxterm, + "xterm")); rootmenu->insert(i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenRestart, - #else // !NLS - 0, 0, - #endif // NLS - "Restart"), - BScreen::RESTART); + FBNLS::ScreenSet, FBNLS::ScreenRestart, + "Restart"), + BScreen::RESTART); rootmenu->insert(i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenExit, - #else // !NLS - 0, 0, - #endif // NLS - "Exit"), - BScreen::EXIT); + FBNLS::ScreenSet, FBNLS::ScreenExit, + "Exit"), + BScreen::EXIT); } else fluxbox->saveMenuFilename(fluxbox->getMenuFilename()); }

@@ -1339,13 +1299,9 @@ } else if (str_key == "exec") { // exec

if (!(str_label.size() && str_cmd.size())) { fprintf(stderr, i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenEXECError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [exec] error, " - "no menu label and/or command defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenEXECError, + "BScreen::parseMenuFile: [exec] error, " + "no menu label and/or command defined\n")); cerr<<"Row: "<<row<<endl; } else menu->insert(str_label.c_str(), BScreen::EXECUTE, str_cmd.c_str());

@@ -1354,13 +1310,9 @@ } else if (str_key == "exit") { // exit

if (!str_label.size()) { fprintf(stderr, i18n->getMessage( - #ifdef NLS - ScreenSet, ScreenEXITError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [exit] error, " - "no menu label defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenEXITError, + "BScreen::parseMenuFile: [exit] error, " + "no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else menu->insert(str_label.c_str(), BScreen::EXIT);

@@ -1370,13 +1322,9 @@ if (!( str_label.size() && str_cmd.size())) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenSTYLEError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [style] error, " - "no menu label and/or filename defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenSTYLEError, + "BScreen::parseMenuFile: [style] error, " + "no menu label and/or filename defined\n")); cerr<<"Row: "<<row<<endl; } else { char *style;

@@ -1393,13 +1341,9 @@ if (! str_label.size()) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenCONFIGError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenufile: [config] error, " - "no label defined")); + FBNLS::ScreenSet, FBNLS::ScreenCONFIGError, + "BScreen::parseMenufile: [config] error, " + "no label defined")); cerr<<"Row: "<<row<<endl; } else menu->insert(str_label.c_str(), configmenu);

@@ -1409,13 +1353,9 @@ if (!str_label.size()) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenINCLUDEError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [include] error, " - "no filename defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenINCLUDEError, + "BScreen::parseMenuFile: [include] error, " + "no filename defined\n")); cerr<<"Row: "<<row<<endl; } else { // start of else 'x' char *newfile;

@@ -1433,13 +1373,9 @@ (! S_ISREG(buf.st_mode))) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenINCLUDEErrorReg, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [include] error: " - "'%s' is not a regular file\n"), newfile); + FBNLS::ScreenSet, FBNLS::ScreenINCLUDEErrorReg, + "BScreen::parseMenuFile: [include] error: " + "'%s' is not a regular file\n"), newfile); cerr<<"Row: "<<row<<endl; }

@@ -1460,13 +1396,9 @@ if (!str_label.size()) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenSUBMENUError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [submenu] error, " - "no menu label defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenSUBMENUError, + "BScreen::parseMenuFile: [submenu] error, " + "no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else { Rootmenu *submenu = new Rootmenu(this);

@@ -1487,13 +1419,9 @@ if (!str_label.size()) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenRESTARTError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [restart] error, " - "no menu label defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenRESTARTError, + "BScreen::parseMenuFile: [restart] error, " + "no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else { if (str_cmd.size())

@@ -1507,13 +1435,9 @@ if (!str_label.c_str()) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenRECONFIGError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [reconfig] error, " - "no menu label defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenRECONFIGError, + "BScreen::parseMenuFile: [reconfig] error, " + "no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else menu->insert(str_label.c_str(), BScreen::RECONFIGURE);

@@ -1524,13 +1448,9 @@ if (!( str_label.size() && str_cmd.size()) && newmenu) {

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenSTYLESDIRError, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [stylesdir/stylesmenu]" - " error, no directory defined\n")); + FBNLS::ScreenSet, FBNLS::ScreenSTYLESDIRError, + "BScreen::parseMenuFile: [stylesdir/stylesmenu]" + " error, no directory defined\n")); cerr<<"Row: "<<row<<endl; } else { // else 'y' createStyleMenu(menu, newmenu, str_label.c_str(), (newmenu) ? str_cmd.c_str() : str_label.c_str());

@@ -1540,7 +1460,7 @@ else if (str_key == "workspaces") {

if (!str_label.size()) { fprintf(stderr, i18n->getMessage( - ScreenSet, ScreenWORKSPACESError, + FBNLS::ScreenSet, FBNLS::ScreenWORKSPACESError, "BScreen:parseMenuFile: [workspaces] error, " "no menu label defined\n")); cerr<<"Row: "<<row<<endl;

@@ -1612,11 +1532,7 @@ } else { // dir

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenSTYLESDIRErrorNotDir, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::ScreenSet, FBNLS::ScreenSTYLESDIRErrorNotDir, "BScreen::parseMenuFile:" " [stylesdir/stylesmenu] error, %s is not a" " directory\n"), stylesdir.get());

@@ -1625,13 +1541,9 @@ } else { // stat

fprintf(stderr, i18n-> getMessage( - #ifdef NLS - ScreenSet, ScreenSTYLESDIRErrorNoExist, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::parseMenuFile: [stylesdir/stylesmenu]" - " error, %s does not exist\n"), stylesdir.get()); + FBNLS::ScreenSet, FBNLS::ScreenSTYLESDIRErrorNoExist, + "BScreen::parseMenuFile: [stylesdir/stylesmenu]" + " error, %s does not exist\n"), stylesdir.get()); } // end of 'stat' }

@@ -1689,12 +1601,8 @@ char label[label_size];

snprintf(label, label_size, I18n::instance()->getMessage( -#ifdef NLS - ScreenSet, ScreenPositionFormat, -#else // !NLS - 0, 0, -#endif // NLS - "X: %4d x Y: %4d"), x, y); + FBNLS::ScreenSet, FBNLS::ScreenPositionFormat, + "X: %4d x Y: %4d"), x, y); XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);

@@ -1737,12 +1645,8 @@ char label[1024];

sprintf(label, I18n::instance()->getMessage( -#ifdef NLS - ScreenSet, ScreenGeometryFormat, -#else // !NLS - 0, 0, -#endif // NLS - "W: %4d x H: %4d"), gx, gy); + FBNLS::ScreenSet, FBNLS::ScreenGeometryFormat, + "W: %4d x H: %4d"), gx, gy); XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
M src/Slit.ccsrc/Slit.cc

@@ -663,14 +663,10 @@

Slitmenu::Slitmenu(Slit *sl) : Basemenu(sl->screen) { slit = sl; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - SlitSet, SlitSlitTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Slit")); + SlitSet, SlitSlitTitle, + "Slit")); setInternalMenu(); directionmenu = new Directionmenu(this);

@@ -682,20 +678,12 @@ }

#endif // XINERAMA insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonDirectionTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Direction"), + CommonSet, CommonDirectionTitle, + "Direction"), directionmenu); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Placement"), + CommonSet, CommonPlacementTitle, + "Placement"), placementmenu); #ifdef XINERAMA

@@ -706,19 +694,11 @@ }

#endif // XINERAMA insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonAlwaysOnTop, -#else // !NLS - 0, 0, -#endif // NLS - "Always on top"), 1); + CommonSet, CommonAlwaysOnTop, + "Always on top"), 1); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonAutoHide, -#else // !NLS - 0, 0, -#endif // NLS - "Auto hide"), 2); + CommonSet, CommonAutoHide, + "Auto hide"), 2); update();

@@ -792,31 +772,19 @@

Slitmenu::Directionmenu::Directionmenu(Slitmenu *sm) : Basemenu(sm->slit->screen) { slitmenu = sm; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - SlitSet, SlitSlitDirection, -#else // !NLS - 0, 0, -#endif // NLS - "Slit Direction")); + SlitSet, SlitSlitDirection, + "Slit Direction")); setInternalMenu(); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonDirectionHoriz, -#else // !NLS - 0, 0, -#endif // NLS - "Horizontal"), + CommonSet, CommonDirectionHoriz, + "Horizontal"), Slit::HORIZONTAL); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonDirectionVert, -#else // !NLS - 0, 0, -#endif // NLS - "Vertical"), + CommonSet, CommonDirectionVert, + "Vertical"), Slit::VERTICAL); update();

@@ -852,81 +820,45 @@

Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen) { slitmenu = sm; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - SlitSet, SlitSlitPlacement, -#else // !NLS - 0, 0, -#endif // NLS - "Slit Placement")); + SlitSet, SlitSlitPlacement, + "Slit Placement")); setMinimumSublevels(3); setInternalMenu(); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopLeft, -#else // !NLS - 0, 0, -#endif // NLS - "Top Left"), + CommonSet, CommonPlacementTopLeft, + "Top Left"), Slit::TOPLEFT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementCenterLeft, -#else // !NLS - 0, 0, -#endif // NLS - "Center Left"), + CommonSet, CommonPlacementCenterLeft, + "Center Left"), Slit::CENTERLEFT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomLeft, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Left"), + CommonSet, CommonPlacementBottomLeft, + "Bottom Left"), Slit::BOTTOMLEFT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopCenter, -#else // !NLS - 0, 0, -#endif // NLS - "Top Center"), + CommonSet, CommonPlacementTopCenter, + "Top Center"), Slit::TOPCENTER); insert(""); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomCenter, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Center"), + CommonSet, CommonPlacementBottomCenter, + "Bottom Center"), Slit::BOTTOMCENTER); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopRight, -#else // !NLS - 0, 0, -#endif // NLS - "Top Right"), + CommonSet, CommonPlacementTopRight, + "Top Right"), Slit::TOPRIGHT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementCenterRight, -#else // !NLS - 0, 0, -#endif // NLS - "Center Right"), + CommonSet, CommonPlacementCenterRight, + "Center Right"), Slit::CENTERRIGHT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomRight, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Right"), + CommonSet, CommonPlacementBottomRight, + "Bottom Right"), Slit::BOTTOMRIGHT); update();
M src/Theme.ccsrc/Theme.cc

@@ -41,7 +41,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: Theme.cc,v 1.18 2002/03/21 10:54:29 fluxgen Exp $ +// $Id: Theme.cc,v 1.19 2002/04/04 11:28:19 fluxgen Exp $ #ifndef _GNU_SOURCE #define _GNU_SOURCE

@@ -889,11 +889,7 @@ if (! *fontset) {

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - ScreenSet, ScreenDefaultFontLoadFail, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::ScreenSet, FBNLS::ScreenDefaultFontLoadFail, "BScreen::LoadStyle(): couldn't load default font.\n")); throw 2; }

@@ -922,12 +918,8 @@ if ((*font = XLoadQueryFont(m_display, value.addr)) == NULL) {

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - ScreenSet, ScreenFontLoadFail, - #else // !NLS - 0, 0, - #endif // NLS - "BScreen::LoadStyle(): couldn't load font '%s'\n"), + FBNLS::ScreenSet, FBNLS::ScreenFontLoadFail, + "BScreen::LoadStyle(): couldn't load font '%s'\n"), value.addr); load_default = true;

@@ -941,13 +933,9 @@ defaultFont)) == NULL) {

fprintf(stderr, I18n::instance()-> getMessage( -#ifdef NLS - ScreenSet, ScreenDefaultFontLoadFail, -#else // !NLS - 0, 0, -#endif // NLS - "BScreen::LoadStyle(): couldn't load default font.\n")); - throw (int)(2); + FBNLS::ScreenSet, FBNLS::ScreenDefaultFontLoadFail, + "BScreen::LoadStyle(): couldn't load default font.\n")); + throw 2; //fatal! } } }
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,7 +22,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: Toolbar.cc,v 1.18 2002/04/03 23:02:49 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.19 2002/04/04 11:28:19 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library

@@ -1248,14 +1248,10 @@

Toolbarmenu::Toolbarmenu(Toolbar *tb) : Basemenu(tb->screen) { toolbar = tb; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - ToolbarSet, ToolbarToolbarTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Toolbar")); + ToolbarSet, ToolbarToolbarTitle, + "Toolbar")); setInternalMenu(); placementmenu = new Placementmenu(this);

@@ -1266,13 +1262,9 @@ }

#endif // XINERAMA insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Placement"), - placementmenu); + CommonSet, CommonPlacementTitle, + "Placement"), + placementmenu); #ifdef XINERAMA if (toolbar->screen->hasXinerama()) { //TODO: NLS

@@ -1281,29 +1273,17 @@ }

#endif // XINERAMA insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonAlwaysOnTop, -#else // !NLS - 0, 0, -#endif // NLS - "Always on top"), - 1); + CommonSet, CommonAlwaysOnTop, + "Always on top"), + 1); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonAutoHide, -#else // !NLS - 0, 0, -#endif // NLS - "Auto hide"), + CommonSet, CommonAutoHide, + "Auto hide"), 2); insert(i18n->getMessage( -#ifdef NLS - ToolbarSet, ToolbarEditWkspcName, -#else // !NLS - 0, 0, -#endif // NLS - "Edit current workspace name"), - 3); + ToolbarSet, ToolbarEditWkspcName, + "Edit current workspace name"), + 3); update();

@@ -1386,64 +1366,36 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)

: Basemenu(tm->toolbar->screen) { toolbarmenu = tm; I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - ToolbarSet, ToolbarToolbarPlacement, -#else // !NLS - 0, 0, -#endif // NLS - "Toolbar Placement")); + ToolbarSet, ToolbarToolbarPlacement, + "Toolbar Placement")); setInternalMenu(); setMinimumSublevels(3); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopLeft, -#else // !NLS - 0, 0, -#endif // NLS - "Top Left"), - Toolbar::TOPLEFT); + CommonSet, CommonPlacementTopLeft, + "Top Left"), + Toolbar::TOPLEFT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomLeft, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Left"), - Toolbar::BOTTOMLEFT); + CommonSet, CommonPlacementBottomLeft, + "Bottom Left"), + Toolbar::BOTTOMLEFT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopCenter, -#else // !NLS - 0, 0, -#endif // NLS - "Top Center"), - Toolbar::TOPCENTER); + CommonSet, CommonPlacementTopCenter, + "Top Center"), + Toolbar::TOPCENTER); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomCenter, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Center"), - Toolbar::BOTTOMCENTER); + CommonSet, CommonPlacementBottomCenter, + "Bottom Center"), + Toolbar::BOTTOMCENTER); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementTopRight, -#else // !NLS - 0, 0, -#endif // NLS - "Top Right"), - Toolbar::TOPRIGHT); + CommonSet, CommonPlacementTopRight, + "Top Right"), + Toolbar::TOPRIGHT); insert(i18n->getMessage( -#ifdef NLS - CommonSet, CommonPlacementBottomRight, -#else // !NLS - 0, 0, -#endif // NLS - "Bottom Right"), + CommonSet, CommonPlacementBottomRight, + "Bottom Right"), Toolbar::BOTTOMRIGHT); update();
M src/Window.ccsrc/Window.cc

@@ -22,7 +22,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: Window.cc,v 1.36 2002/04/03 23:01:04 fluxgen Exp $ +// $Id: Window.cc,v 1.37 2002/04/04 11:28:19 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -81,18 +81,13 @@ #endif

{ lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; - #ifdef DEBUG fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - WindowSet, WindowCreating, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::WindowSet, FBNLS::WindowCreating, "FluxboxWindow::FluxboxWindow(): creating 0x%lx\n"), - w); - #endif // DEBUG + w); + Fluxbox *fluxbox = Fluxbox::instance(); display = fluxbox->getXDisplay();

@@ -528,11 +523,7 @@ case XGETWINDOWATTRIB:

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - WindowSet, WindowXGetWindowAttributesFail, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::WindowSet, FBNLS::WindowXGetWindowAttributesFail, "FluxboxWindow::FluxboxWindow(): XGetWindowAttributes " "failed\n") );

@@ -541,11 +532,7 @@ case CANTFINDSCREEN:

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - WindowSet, WindowCannotFindScreen, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::WindowSet, FBNLS::WindowCannotFindScreen, "FluxboxWindow::FluxboxWindow(): can't find screen\n" " for root window")); break;

@@ -1463,11 +1450,11 @@ client.title = (char *)text_prop.value;

XFree((char *) text_prop.value); } else client.title = i18n->getMessage( - WindowSet, WindowUnnamed, + FBNLS::WindowSet, FBNLS::WindowUnnamed, "Unnamed"); } else { client.title = i18n->getMessage( - WindowSet, WindowUnnamed, + FBNLS::WindowSet, FBNLS::WindowUnnamed, "Unnamed"); }

@@ -2816,11 +2803,7 @@ if (re->window == client.window) {

#ifdef DEBUG fprintf(stderr, I18n::instance()->getMessage( -#ifdef NLS - WindowSet, WindowMapRequest, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::WindowSet, FBNLS::WindowMapRequest, "FluxboxWindow::mapRequestEvent() for 0x%lx\n"), client.window); #endif // DEBUG

@@ -2907,11 +2890,7 @@ if (ue->window == client.window) {

#ifdef DEBUG fprintf(stderr, I18n::instance()->getMessage( - #ifdef NLS - WindowSet, WindowUnmapNotify, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::WindowSet, FBNLS::WindowUnmapNotify, "FluxboxWindow::unmapNotifyEvent() for 0x%lx\n"), client.window); #endif // DEBUG

@@ -2937,13 +2916,9 @@ &dummy)) {

#ifdef DEBUG fprintf(stderr, I18n::instance()->getMessage( - #ifdef NLS - WindowSet, WindowUnmapNotifyReparent, - #else // !NLS - 0, 0, - #endif // NLS - "FluxboxWindow::unmapNotifyEvent(): reparent 0x%lx to " - "root.\n"), client.window); + FBNLS::WindowSet, FBNLS::WindowUnmapNotifyReparent, + "FluxboxWindow::unmapNotifyEvent(): reparent 0x%lx to " + "root.\n"), client.window); #endif // DEBUG restoreGravity(); XReparentWindow(display, client.window, screen->getRootWindow(),
M src/Windowmenu.ccsrc/Windowmenu.cc

@@ -52,96 +52,52 @@ I18n *i18n = I18n::instance();

sendToMenu = new SendtoWorkspacemenu(this); sendGroupToMenu = new SendGroupToWorkspacemenu(this); - + using namespace FBNLS; insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuSendTo, -#else // !NLS - 0, 0, -#endif // NLS - "Send To ..."), + WindowmenuSet, WindowmenuSendTo, + "Send To ..."), sendToMenu); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuSendGroupTo, -#else // !NLS - 0, 0, -#endif // NLS - "Send Group To ..."), + WindowmenuSet, WindowmenuSendGroupTo, + "Send Group To ..."), sendGroupToMenu); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuShade, -#else // !NLS - 0, 0, -#endif // NLS - "Shade"), + WindowmenuSet, WindowmenuShade, + "Shade"), BScreen::WINDOWSHADE); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuIconify, -#else // !NLS - 0, 0, -#endif // NLS - "Iconify"), + WindowmenuSet, WindowmenuIconify, + "Iconify"), BScreen::WINDOWICONIFY); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuMaximize, -#else // !NLS - 0, 0, -#endif // NLS - "Maximize"), + WindowmenuSet, WindowmenuMaximize, + "Maximize"), BScreen::WINDOWMAXIMIZE); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuRaise, -#else // !NLS - 0, 0, -#endif // NLS - "Raise"), + WindowmenuSet, WindowmenuRaise, + "Raise"), BScreen::WINDOWRAISE); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuLower, -#else // !NLS - 0, 0, -#endif // NLS - "Lower"), + WindowmenuSet, WindowmenuLower, + "Lower"), BScreen::WINDOWLOWER); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuStick, -#else // !NLS - 0, 0, -#endif // NLS - "Stick"), + WindowmenuSet, WindowmenuStick, + "Stick"), BScreen::WINDOWSTICK); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuKillClient, -#else // !NLS - 0, 0, -#endif // NLS - "Kill Client"), + WindowmenuSet, WindowmenuKillClient, + "Kill Client"), BScreen::WINDOWKILL); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuClose, -#else // !NLS - 0, 0, -#endif // NLS - "Close"), + WindowmenuSet, WindowmenuClose, + "Close"), BScreen::WINDOWCLOSE); insert(i18n->getMessage( -#ifdef NLS - WindowmenuSet, WindowmenuTab, -#else // !NLS - 0, 0, -#endif // NLS - "Tab"), + WindowmenuSet, WindowmenuTab, + "Tab"), BScreen::WINDOWTAB); update();
M src/Workspace.ccsrc/Workspace.cc

@@ -22,7 +22,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: Workspace.cc,v 1.16 2002/04/03 23:04:01 fluxgen Exp $ +// $Id: Workspace.cc,v 1.17 2002/04/04 11:28:19 fluxgen Exp $ // use GNU extensions #ifndef _GNU_SOURCE

@@ -351,11 +351,7 @@ } else {

char tname[128]; sprintf(tname, I18n::instance()-> getMessage( -#ifdef NLS - WorkspaceSet, WorkspaceDefaultNameFormat, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::WorkspaceSet, FBNLS::WorkspaceDefaultNameFormat, "Workspace %d"), id + 1); name = tname; }
M src/Workspacemenu.ccsrc/Workspacemenu.cc

@@ -44,29 +44,16 @@ screen = scrn;

setInternalMenu(); I18n *i18n = I18n::instance(); - + using namespace FBNLS; setLabel(i18n->getMessage( -#ifdef NLS - WorkspacemenuSet, WorkspacemenuWorkspacesTitle, -#else // !NLS - 0, 0, -#endif // NLS - "Workspaces")); - + WorkspacemenuSet, WorkspacemenuWorkspacesTitle, + "Workspaces")); insert(i18n->getMessage( -#ifdef NLS - WorkspacemenuSet, WorkspacemenuNewWorkspace, -#else // !NLS - 0, 0, -#endif // NLS - "New Workspace")); + WorkspacemenuSet, WorkspacemenuNewWorkspace, + "New Workspace")); insert(i18n->getMessage( -#ifdef NLS - WorkspacemenuSet, WorkspacemenuRemoveLast, -#else // !NLS - 0, 0, -#endif // NLS - "Remove Last")); + WorkspacemenuSet, WorkspacemenuRemoveLast, + "Remove Last")); }
M src/fluxbox.ccsrc/fluxbox.cc

@@ -22,7 +22,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: fluxbox.cc,v 1.43 2002/04/02 23:13:38 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.44 2002/04/04 11:28:19 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE

@@ -380,11 +380,7 @@ if (! screenList->count()) {

fprintf(stderr, i18n-> getMessage( -#ifdef NLS - blackboxSet, blackboxNoManagableScreens, -#else // !NLS - 0, 0, -#endif // NLS + FBNLS::blackboxSet, FBNLS::blackboxNoManagableScreens, "Fluxbox::Fluxbox: no managable screens found, aborting.\n")); throw static_cast<int>(3);

@@ -602,13 +598,9 @@ #ifdef DEBUG

fprintf(stderr, I18n::instance()-> getMessage( - #ifdef NLS - blackboxSet, blackboxMapRequest, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::blackboxSet, FBNLS::blackboxMapRequest, "Fluxbox::process_event(): MapRequest for 0x%lx\n"), - e->xmaprequest.window); + e->xmaprequest.window); #endif // DEBUG #ifdef SLIT
M src/i18n.ccsrc/i18n.cc

@@ -22,7 +22,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: i18n.cc,v 1.3 2002/04/04 00:21:48 fluxgen Exp $ +// $Id: i18n.cc,v 1.4 2002/04/04 11:28:19 fluxgen Exp $ //usr GNU extensions #ifndef _GNU_SOURCE

@@ -58,7 +58,7 @@ i18n->openCatalog(catalog);

} -I18n::I18n():m_multibyte(false), m_catalog_fd(0) { +I18n::I18n():m_multibyte(false), m_catalog_fd(-1) { #ifdef HAVE_SETLOCALE //make sure we don't get 0 to m_locale string char *temp = setlocale(LC_ALL, "");
M src/main.ccsrc/main.cc

@@ -22,10 +22,9 @@ // 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: main.cc,v 1.5 2002/03/08 12:21:46 fluxgen Exp $ +// $Id: main.cc,v 1.6 2002/04/04 11:28:19 fluxgen Exp $ -// stupid macros needed to access some functions in version 2 of the GNU C -// library +//use GNU extensions #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif // _GNU_SOURCE

@@ -75,12 +74,12 @@ #endif //!DEBUG_UDS

const char *getNLSYesNoMsg(bool val) { if (val) { return I18n::instance()->getMessage( - CommonSet, CommonYes, + FBNLS::CommonSet, FBNLS::CommonYes, "yes"); } return I18n::instance()->getMessage( - CommonSet, CommonNo, + FBNLS::CommonSet, FBNLS::CommonNo, "no"); }

@@ -103,7 +102,7 @@

if ((++i) >= argc) { fprintf(stderr, i18n->getMessage( - mainSet, mainRCRequiresArg, + FBNLS::mainSet, FBNLS::mainRCRequiresArg, "error: '-rc' requires and argument\n")); exit(1); }

@@ -116,7 +115,7 @@

if ((++i) >= argc) { fprintf(stderr, i18n->getMessage( - mainSet, mainDISPLAYRequiresArg, + FBNLS::mainSet, FBNLS::mainDISPLAYRequiresArg, "error: '-display' requires an argument\n")); exit(1); }

@@ -129,7 +128,7 @@ if (putenv(dtmp)) {

fprintf(stderr, i18n-> getMessage( - mainSet, mainWarnDisplaySet, + FBNLS::mainSet, FBNLS::mainWarnDisplaySet, "warning: couldn't set environment variable 'DISPLAY'\n")); perror("putenv()"); }

@@ -143,7 +142,7 @@ } else if (! strcmp(argv[i], "-help")) {

// print program usage and command line options printf(i18n-> getMessage( - mainSet, mainUsage, + FBNLS::mainSet, FBNLS::mainUsage, "Fluxbox %s : (c) 2001-2002 Henrik Kinnunen\n\n" " -display <string>\t\tuse display connection.\n" " -rc <string>\t\t\tuse alternate resource file.\n"

@@ -155,11 +154,7 @@ // some people have requested that we print out command line options

// as well printf(i18n-> getMessage( - #ifdef NLS - mainSet, mainCompileOptions, - #else // !NLS - 0, 0, - #endif // NLS + FBNLS::mainSet, FBNLS::mainCompileOptions, "Compile time options:\n" " Debugging:\t\t\t%s\n" " Interlacing:\t\t\t%s\n"