moved nls defines to enums in namespace FBNLS
This commit is contained in:
parent
bd05695cfa
commit
2526e4bce8
16 changed files with 296 additions and 771 deletions
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ static int handleXErrors(Display *d, XErrorEvent *e) {
|
|||
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 @@ static void signalhandler(int sig) {
|
|||
|
||||
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,11 +171,7 @@ static void signalhandler(int sig) {
|
|||
re_enter = 1;
|
||||
fprintf(stderr,
|
||||
i18n->getMessage(
|
||||
#ifdef NLS
|
||||
BaseDisplaySet, BaseDisplayShuttingDown,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::BaseDisplaySet, FBNLS::BaseDisplayShuttingDown,
|
||||
"shutting down\n"));
|
||||
base_display->shutdown();
|
||||
}
|
||||
|
@ -191,11 +179,7 @@ static void signalhandler(int sig) {
|
|||
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,11 +244,7 @@ m_server_grabs(0)
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
BaseDisplaySet, BaseDisplayXConnectFail,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail,
|
||||
"BaseDisplay::BaseDisplay: connection to X server failed.\n"));
|
||||
|
||||
throw static_cast<int>(2); //throw error 2
|
||||
|
@ -272,11 +252,7 @@ m_server_grabs(0)
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
BaseDisplaySet, BaseDisplayCloseOnExecFail,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::BaseDisplaySet, FBNLS::BaseDisplayCloseOnExecFail,
|
||||
"BaseDisplay::BaseDisplay: couldn't mark display connection "
|
||||
"as close-on-exec\n"));
|
||||
throw static_cast<int>(2); //throw error 2
|
||||
|
@ -332,11 +308,7 @@ void BaseDisplay::eventLoop(void) {
|
|||
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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Basemenu::update(void) {
|
|||
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;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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,11 +48,7 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
|
|||
I18n *i18n = I18n::instance();
|
||||
|
||||
setLabel(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuConfigOptions,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ConfigmenuSet, FBNLS::ConfigmenuConfigOptions,
|
||||
"Config options"));
|
||||
|
||||
setInternalMenu();
|
||||
|
@ -60,92 +56,42 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
|
|||
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);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuWindowPlacement,
|
||||
#else //! NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Window Placement"), placementmenu);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuTabPlacement,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Tab Placement"), tabmenu);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuImageDithering,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Image Dithering"), 1);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuOpaqueMove,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Opaque Window Moving"), 2);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuFullMax,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Full Maximization"), 3);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuFocusNew,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Focus New Windows"), 4);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuFocusLast,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Focus Last Window on Workspace"), 5);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuMaxOverSlit,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"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);
|
||||
|
||||
update();
|
||||
|
@ -253,42 +199,23 @@ void Configmenu::reconfigure(void) {
|
|||
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"));
|
||||
setInternalMenu();
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuClickToFocus,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Click To Focus"), 1);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuSloppyFocus,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Sloppy Focus"), 2);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuSemiSloppyFocus,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Semi Sloppy Focus"), 3);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ConfigmenuSet, ConfigmenuAutoRaise,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Auto Raise"), 4);
|
||||
|
||||
update();
|
||||
|
@ -366,7 +293,7 @@ void Configmenu::Focusmenu::itemSelected(int button, unsigned int index) {
|
|||
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 @@ void Configmenu::Placementmenu::itemSelected(int button, unsigned int index) {
|
|||
Configmenu::Tabmenu::Tabmenu(Configmenu *cm) : Basemenu(cm->screen) {
|
||||
configmenu = cm;
|
||||
I18n *i18n = I18n::instance();
|
||||
using namespace FBNLS;
|
||||
|
||||
setLabel(i18n->getMessage(
|
||||
ConfigmenuSet, ConfigmenuTabPlacement,
|
||||
|
|
|
@ -39,11 +39,7 @@ Iconmenu::Iconmenu(BScreen *scrn) : Basemenu(scrn) {
|
|||
|
||||
screen = scrn;
|
||||
setLabel(I18n::instance()->getMessage(
|
||||
#ifdef NLS
|
||||
IconSet, IconIcons,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::IconSet, FBNLS::IconIcons,
|
||||
"Icons"));
|
||||
update();
|
||||
}
|
||||
|
|
74
src/Image.cc
74
src/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 @@ Pixmap BImage::render_solid(BTexture *texture) {
|
|||
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;
|
||||
}
|
||||
|
@ -285,11 +281,7 @@ XImage *BImage::renderXImage(void) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ImageSet, ImageErrorCreatingXImage,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ImageSet, FBNLS::ImageErrorCreatingXImage,
|
||||
"BImage::renderXImage: error creating XImage\n"));
|
||||
return (XImage *) 0;
|
||||
}
|
||||
|
@ -565,11 +557,7 @@ XImage *BImage::renderXImage(void) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ImageSet, ImageUnsupVisual,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ImageSet, FBNLS::ImageUnsupVisual,
|
||||
"BImage::renderXImage: unsupported visual\n"));
|
||||
delete [] d;
|
||||
XDestroyImage(image);
|
||||
|
@ -672,7 +660,7 @@ XImage *BImage::renderXImage(void) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
ImageSet, ImageUnsupVisual,
|
||||
FBNLS::ImageSet, FBNLS::ImageUnsupVisual,
|
||||
"BImage::renderXImage: unsupported visual\n"));
|
||||
delete [] d;
|
||||
XDestroyImage(image);
|
||||
|
@ -694,11 +682,7 @@ Pixmap BImage::renderPixmap(void) {
|
|||
if (pixmap == None) {
|
||||
fprintf(stderr,
|
||||
i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ImageSet, ImageErrorCreatingPixmap,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ImageSet, FBNLS::ImageErrorCreatingPixmap,
|
||||
"BImage::renderPixmap: error creating pixmap\n"));
|
||||
return None;
|
||||
}
|
||||
|
@ -1939,11 +1923,7 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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,
|
||||
|
@ -1957,11 +1937,7 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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
|
||||
|
@ -1996,11 +1972,7 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
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,11 +2138,7 @@ BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ImageSet, ImageUnsupVisual,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ImageSet, FBNLS::ImageUnsupVisual,
|
||||
"BImageControl::BImageControl: unsupported visual %d\n"),
|
||||
getVisual()->c_class);
|
||||
throw static_cast<int>(1); //throw error code 1
|
||||
|
@ -2220,7 +2176,7 @@ BImageControl::~BImageControl(void) {
|
|||
fprintf(stderr,
|
||||
I18n::instance()->
|
||||
getMessage(
|
||||
ImageSet, ImagePixmapRelease,
|
||||
FBNLS::ImageSet, FBNLS::ImagePixmapRelease,
|
||||
"BImageContol::~BImageControl: pixmap cache - "
|
||||
"releasing %d pixmaps\n"), cache.size());
|
||||
|
||||
|
@ -2294,7 +2250,7 @@ Pixmap BImageControl::renderImage(unsigned int width, unsigned int height,
|
|||
fprintf(stderr,
|
||||
I18n::instance()->
|
||||
getMessage(
|
||||
ImageSet, ImagePixmapCacheLarge,
|
||||
FBNLS::ImageSet, FBNLS::ImagePixmapCacheLarge,
|
||||
"BImageControl::renderImage: cache is large, "
|
||||
"forcing cleanout\n"));
|
||||
#endif // DEBUG
|
||||
|
|
148
src/Screen.cc
148
src/Screen.cc
|
@ -22,7 +22,7 @@
|
|||
// 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,11 +248,7 @@ resource(rm, screenname, altscreenname)
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenManagingScreen,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenManagingScreen,
|
||||
"BScreen::BScreen: managing screen %d "
|
||||
"using visual 0x%lx, depth %d\n"),
|
||||
getScreenNumber(), XVisualIDFromVisual(getVisual()),
|
||||
|
@ -311,11 +303,7 @@ resource(rm, screenname, altscreenname)
|
|||
#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 @@ resource(rm, screenname, altscreenname)
|
|||
|
||||
workspacemenu->insert(i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
IconSet, IconIcons,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::IconSet, FBNLS::IconIcons,
|
||||
"Icons"),
|
||||
iconmenu);
|
||||
workspacemenu->update();
|
||||
|
@ -555,11 +539,7 @@ void BScreen::reconfigure(void) {
|
|||
I18n *i18n = I18n::instance();
|
||||
|
||||
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);
|
||||
|
||||
|
@ -1251,11 +1231,7 @@ void BScreen::initMenu(void) {
|
|||
} 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,34 +1243,18 @@ void BScreen::initMenu(void) {
|
|||
if (defaultMenu) {
|
||||
rootmenu->setInternalMenu();
|
||||
rootmenu->insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, Screenxterm,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::Screenxterm,
|
||||
"xterm"),
|
||||
BScreen::EXECUTE,
|
||||
i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, Screenxterm,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::Screenxterm,
|
||||
"xterm"));
|
||||
rootmenu->insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenRestart,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenRestart,
|
||||
"Restart"),
|
||||
BScreen::RESTART);
|
||||
rootmenu->insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenExit,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenExit,
|
||||
"Exit"),
|
||||
BScreen::EXIT);
|
||||
} else
|
||||
|
@ -1339,11 +1299,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
if (!(str_label.size() && str_cmd.size())) {
|
||||
fprintf(stderr,
|
||||
i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenEXECError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenEXECError,
|
||||
"BScreen::parseMenuFile: [exec] error, "
|
||||
"no menu label and/or command defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1354,11 +1310,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
if (!str_label.size()) {
|
||||
fprintf(stderr,
|
||||
i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenEXITError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenEXITError,
|
||||
"BScreen::parseMenuFile: [exit] error, "
|
||||
"no menu label defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1370,11 +1322,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenSTYLEError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenSTYLEError,
|
||||
"BScreen::parseMenuFile: [style] error, "
|
||||
"no menu label and/or filename defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1393,11 +1341,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenCONFIGError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenCONFIGError,
|
||||
"BScreen::parseMenufile: [config] error, "
|
||||
"no label defined"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1409,11 +1353,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenINCLUDEError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenINCLUDEError,
|
||||
"BScreen::parseMenuFile: [include] error, "
|
||||
"no filename defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1433,11 +1373,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenINCLUDEErrorReg,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenINCLUDEErrorReg,
|
||||
"BScreen::parseMenuFile: [include] error: "
|
||||
"'%s' is not a regular file\n"), newfile);
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1460,11 +1396,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenSUBMENUError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenSUBMENUError,
|
||||
"BScreen::parseMenuFile: [submenu] error, "
|
||||
"no menu label defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1487,11 +1419,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenRESTARTError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenRESTARTError,
|
||||
"BScreen::parseMenuFile: [restart] error, "
|
||||
"no menu label defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1507,11 +1435,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenRECONFIGError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenRECONFIGError,
|
||||
"BScreen::parseMenuFile: [reconfig] error, "
|
||||
"no menu label defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1524,11 +1448,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenSTYLESDIRError,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenSTYLESDIRError,
|
||||
"BScreen::parseMenuFile: [stylesdir/stylesmenu]"
|
||||
" error, no directory defined\n"));
|
||||
cerr<<"Row: "<<row<<endl;
|
||||
|
@ -1540,7 +1460,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
|
|||
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 @@ void BScreen::createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, c
|
|||
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,11 +1541,7 @@ void BScreen::createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, c
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenSTYLESDIRErrorNoExist,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenSTYLESDIRErrorNoExist,
|
||||
"BScreen::parseMenuFile: [stylesdir/stylesmenu]"
|
||||
" error, %s does not exist\n"), stylesdir.get());
|
||||
} // end of 'stat'
|
||||
|
@ -1689,11 +1601,7 @@ void BScreen::showPosition(int x, int y) {
|
|||
|
||||
snprintf(label, label_size,
|
||||
I18n::instance()->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenPositionFormat,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenPositionFormat,
|
||||
"X: %4d x Y: %4d"), x, y);
|
||||
|
||||
XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
|
||||
|
@ -1737,11 +1645,7 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
|
|||
|
||||
sprintf(label,
|
||||
I18n::instance()->getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenGeometryFormat,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenGeometryFormat,
|
||||
"W: %4d x H: %4d"), gx, gy);
|
||||
|
||||
XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
|
||||
|
|
74
src/Slit.cc
74
src/Slit.cc
|
@ -663,13 +663,9 @@ void Slit::timeout(void) {
|
|||
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"));
|
||||
setInternalMenu();
|
||||
|
||||
|
@ -682,19 +678,11 @@ Slitmenu::Slitmenu(Slit *sl) : Basemenu(sl->screen) {
|
|||
#endif // XINERAMA
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonDirectionTitle,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Direction"),
|
||||
directionmenu);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTitle,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Placement"),
|
||||
placementmenu);
|
||||
|
||||
|
@ -706,18 +694,10 @@ Slitmenu::Slitmenu(Slit *sl) : Basemenu(sl->screen) {
|
|||
#endif // XINERAMA
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonAlwaysOnTop,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Always on top"), 1);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonAutoHide,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Auto hide"), 2);
|
||||
|
||||
update();
|
||||
|
@ -792,30 +772,18 @@ void Slitmenu::reconfigure(void) {
|
|||
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"));
|
||||
setInternalMenu();
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonDirectionHoriz,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Horizontal"),
|
||||
Slit::HORIZONTAL);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonDirectionVert,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Vertical"),
|
||||
Slit::VERTICAL);
|
||||
|
||||
|
@ -852,80 +820,44 @@ void Slitmenu::Directionmenu::itemSelected(int button, unsigned int index) {
|
|||
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"));
|
||||
setMinimumSublevels(3);
|
||||
setInternalMenu();
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopLeft,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Left"),
|
||||
Slit::TOPLEFT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementCenterLeft,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Center Left"),
|
||||
Slit::CENTERLEFT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomLeft,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Left"),
|
||||
Slit::BOTTOMLEFT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopCenter,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Center"),
|
||||
Slit::TOPCENTER);
|
||||
insert("");
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomCenter,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Center"),
|
||||
Slit::BOTTOMCENTER);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopRight,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Right"),
|
||||
Slit::TOPRIGHT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementCenterRight,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Center Right"),
|
||||
Slit::CENTERRIGHT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomRight,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Right"),
|
||||
Slit::BOTTOMRIGHT);
|
||||
|
||||
|
|
22
src/Theme.cc
22
src/Theme.cc
|
@ -41,7 +41,7 @@
|
|||
// 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 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *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,11 +918,7 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
|
|||
fprintf(stderr,
|
||||
I18n::instance()->
|
||||
getMessage(
|
||||
#ifdef NLS
|
||||
ScreenSet, ScreenFontLoadFail,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::ScreenSet, FBNLS::ScreenFontLoadFail,
|
||||
"BScreen::LoadStyle(): couldn't load font '%s'\n"),
|
||||
value.addr);
|
||||
|
||||
|
@ -941,13 +933,9 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
|
|||
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 (int)(2);
|
||||
throw 2; //fatal!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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,13 +1248,9 @@ void Toolbar::HideHandler::timeout(void) {
|
|||
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"));
|
||||
setInternalMenu();
|
||||
|
||||
|
@ -1266,11 +1262,7 @@ Toolbarmenu::Toolbarmenu(Toolbar *tb) : Basemenu(tb->screen) {
|
|||
#endif // XINERAMA
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTitle,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Placement"),
|
||||
placementmenu);
|
||||
|
||||
|
@ -1281,27 +1273,15 @@ Toolbarmenu::Toolbarmenu(Toolbar *tb) : Basemenu(tb->screen) {
|
|||
#endif // XINERAMA
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonAlwaysOnTop,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Always on top"),
|
||||
1);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonAutoHide,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Auto hide"),
|
||||
2);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
ToolbarSet, ToolbarEditWkspcName,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Edit current workspace name"),
|
||||
3);
|
||||
|
||||
|
@ -1386,63 +1366,35 @@ 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"));
|
||||
setInternalMenu();
|
||||
setMinimumSublevels(3);
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopLeft,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Left"),
|
||||
Toolbar::TOPLEFT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomLeft,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Left"),
|
||||
Toolbar::BOTTOMLEFT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopCenter,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Center"),
|
||||
Toolbar::TOPCENTER);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomCenter,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Center"),
|
||||
Toolbar::BOTTOMCENTER);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementTopRight,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Top Right"),
|
||||
Toolbar::TOPRIGHT);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
CommonSet, CommonPlacementBottomRight,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Bottom Right"),
|
||||
Toolbar::BOTTOMRIGHT);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ tab(0)
|
|||
{
|
||||
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
|
||||
|
||||
|
||||
Fluxbox *fluxbox = Fluxbox::instance();
|
||||
display = fluxbox->getXDisplay();
|
||||
|
@ -528,11 +523,7 @@ void FluxboxWindow::showError(FluxboxWindow::Error error) {
|
|||
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 @@ void FluxboxWindow::showError(FluxboxWindow::Error error) {
|
|||
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 @@ void FluxboxWindow::getWMName(void) {
|
|||
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 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent *re) {
|
|||
#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 @@ bool FluxboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
|
|||
#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,11 +2916,7 @@ bool FluxboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
|
|||
#ifdef DEBUG
|
||||
fprintf(stderr,
|
||||
I18n::instance()->getMessage(
|
||||
#ifdef NLS
|
||||
WindowSet, WindowUnmapNotifyReparent,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
FBNLS::WindowSet, FBNLS::WindowUnmapNotifyReparent,
|
||||
"FluxboxWindow::unmapNotifyEvent(): reparent 0x%lx to "
|
||||
"root.\n"), client.window);
|
||||
#endif // DEBUG
|
||||
|
|
|
@ -52,95 +52,51 @@ screen(window->getScreen()){
|
|||
|
||||
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 ..."),
|
||||
sendToMenu);
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuSendGroupTo,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Send Group To ..."),
|
||||
sendGroupToMenu);
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuShade,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Shade"),
|
||||
BScreen::WINDOWSHADE);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuIconify,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Iconify"),
|
||||
BScreen::WINDOWICONIFY);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuMaximize,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Maximize"),
|
||||
BScreen::WINDOWMAXIMIZE);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuRaise,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Raise"),
|
||||
BScreen::WINDOWRAISE);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuLower,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Lower"),
|
||||
BScreen::WINDOWLOWER);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuStick,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Stick"),
|
||||
BScreen::WINDOWSTICK);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuKillClient,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Kill Client"),
|
||||
BScreen::WINDOWKILL);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuClose,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Close"),
|
||||
BScreen::WINDOWCLOSE);
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WindowmenuSet, WindowmenuTab,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Tab"),
|
||||
BScreen::WINDOWTAB);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Workspace::setName(char *new_name) {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -44,28 +44,15 @@ Workspacemenu::Workspacemenu(BScreen *scrn) : Basemenu(scrn) {
|
|||
|
||||
setInternalMenu();
|
||||
I18n *i18n = I18n::instance();
|
||||
|
||||
using namespace FBNLS;
|
||||
setLabel(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WorkspacemenuSet, WorkspacemenuWorkspacesTitle,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Workspaces"));
|
||||
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WorkspacemenuSet, WorkspacemenuNewWorkspace,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"New Workspace"));
|
||||
insert(i18n->getMessage(
|
||||
#ifdef NLS
|
||||
WorkspacemenuSet, WorkspacemenuRemoveLast,
|
||||
#else // !NLS
|
||||
0, 0,
|
||||
#endif // NLS
|
||||
"Remove Last"));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ key(0)
|
|||
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,11 +598,7 @@ void Fluxbox::process_event(XEvent *e) {
|
|||
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);
|
||||
#endif // DEBUG
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void NLSInit(const char *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, "");
|
||||
|
|
23
src/main.cc
23
src/main.cc
|
@ -22,10 +22,9 @@
|
|||
// 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 @@ uds::uds_flags_t uds::flags = uds::leak_check;
|
|||
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 @@ int main(int argc, char **argv) {
|
|||
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 @@ int main(int argc, char **argv) {
|
|||
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 @@ int main(int argc, char **argv) {
|
|||
fprintf(stderr,
|
||||
i18n->
|
||||
getMessage(
|
||||
mainSet, mainWarnDisplaySet,
|
||||
FBNLS::mainSet, FBNLS::mainWarnDisplaySet,
|
||||
"warning: couldn't set environment variable 'DISPLAY'\n"));
|
||||
perror("putenv()");
|
||||
}
|
||||
|
@ -143,7 +142,7 @@ int main(int argc, char **argv) {
|
|||
// 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 @@ int main(int argc, char **argv) {
|
|||
// 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"
|
||||
|
|
Loading…
Reference in a new issue