aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-21 14:41:16 (GMT)
committersimonb <simonb>2006-06-21 14:41:16 (GMT)
commit3ada3b1f0d6d2debaaab48eecf828a406e964c8e (patch)
tree3c2f02462317408ee8604d0c7bb41092ecfd1c3a /src/fluxbox.cc
parent62a298b0b30aa5b4990f462aece224e09e4fafe6 (diff)
downloadfluxbox-3ada3b1f0d6d2debaaab48eecf828a406e964c8e.zip
fluxbox-3ada3b1f0d6d2debaaab48eecf828a406e964c8e.tar.bz2
fix nls... notably classify text on conversion whether its for X or
console, plus handle catalogs better.
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 94c9730..471f46a 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -234,10 +234,10 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
234 234
235 _FB_USES_NLS; 235 _FB_USES_NLS;
236 if (s_singleton != 0) 236 if (s_singleton != 0)
237 throw _FBTEXT(Fluxbox, FatalSingleton, "Fatal! There can only one instance of fluxbox class.", "Error displayed on weird error where an instance of the Fluxbox class already exists!"); 237 throw _FB_CONSOLETEXT(Fluxbox, FatalSingleton, "Fatal! There can only one instance of fluxbox class.", "Error displayed on weird error where an instance of the Fluxbox class already exists!");
238 238
239 if (display() == 0) { 239 if (display() == 0) {
240 throw _FBTEXT(Fluxbox, NoDisplay, 240 throw _FB_CONSOLETEXT(Fluxbox, NoDisplay,
241 "Can not connect to X server.\nMake sure you started X before you start Fluxbox.", 241 "Can not connect to X server.\nMake sure you started X before you start Fluxbox.",
242 "Error message when no X display appears to exist"); 242 "Error message when no X display appears to exist");
243 } 243 }
@@ -312,10 +312,10 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
312 setupConfigFiles(); 312 setupConfigFiles();
313 313
314 if (! XSupportsLocale()) 314 if (! XSupportsLocale())
315 cerr<<_FBTEXT(Fluxbox, WarningLocale, "Warning: X server does not support locale", "XSupportsLocale returned false")<<endl; 315 cerr<<_FB_CONSOLETEXT(Fluxbox, WarningLocale, "Warning: X server does not support locale", "XSupportsLocale returned false")<<endl;
316 316
317 if (XSetLocaleModifiers("") == 0) 317 if (XSetLocaleModifiers("") == 0)
318 cerr<<_FBTEXT(Fluxbox, WarningLocaleModifiers, "Warning: cannot set locale modifiers", "XSetLocaleModifiers returned false")<<endl; 318 cerr<<_FB_CONSOLETEXT(Fluxbox, WarningLocaleModifiers, "Warning: cannot set locale modifiers", "XSetLocaleModifiers returned false")<<endl;
319 319
320 320
321#ifdef HAVE_GETPID 321#ifdef HAVE_GETPID
@@ -335,7 +335,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
335 for (i = 1; i < m_argc; i++) { 335 for (i = 1; i < m_argc; i++) {
336 if (! strcmp(m_argv[i], "-screen")) { 336 if (! strcmp(m_argv[i], "-screen")) {
337 if ((++i) >= m_argc) { 337 if ((++i) >= m_argc) {
338 cerr << _FBTEXT(main, ScreenRequiresArg, "error, -screen requires argument", "the -screen option requires a file argument") << endl; 338 cerr << _FB_CONSOLETEXT(main, ScreenRequiresArg, "error, -screen requires argument", "the -screen option requires a file argument") << endl;
339 exit(1); 339 exit(1);
340 } 340 }
341 341
@@ -367,7 +367,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
367 367
368 368
369 if (m_screen_list.empty()) { 369 if (m_screen_list.empty()) {
370 throw _FBTEXT(Fluxbox, ErrorNoScreens, 370 throw _FB_CONSOLETEXT(Fluxbox, ErrorNoScreens,
371 "Couldn't find screens to manage.\nMake sure you don't have another window manager running.", 371 "Couldn't find screens to manage.\nMake sure you don't have another window manager running.",
372 "Error message when no unmanaged screens found - usually means another window manager is running"); 372 "Error message when no unmanaged screens found - usually means another window manager is running");
373 } 373 }
@@ -594,7 +594,7 @@ void Fluxbox::setupConfigFiles() {
594 _FB_USES_NLS; 594 _FB_USES_NLS;
595 // create directory with perm 700 595 // create directory with perm 700
596 if (mkdir(dirname.c_str(), 0700)) { 596 if (mkdir(dirname.c_str(), 0700)) {
597 fprintf(stderr, _FBTEXT(Fluxbox, ErrorCreatingDirectory, 597 fprintf(stderr, _FB_CONSOLETEXT(Fluxbox, ErrorCreatingDirectory,
598 "Can't create %s directory", 598 "Can't create %s directory",
599 "Can't create a directory, one %s for directory name").c_str(), 599 "Can't create a directory, one %s for directory name").c_str(),
600 dirname.c_str()); 600 dirname.c_str());
@@ -758,7 +758,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
758 screen = searchScreen(e->xmaprequest.parent); 758 screen = searchScreen(e->xmaprequest.parent);
759 759
760 if (screen == 0) { 760 if (screen == 0) {
761 cerr<<"Fluxbox "<<_FBTEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl; 761 cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl;
762 } else 762 } else
763 win = screen->createWindow(e->xmaprequest.window); 763 win = screen->createWindow(e->xmaprequest.window);
764 764
@@ -1156,17 +1156,17 @@ void Fluxbox::handleSignal(int signum) {
1156 break; 1156 break;
1157 default: 1157 default:
1158 fprintf(stderr, 1158 fprintf(stderr,
1159 _FBTEXT(BaseDisplay, SignalCaught, "%s: signal %d caught\n", "signal catch debug message. Include %s for command and %d for signal number").c_str(), 1159 _FB_CONSOLETEXT(BaseDisplay, SignalCaught, "%s: signal %d caught\n", "signal catch debug message. Include %s for command and %d for signal number").c_str(),
1160 m_argv[0], signum); 1160 m_argv[0], signum);
1161 1161
1162 if (! m_starting && ! re_enter) { 1162 if (! m_starting && ! re_enter) {
1163 re_enter = 1; 1163 re_enter = 1;
1164 cerr<<_FBTEXT(BaseDisplay, ShuttingDown, "Shutting Down\n", "Quitting because of signal, end with newline"); 1164 cerr<<_FB_CONSOLETEXT(BaseDisplay, ShuttingDown, "Shutting Down\n", "Quitting because of signal, end with newline");
1165 shutdown(); 1165 shutdown();
1166 } 1166 }
1167 1167
1168 1168
1169 cerr<<_FBTEXT(BaseDisplay, Aborting, "Aborting... dumping core\n", "Aboring and dumping core, end with newline"); 1169 cerr<<_FB_CONSOLETEXT(BaseDisplay, Aborting, "Aborting... dumping core\n", "Aboring and dumping core, end with newline");
1170 abort(); 1170 abort();
1171 break; 1171 break;
1172 } 1172 }
@@ -1455,7 +1455,7 @@ void Fluxbox::save_rc() {
1455 m_resourcemanager.save(dbfile.c_str(), dbfile.c_str()); 1455 m_resourcemanager.save(dbfile.c_str(), dbfile.c_str());
1456 m_screen_rm.save(dbfile.c_str(), dbfile.c_str()); 1456 m_screen_rm.save(dbfile.c_str(), dbfile.c_str());
1457 } else 1457 } else
1458 cerr<<_FBTEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl; 1458 cerr<<_FB_CONSOLETEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl;
1459 1459
1460 ScreenList::iterator it = m_screen_list.begin(); 1460 ScreenList::iterator it = m_screen_list.begin();
1461 ScreenList::iterator it_end = m_screen_list.end(); 1461 ScreenList::iterator it_end = m_screen_list.end();
@@ -1521,14 +1521,14 @@ void Fluxbox::load_rc() {
1521 1521
1522 if (!dbfile.empty()) { 1522 if (!dbfile.empty()) {
1523 if (!m_resourcemanager.load(dbfile.c_str())) { 1523 if (!m_resourcemanager.load(dbfile.c_str())) {
1524 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl; 1524 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
1525 cerr<<_FBTEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl; 1525 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
1526 if (!m_resourcemanager.load(DEFAULT_INITFILE)) 1526 if (!m_resourcemanager.load(DEFAULT_INITFILE))
1527 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1527 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1528 } 1528 }
1529 } else { 1529 } else {
1530 if (!m_resourcemanager.load(DEFAULT_INITFILE)) 1530 if (!m_resourcemanager.load(DEFAULT_INITFILE))
1531 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1531 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1532 } 1532 }
1533 1533
1534 if (m_rc_menufile->empty()) 1534 if (m_rc_menufile->empty())
@@ -1555,7 +1555,7 @@ void Fluxbox::load_rc() {
1555 1555
1556 if (!Workspace::loadGroups(*m_rc_groupfile)) { 1556 if (!Workspace::loadGroups(*m_rc_groupfile)) {
1557#ifdef DEBUG 1557#ifdef DEBUG
1558 cerr<<_FBTEXT(Fluxbox, CantLoadGroupFile, "Failed to load groupfile", "Couldn't load the groupfile")<<": "<<*m_rc_groupfile<<endl; 1558 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadGroupFile, "Failed to load groupfile", "Couldn't load the groupfile")<<": "<<*m_rc_groupfile<<endl;
1559#endif // DEBUG 1559#endif // DEBUG
1560 } 1560 }
1561} 1561}
@@ -1610,14 +1610,14 @@ void Fluxbox::load_rc(BScreen &screen) {
1610 1610
1611 if (!dbfile.empty()) { 1611 if (!dbfile.empty()) {
1612 if (!m_screen_rm.load(dbfile.c_str())) { 1612 if (!m_screen_rm.load(dbfile.c_str())) {
1613 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl; 1613 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
1614 cerr<<_FBTEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl; 1614 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
1615 if (!m_screen_rm.load(DEFAULT_INITFILE)) 1615 if (!m_screen_rm.load(DEFAULT_INITFILE))
1616 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1616 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1617 } 1617 }
1618 } else { 1618 } else {
1619 if (!m_screen_rm.load(DEFAULT_INITFILE)) 1619 if (!m_screen_rm.load(DEFAULT_INITFILE))
1620 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl; 1620 cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
1621 } 1621 }
1622} 1622}
1623 1623