fix nls... notably classify text on conversion whether its for X or
console, plus handle catalogs better.
This commit is contained in:
parent
62a298b0b3
commit
3ada3b1f0d
30 changed files with 352 additions and 288 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,13 +1,15 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 1.0rc2:
|
Changes for 1.0rc2:
|
||||||
*06/06/21:
|
*06/06/21:
|
||||||
* Fix nls file location. nls wouldn't have worked, why did no-one say?
|
* Fix nls (Simon
|
||||||
(Simon)
|
- file location waas wrong. nls wouldn't have worked, why did no-one say?
|
||||||
- Need a couple more fixes too:
|
- Messages output on stdout/err now properly in local encoding
|
||||||
* Messages output on stdout/err need to be in local encoding
|
- Check for existence of catalog file, if it doesn't exist, and we can
|
||||||
* Check for existence of catalog file, if not exist, try opening an
|
convert from UTF-8, try loading that one instead.
|
||||||
iconv for UTF-8, and loading that one instead.
|
- bunch of files changed due to macro name change:
|
||||||
FbTk/I18n.cc
|
+ Use _FB_XTEXT if the text will go out to X (for X fonts)
|
||||||
|
+ Use _FB_CONSOLETEXT if the text will go to console (stdout/err)
|
||||||
|
FbTk/I18n.hh/cc (+anything with _FB_TEXT)
|
||||||
*06/06/20:
|
*06/06/20:
|
||||||
* Fix window placement when apps remembers size but not location (Simon)
|
* Fix window placement when apps remembers size but not location (Simon)
|
||||||
Window.cc
|
Window.cc
|
||||||
|
|
|
@ -34,11 +34,11 @@ $set 3 #Common
|
||||||
4 Compiled options
|
4 Compiled options
|
||||||
5 Compiler
|
5 Compiler
|
||||||
6 Compiler version
|
6 Compiler version
|
||||||
7 init
|
7 init
|
||||||
8 keys
|
8 keys
|
||||||
9 nls
|
9 nls
|
||||||
10 menu
|
10 menu
|
||||||
11 style
|
11 style
|
||||||
12 Defaults
|
12 Defaults
|
||||||
13 disabled
|
13 disabled
|
||||||
14 Error
|
14 Error
|
||||||
|
@ -46,6 +46,7 @@ $set 3 #Common
|
||||||
16 Maximize Over
|
16 Maximize Over
|
||||||
17 SVN Revision
|
17 SVN Revision
|
||||||
18 Visible
|
18 Visible
|
||||||
|
19 There is no background option specified in this style.\nPlease consult the manual or read the FAQ.
|
||||||
|
|
||||||
$set 4 #Configmenu
|
$set 4 #Configmenu
|
||||||
|
|
||||||
|
|
|
@ -58,9 +58,9 @@ public:
|
||||||
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
||||||
m_tool.timeFormat().find("%H") != std::string::npos ||
|
m_tool.timeFormat().find("%H") != std::string::npos ||
|
||||||
m_tool.timeFormat().find("%T") != std::string::npos)
|
m_tool.timeFormat().find("%T") != std::string::npos)
|
||||||
setLabel( _FBTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
|
setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
|
||||||
else
|
else
|
||||||
setLabel( _FBTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void click(int button, int time) {
|
void click(int button, int time) {
|
||||||
|
@ -107,9 +107,9 @@ public:
|
||||||
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
||||||
m_tool.timeFormat().find("%H") != std::string::npos ||
|
m_tool.timeFormat().find("%H") != std::string::npos ||
|
||||||
m_tool.timeFormat().find("%T") != std::string::npos)
|
m_tool.timeFormat().find("%T") != std::string::npos)
|
||||||
setLabel( _FBTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
|
setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
|
||||||
else
|
else
|
||||||
setLabel( _FBTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
||||||
|
|
||||||
} // else some other strange format...so we don't do anything
|
} // else some other strange format...so we don't do anything
|
||||||
FbTk::MenuItem::click(button, time);
|
FbTk::MenuItem::click(button, time);
|
||||||
|
@ -166,7 +166,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
|
||||||
item->setCommand(saverc);
|
item->setCommand(saverc);
|
||||||
menu.insert(item);
|
menu.insert(item);
|
||||||
FbTk::RefCount<FbTk::Command> editformat_cmd(new EditClockFormatCmd());
|
FbTk::RefCount<FbTk::Command> editformat_cmd(new EditClockFormatCmd());
|
||||||
menu.insert(_FBTEXT(Toolbar, ClockEditFormat, "Edit Clock Format", "edit Clock Format") , editformat_cmd);
|
menu.insert(_FB_XTEXT(Toolbar, ClockEditFormat, "Edit Clock Format", "edit Clock Format") , editformat_cmd);
|
||||||
|
|
||||||
|
|
||||||
update(0);
|
update(0);
|
||||||
|
|
|
@ -382,7 +382,7 @@ void Ewmh::updateClientList(BScreen &screen) {
|
||||||
Window *wl = FB_new_nothrow Window[num];
|
Window *wl = FB_new_nothrow Window[num];
|
||||||
if (wl == 0) {
|
if (wl == 0) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList,
|
cerr<<_FB_CONSOLETEXT(Ewmh, OutOfMemoryClientList,
|
||||||
"Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl;
|
"Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ void Color::allocate(unsigned short red, unsigned short green, unsigned short bl
|
||||||
|
|
||||||
if (!XAllocColor(disp, DefaultColormap(disp, screen), &color)) {
|
if (!XAllocColor(disp, DefaultColormap(disp, screen), &color)) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::Color: "<<_FBTKTEXT(Error, ColorAllocation, "Allocation error.", "XAllocColor failed...")<<endl;
|
cerr<<"FbTk::Color: "<<_FBTK_CONSOLETEXT(Error, ColorAllocation, "Allocation error.", "XAllocColor failed...")<<endl;
|
||||||
} else {
|
} else {
|
||||||
free();
|
free();
|
||||||
setRGB(maxValue(color.red),
|
setRGB(maxValue(color.red),
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#endif // _GNU_SOURCE
|
#endif // _GNU_SOURCE
|
||||||
|
|
||||||
#include "I18n.hh"
|
#include "I18n.hh"
|
||||||
|
#include "FileUtil.hh"
|
||||||
|
|
||||||
#include <X11/Xlocale.h>
|
#include <X11/Xlocale.h>
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ void NLSInit(const char *catalog) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
I18n::I18n():m_multibyte(false), m_catalog_fd((nl_catd)(-1)) {
|
I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)(-1)) {
|
||||||
#ifdef HAVE_SETLOCALE
|
#ifdef HAVE_SETLOCALE
|
||||||
//make sure we don't get 0 to m_locale string
|
//make sure we don't get 0 to m_locale string
|
||||||
char *temp = setlocale(LC_MESSAGES, "");
|
char *temp = setlocale(LC_MESSAGES, "");
|
||||||
|
@ -129,6 +130,26 @@ void I18n::openCatalog(const char *catalog) {
|
||||||
catalog_filename += '/';
|
catalog_filename += '/';
|
||||||
catalog_filename += catalog;
|
catalog_filename += catalog;
|
||||||
|
|
||||||
|
if (!FileUtil::isRegularFile(catalog_filename.c_str()) && m_locale != "C" && FbStringUtil::haveUTF8()) {
|
||||||
|
// try the UTF-8 catalog, this also picks up situations where
|
||||||
|
// the codeset somehow isn't specified
|
||||||
|
|
||||||
|
// remove everything after @
|
||||||
|
string::size_type index = m_locale.find('.');
|
||||||
|
// erase all characters starting at index
|
||||||
|
if (index != string::npos)
|
||||||
|
m_locale.erase(index);
|
||||||
|
|
||||||
|
m_locale.append(".UTF-8");
|
||||||
|
m_utf8_translate = true;
|
||||||
|
|
||||||
|
catalog_filename = LOCALEPATH;
|
||||||
|
catalog_filename += '/';
|
||||||
|
catalog_filename += m_locale;
|
||||||
|
catalog_filename += '/';
|
||||||
|
catalog_filename += catalog;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MCLoadBySet
|
#ifdef MCLoadBySet
|
||||||
m_catalog_fd = catopen(catalog_filename.c_str(), MCLoadBySet);
|
m_catalog_fd = catopen(catalog_filename.c_str(), MCLoadBySet);
|
||||||
#else // !MCLoadBySet
|
#else // !MCLoadBySet
|
||||||
|
@ -147,16 +168,29 @@ void I18n::openCatalog(const char *catalog) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Translate_FB means it'll become an FbString that goes to X for Fonts,
|
||||||
|
// No translate means it stays in the local encoding, for printing to the
|
||||||
|
// console.
|
||||||
FbString I18n::getMessage(int set_number, int message_number,
|
FbString I18n::getMessage(int set_number, int message_number,
|
||||||
const char *default_message) const {
|
const char *default_message, bool translate_fb) const {
|
||||||
|
|
||||||
#if defined(NLS) && defined(HAVE_CATGETS)
|
#if defined(NLS) && defined(HAVE_CATGETS)
|
||||||
if (m_catalog_fd != (nl_catd)-1) {
|
if (m_catalog_fd != (nl_catd)-1) {
|
||||||
const char *ret = catgets(m_catalog_fd, set_number, message_number, default_message);
|
const char *ret = catgets(m_catalog_fd, set_number, message_number, default_message);
|
||||||
|
// can't translate, leave it in raw ascii (utf-8 compatible)
|
||||||
if (ret == default_message || ret == NULL)
|
if (ret == default_message || ret == NULL)
|
||||||
return default_message; // don't recode the default
|
return default_message;
|
||||||
|
|
||||||
return FbStringUtil::LocaleStrToFb(ret);
|
if (!m_utf8_translate && translate_fb)
|
||||||
|
// Local input, UTF-8 output
|
||||||
|
return FbStringUtil::LocaleStrToFb(ret);
|
||||||
|
else if (m_utf8_translate && !translate_fb)
|
||||||
|
// UTF-8 input, local output
|
||||||
|
return FbStringUtil::FbStrToLocale(ret);
|
||||||
|
else
|
||||||
|
// UTF-8 input, UTF-8 output OR
|
||||||
|
// local input, local output
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // NLS && HAVE_CATGETS
|
#endif // NLS && HAVE_CATGETS
|
||||||
|
|
|
@ -68,20 +68,36 @@ void catclose(nl_catd cat);
|
||||||
FbTk::I18n &i18n = *FbTk::I18n::instance()
|
FbTk::I18n &i18n = *FbTk::I18n::instance()
|
||||||
|
|
||||||
// ignore the description, it's for helping translators
|
// ignore the description, it's for helping translators
|
||||||
#define _FBTEXT(msgset, msgid, default_text, description) \
|
|
||||||
i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text)
|
// Text for X
|
||||||
|
#define _FB_XTEXT(msgset, msgid, default_text, description) \
|
||||||
|
i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text, true)
|
||||||
|
|
||||||
|
// Text for console
|
||||||
|
#define _FB_CONSOLETEXT(msgset, msgid, default_text, description) \
|
||||||
|
i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text, false)
|
||||||
|
|
||||||
// This ensure that FbTk nls stuff is in a kind of namespace of its own
|
// This ensure that FbTk nls stuff is in a kind of namespace of its own
|
||||||
#define _FBTKTEXT( msgset, msgid, default_text, description) \
|
#define _FBTK_XTEXT( msgset, msgid, default_text, description) \
|
||||||
i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text)
|
i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text, true)
|
||||||
|
|
||||||
|
#define _FBTK_CONSOLETEXT( msgset, msgid, default_text, description) \
|
||||||
|
i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text, false)
|
||||||
|
|
||||||
#else // no NLS
|
#else // no NLS
|
||||||
|
|
||||||
#define _FB_USES_NLS
|
#define _FB_USES_NLS
|
||||||
#define _FBTEXT(msgset, msgid, default_text, description) \
|
|
||||||
|
#define _FB_XTEXT(msgset, msgid, default_text, description) \
|
||||||
std::string(default_text)
|
std::string(default_text)
|
||||||
|
|
||||||
#define _FBTKTEXT(msgset, msgid, default_text, description) \
|
#define _FB_CONSOLETEXT(msgset, msgid, default_text, description) \
|
||||||
|
std::string(default_text)
|
||||||
|
|
||||||
|
#define _FBTK_XTEXT(msgset, msgid, default_text, description) \
|
||||||
|
std::string(default_text)
|
||||||
|
|
||||||
|
#define _FBTK_CONSOLETEXT(msgset, msgid, default_text, description) \
|
||||||
std::string(default_text)
|
std::string(default_text)
|
||||||
|
|
||||||
#endif // defined NLS
|
#endif // defined NLS
|
||||||
|
@ -96,15 +112,17 @@ public:
|
||||||
inline const nl_catd &getCatalogFd() const { return m_catalog_fd; }
|
inline const nl_catd &getCatalogFd() const { return m_catalog_fd; }
|
||||||
|
|
||||||
FbString getMessage(int set_number, int message_number,
|
FbString getMessage(int set_number, int message_number,
|
||||||
const char *default_messsage = 0) const;
|
const char *default_messsage = 0, bool translate_fb = false) const;
|
||||||
|
|
||||||
void openCatalog(const char *catalog);
|
void openCatalog(const char *catalog);
|
||||||
private:
|
private:
|
||||||
I18n();
|
I18n();
|
||||||
~I18n();
|
~I18n();
|
||||||
std::string m_locale;
|
std::string m_locale;
|
||||||
bool m_multibyte;
|
bool m_multibyte, m_utf8_translate;
|
||||||
nl_catd m_catalog_fd;
|
nl_catd m_catalog_fd;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void NLSInit(const char *);
|
void NLSInit(const char *);
|
||||||
|
|
|
@ -660,7 +660,7 @@ void ImageControl::createColorTable() {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::ImageControl: "<<_FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X")<<endl;
|
cerr<<"FbTk::ImageControl: "<<_FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X")<<endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,8 +87,8 @@ bool ResourceManager::load(const char *filename) {
|
||||||
resource->setFromString(value.addr);
|
resource->setFromString(value.addr);
|
||||||
else {
|
else {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<_FBTKTEXT(Error, FailedRead, "Failed to read", "Couldn't load a resource (following)")<<": "<<resource->name()<<endl;
|
cerr<<_FBTK_CONSOLETEXT(Error, FailedRead, "Failed to read", "Couldn't load a resource (following)")<<": "<<resource->name()<<endl;
|
||||||
cerr<<_FBTKTEXT(Error, UsingDefault, "Setting default value", "Falling back to default value for resource")<<endl;
|
cerr<<_FBTK_CONSOLETEXT(Error, UsingDefault, "Setting default value", "Falling back to default value for resource")<<endl;
|
||||||
resource->setDefaultValue();
|
resource->setDefaultValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,12 +70,12 @@ TextureRender::TextureRender(ImageControl &imgctrl,
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
// clamp to "normal" size
|
// clamp to "normal" size
|
||||||
if (width > texture_max_width) {
|
if (width > texture_max_width) {
|
||||||
cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl;
|
cerr<<"TextureRender: "<<_FBTK_CONSOLETEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl;
|
||||||
width = texture_max_width;
|
width = texture_max_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (height > texture_max_height) {
|
if (height > texture_max_height) {
|
||||||
cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl;
|
cerr<<"TextureRender: "<<_FBTK_CONSOLETEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl;
|
||||||
height = texture_max_height;
|
height = texture_max_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void TextureRender::allocateColorTables() {
|
||||||
char sbuf[128];
|
char sbuf[128];
|
||||||
sprintf(sbuf, "%ld", (long int) size);
|
sprintf(sbuf, "%ld", (long int) size);
|
||||||
throw std::string("TextureRender::TextureRender(): " +
|
throw std::string("TextureRender::TextureRender(): " +
|
||||||
std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf));
|
std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void TextureRender::allocateColorTables() {
|
||||||
char sbuf[128];
|
char sbuf[128];
|
||||||
sprintf(sbuf, "%ld", (long int) size);
|
sprintf(sbuf, "%ld", (long int) size);
|
||||||
throw std::string("TextureRender::TextureRender(): " +
|
throw std::string("TextureRender::TextureRender(): " +
|
||||||
std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf));
|
std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
blue = FB_new_nothrow unsigned char[size];
|
blue = FB_new_nothrow unsigned char[size];
|
||||||
|
@ -137,7 +137,7 @@ void TextureRender::allocateColorTables() {
|
||||||
char sbuf[128];
|
char sbuf[128];
|
||||||
sprintf(sbuf, "%ld", (long int) size);
|
sprintf(sbuf, "%ld", (long int) size);
|
||||||
throw std::string("TextureRender::TextureRender(): " +
|
throw std::string("TextureRender::TextureRender(): " +
|
||||||
std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf));
|
std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ Pixmap TextureRender::renderSolid(const FbTk::Texture &texture) {
|
||||||
|
|
||||||
if (pixmap.drawable() == None) {
|
if (pixmap.drawable() == None) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::TextureRender::render_solid(): "<<_FBTKTEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
|
cerr<<"FbTk::TextureRender::render_solid(): "<<_FBTK_CONSOLETEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ XImage *TextureRender::renderXImage() {
|
||||||
|
|
||||||
if (! image) {
|
if (! image) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr << "FbTk::TextureRender::renderXImage(): " << _FBTKTEXT(Error, CreateXImage, "Can't create XImage", "Couldn't create an XImage") << "." << endl;
|
cerr << "FbTk::TextureRender::renderXImage(): " << _FBTK_CONSOLETEXT(Error, CreateXImage, "Can't create XImage", "Couldn't create an XImage") << "." << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +594,7 @@ XImage *TextureRender::renderXImage() {
|
||||||
default:
|
default:
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr << "TextureRender::renderXImage(): " <<
|
cerr << "TextureRender::renderXImage(): " <<
|
||||||
_FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
|
_FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
|
||||||
delete [] d;
|
delete [] d;
|
||||||
XDestroyImage(image);
|
XDestroyImage(image);
|
||||||
return (XImage *) 0;
|
return (XImage *) 0;
|
||||||
|
@ -697,7 +697,7 @@ XImage *TextureRender::renderXImage() {
|
||||||
default:
|
default:
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr << "TextureRender::renderXImage(): " <<
|
cerr << "TextureRender::renderXImage(): " <<
|
||||||
_FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
|
_FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
|
||||||
delete [] d;
|
delete [] d;
|
||||||
XDestroyImage(image);
|
XDestroyImage(image);
|
||||||
return (XImage *) 0;
|
return (XImage *) 0;
|
||||||
|
@ -716,7 +716,7 @@ Pixmap TextureRender::renderPixmap() {
|
||||||
|
|
||||||
if (pixmap.drawable() == None) {
|
if (pixmap.drawable() == None) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::TextureRender::renderPixmap(): "<<_FBTKTEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
|
cerr<<"FbTk::TextureRender::renderPixmap(): "<<_FBTK_CONSOLETEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ void ThemeManager::loadTheme(Theme &tm) {
|
||||||
if (!tm.fallback(*resource)) {
|
if (!tm.fallback(*resource)) {
|
||||||
if (verbose()) {
|
if (verbose()) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<_FBTKTEXT(Error, ThemeItem, "Failed to read theme item", "When reading a style, couldn't read a specific item (following)")<<": "<<resource->name()<<endl;
|
cerr<<_FBTK_CONSOLETEXT(Error, ThemeItem, "Failed to read theme item", "When reading a style, couldn't read a specific item (following)")<<": "<<resource->name()<<endl;
|
||||||
}
|
}
|
||||||
resource->setDefaultValue();
|
resource->setDefaultValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
|
||||||
PictFormatDepth | PictFormatAlphaMask,
|
PictFormatDepth | PictFormatAlphaMask,
|
||||||
&pic_format, 0);
|
&pic_format, 0);
|
||||||
if (format == 0) {
|
if (format == 0) {
|
||||||
cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderFormat, "Warning: Failed to find valid format for alpha.", "transparency requires a pict format, can't get one...")<<endl;
|
cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderFormat, "Warning: Failed to find valid format for alpha.", "transparency requires a pict format, can't get one...")<<endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
|
||||||
Pixmap alpha_pm = XCreatePixmap(disp, drawable,
|
Pixmap alpha_pm = XCreatePixmap(disp, drawable,
|
||||||
1, 1, 8);
|
1, 1, 8);
|
||||||
if (alpha_pm == 0) {
|
if (alpha_pm == 0) {
|
||||||
cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl;
|
cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
|
||||||
format, CPRepeat, &attr);
|
format, CPRepeat, &attr);
|
||||||
if (alpha_pic == 0) {
|
if (alpha_pic == 0) {
|
||||||
XFreePixmap(disp, alpha_pm);
|
XFreePixmap(disp, alpha_pm);
|
||||||
cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPicture, "Warning: Failed to create alpha picture.", "XRenderCreatePicture failed")<<endl;
|
cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPicture, "Warning: Failed to create alpha picture.", "XRenderCreatePicture failed")<<endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void Transparent::setDest(Drawable dest, int screen_num) {
|
||||||
if (format == 0) {
|
if (format == 0) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::Transparent: ";
|
cerr<<"FbTk::Transparent: ";
|
||||||
fprintf(stderr, _FBTKTEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
|
fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
|
||||||
cerr<<endl;
|
cerr<<endl;
|
||||||
}
|
}
|
||||||
m_dest_pic = XRenderCreatePicture(disp, dest, format, 0, 0);
|
m_dest_pic = XRenderCreatePicture(disp, dest, format, 0, 0);
|
||||||
|
@ -273,7 +273,7 @@ void Transparent::setSource(Drawable source, int screen_num) {
|
||||||
if (format == 0) {
|
if (format == 0) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<"FbTk::Transparent: ";
|
cerr<<"FbTk::Transparent: ";
|
||||||
fprintf(stderr, _FBTKTEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
|
fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
|
||||||
cerr<<endl;
|
cerr<<endl;
|
||||||
}
|
}
|
||||||
m_src_pic = XRenderCreatePicture(disp, m_source, format,
|
m_src_pic = XRenderCreatePicture(disp, m_source, format,
|
||||||
|
|
|
@ -149,7 +149,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
|
||||||
XRotFontStruct *rotfont = m_rotfonts[orient];
|
XRotFontStruct *rotfont = m_rotfonts[orient];
|
||||||
|
|
||||||
if (rotfont == 0) {
|
if (rotfont == 0) {
|
||||||
cerr<<"RotFont: "<<_FBTKTEXT(Error, OutOfMemory, "Out of memory", "Something couldn't allocate memory")<<endl;
|
cerr<<"RotFont: "<<_FBTK_CONSOLETEXT(Error, OutOfMemory, "Out of memory", "Something couldn't allocate memory")<<endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
|
||||||
vert_w, vert_h, 8, 0);
|
vert_w, vert_h, 8, 0);
|
||||||
|
|
||||||
if (I1 == None) {
|
if (I1 == None) {
|
||||||
cerr << "RotFont: " << _FBTKTEXT(Error, CreateXImage,
|
cerr << "RotFont: " << _FBTK_CONSOLETEXT(Error, CreateXImage,
|
||||||
"Can't create XImage",
|
"Can't create XImage",
|
||||||
"XCreateImage failed for some reason")
|
"XCreateImage failed for some reason")
|
||||||
<< "." << endl;
|
<< "." << endl;
|
||||||
|
@ -257,7 +257,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
|
||||||
(char *)bitdata, bit_w, bit_h, 8, 0);
|
(char *)bitdata, bit_w, bit_h, 8, 0);
|
||||||
|
|
||||||
if (I2 == None) {
|
if (I2 == None) {
|
||||||
cerr << "XFontImp: " <<_FBTKTEXT(Error, CreateXImage,
|
cerr << "XFontImp: " <<_FBTK_CONSOLETEXT(Error, CreateXImage,
|
||||||
"Can't create XImage",
|
"Can't create XImage",
|
||||||
"XCreateImage failed for some reason")
|
"XCreateImage failed for some reason")
|
||||||
<< "." << endl;
|
<< "." << endl;
|
||||||
|
|
|
@ -167,7 +167,7 @@ void Gnome::updateClientList(BScreen &screen) {
|
||||||
Window *wl = new Window[num];
|
Window *wl = new Window[num];
|
||||||
if (wl == 0) {
|
if (wl == 0) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<_FBTEXT(Gnome, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for GNOME client list", "")<<endl;
|
cerr<<_FB_CONSOLETEXT(Gnome, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for GNOME client list", "")<<endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ IconMenu::IconMenu(BScreen &screen):
|
||||||
getLayer(Layer::MENU)) {
|
getLayer(Layer::MENU)) {
|
||||||
|
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
setLabel(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"));
|
setLabel(_FB_XTEXT(Menu, Icons, "Icons", "Iconic windows menu title"));
|
||||||
screen.iconListSig().attach(this);
|
screen.iconListSig().attach(this);
|
||||||
updateItems(*this, screen);
|
updateItems(*this, screen);
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,65 +243,65 @@ void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) {
|
||||||
using namespace FbTk;
|
using namespace FbTk;
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
menu.setLabel(_FBTEXT(Toolbar, IconbarMode, "Iconbar Mode", "Menu title - chooses which set of icons are shown in the iconbar"));
|
menu.setLabel(_FB_XTEXT(Toolbar, IconbarMode, "Iconbar Mode", "Menu title - chooses which set of icons are shown in the iconbar"));
|
||||||
|
|
||||||
RefCount<Command> saverc_cmd(new FbCommands::SaveResources());
|
RefCount<Command> saverc_cmd(new FbCommands::SaveResources());
|
||||||
|
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(_FBTEXT(Toolbar, IconbarModeNone,
|
menu.insert(new ToolbarModeMenuItem(_FB_XTEXT(Toolbar, IconbarModeNone,
|
||||||
"None", "No icons are shown in the iconbar"),
|
"None", "No icons are shown in the iconbar"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::NONE, saverc_cmd));
|
IconbarTool::NONE, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeIcons,
|
_FB_XTEXT(Toolbar, IconbarModeIcons,
|
||||||
"Icons", "Iconified windows from all workspaces are shown"),
|
"Icons", "Iconified windows from all workspaces are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::ICONS, saverc_cmd));
|
IconbarTool::ICONS, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeNoIcons,
|
_FB_XTEXT(Toolbar, IconbarModeNoIcons,
|
||||||
"NoIcons", "No iconified windows from all workspaces are shown"),
|
"NoIcons", "No iconified windows from all workspaces are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::NOICONS, saverc_cmd));
|
IconbarTool::NOICONS, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeWorkspaceIcons,
|
_FB_XTEXT(Toolbar, IconbarModeWorkspaceIcons,
|
||||||
"WorkspaceIcons", "Iconified windows from this workspace are shown"),
|
"WorkspaceIcons", "Iconified windows from this workspace are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::WORKSPACEICONS, saverc_cmd));
|
IconbarTool::WORKSPACEICONS, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeWorkspaceNoIcons,
|
_FB_XTEXT(Toolbar, IconbarModeWorkspaceNoIcons,
|
||||||
"WorkspaceNoIcons", "No iconified windows from this workspace are shown"),
|
"WorkspaceNoIcons", "No iconified windows from this workspace are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::WORKSPACENOICONS, saverc_cmd));
|
IconbarTool::WORKSPACENOICONS, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeWorkspace,
|
_FB_XTEXT(Toolbar, IconbarModeWorkspace,
|
||||||
"Workspace", "Normal and iconified windows from this workspace are shown"),
|
"Workspace", "Normal and iconified windows from this workspace are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::WORKSPACE, saverc_cmd));
|
IconbarTool::WORKSPACE, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarModeMenuItem(
|
menu.insert(new ToolbarModeMenuItem(
|
||||||
_FBTEXT(Toolbar, IconbarModeAllWindows, "All Windows", "All windows are shown"),
|
_FB_XTEXT(Toolbar, IconbarModeAllWindows, "All Windows", "All windows are shown"),
|
||||||
handler,
|
handler,
|
||||||
IconbarTool::ALLWINDOWS, saverc_cmd));
|
IconbarTool::ALLWINDOWS, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new FbTk::MenuSeparator());
|
menu.insert(new FbTk::MenuSeparator());
|
||||||
|
|
||||||
menu.insert(new ToolbarAlignMenuItem(
|
menu.insert(new ToolbarAlignMenuItem(
|
||||||
_FBTEXT(Align, Left, "Left", "Align to the left"),
|
_FB_XTEXT(Align, Left, "Left", "Align to the left"),
|
||||||
handler,
|
handler,
|
||||||
Container::LEFT, saverc_cmd));
|
Container::LEFT, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarAlignMenuItem(
|
menu.insert(new ToolbarAlignMenuItem(
|
||||||
_FBTEXT(Align, Relative, "Relative", "Align relative to the width"),
|
_FB_XTEXT(Align, Relative, "Relative", "Align relative to the width"),
|
||||||
handler,
|
handler,
|
||||||
Container::RELATIVE, saverc_cmd));
|
Container::RELATIVE, saverc_cmd));
|
||||||
|
|
||||||
menu.insert(new ToolbarAlignMenuItem(
|
menu.insert(new ToolbarAlignMenuItem(
|
||||||
_FBTEXT(Align, Right, "Right", "Align to the right"),
|
_FB_XTEXT(Align, Right, "Right", "Align to the right"),
|
||||||
handler,
|
handler,
|
||||||
Container::RIGHT, saverc_cmd));
|
Container::RIGHT, saverc_cmd));
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScr
|
||||||
save_and_reconfig->add(reconfig);
|
save_and_reconfig->add(reconfig);
|
||||||
save_and_reconfig->add(save);
|
save_and_reconfig->add(save);
|
||||||
RefCount<Command> s_and_reconfig(save_and_reconfig);
|
RefCount<Command> s_and_reconfig(save_and_reconfig);
|
||||||
m_menu.insert(new BoolMenuItem(_FBTEXT(Toolbar, ShowIcons, "Show Pictures", "chooses if little icons are shown next to title in the iconbar") ,
|
m_menu.insert(new BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons, "Show Pictures", "chooses if little icons are shown next to title in the iconbar") ,
|
||||||
*m_rc_use_pixmap, s_and_reconfig));
|
*m_rc_use_pixmap, s_and_reconfig));
|
||||||
m_menu.updateMenu();
|
m_menu.updateMenu();
|
||||||
// must be internal menu, otherwise toolbar main menu tries to delete it.
|
// must be internal menu, otherwise toolbar main menu tries to delete it.
|
||||||
|
|
10
src/Keys.cc
10
src/Keys.cc
|
@ -226,7 +226,7 @@ bool Keys::addBinding(const std::string &linebuffer) {
|
||||||
key = FbTk::KeyUtil::getKey(val[argc].c_str());
|
key = FbTk::KeyUtil::getKey(val[argc].c_str());
|
||||||
|
|
||||||
if (key == 0) {
|
if (key == 0) {
|
||||||
cerr<<_FBTEXT(Keys, InvalidKeyMod,
|
cerr<<_FB_CONSOLETEXT(Keys, InvalidKeyMod,
|
||||||
"Keys: Invalid key/modifier on line",
|
"Keys: Invalid key/modifier on line",
|
||||||
"A bad key/modifier string was found on line (number following)")<<" "<<
|
"A bad key/modifier string was found on line (number following)")<<" "<<
|
||||||
m_current_line<<"): "<<linebuffer<<endl;
|
m_current_line<<"): "<<linebuffer<<endl;
|
||||||
|
@ -244,7 +244,7 @@ bool Keys::addBinding(const std::string &linebuffer) {
|
||||||
|
|
||||||
} else { // parse command line
|
} else { // parse command line
|
||||||
if (last_key == 0) {
|
if (last_key == 0) {
|
||||||
cerr<<_FBTEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
cerr<<_FB_CONSOLETEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
||||||
cerr<<"> "<<linebuffer<<endl;
|
cerr<<"> "<<linebuffer<<endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ bool Keys::addBinding(const std::string &linebuffer) {
|
||||||
FbTk::StringUtil::strcasestr(linebuffer.c_str(),
|
FbTk::StringUtil::strcasestr(linebuffer.c_str(),
|
||||||
val[argc].c_str() + 1); // +1 to skip ':'
|
val[argc].c_str() + 1); // +1 to skip ':'
|
||||||
if (str == 0) {
|
if (str == 0) {
|
||||||
cerr<<_FBTEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
cerr<<_FB_CONSOLETEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
||||||
cerr<<"> "<<linebuffer<<endl;
|
cerr<<"> "<<linebuffer<<endl;
|
||||||
ret_val = false;
|
ret_val = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -261,14 +261,14 @@ bool Keys::addBinding(const std::string &linebuffer) {
|
||||||
last_key->m_command = CommandParser::instance().parseLine(str);
|
last_key->m_command = CommandParser::instance().parseLine(str);
|
||||||
|
|
||||||
if (*last_key->m_command == 0) {
|
if (*last_key->m_command == 0) {
|
||||||
cerr<<_FBTEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
cerr<<_FB_CONSOLETEXT(Keys, BadLine, "Keys: Error on line", "Error on line (number following)")<<": "<<m_current_line<<endl;
|
||||||
cerr<<"> "<<linebuffer<<endl;
|
cerr<<"> "<<linebuffer<<endl;
|
||||||
} else {
|
} else {
|
||||||
// need to change keymode here so it doesn't get changed by CommandParser
|
// need to change keymode here so it doesn't get changed by CommandParser
|
||||||
m_keylist = m_map[keyMode];
|
m_keylist = m_map[keyMode];
|
||||||
// Add the keychain to list
|
// Add the keychain to list
|
||||||
if (!mergeTree(current_key)) {
|
if (!mergeTree(current_key)) {
|
||||||
cerr<<_FBTEXT(Keys, BadMerge, "Keys: Failed to merge keytree!", "relatively technical error message. Key bindings are stored in a tree structure")<<endl;
|
cerr<<_FB_CONSOLETEXT(Keys, BadMerge, "Keys: Failed to merge keytree!", "relatively technical error message. Key bindings are stored in a tree structure")<<endl;
|
||||||
ret_val = false;
|
ret_val = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,12 @@ LayerMenu::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
||||||
int layernum;
|
int layernum;
|
||||||
} layer_menuitems[] = {
|
} layer_menuitems[] = {
|
||||||
//TODO: nls
|
//TODO: nls
|
||||||
{0, 0, _FBTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), Layer::ABOVE_DOCK},
|
{0, 0, _FB_XTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), Layer::ABOVE_DOCK},
|
||||||
{0, 0, _FBTEXT(Layer, Dock, "Dock", "Layer dock"), Layer::DOCK},
|
{0, 0, _FB_XTEXT(Layer, Dock, "Dock", "Layer dock"), Layer::DOCK},
|
||||||
{0, 0, _FBTEXT(Layer, Top, "Top", "Layer top"), Layer::TOP},
|
{0, 0, _FB_XTEXT(Layer, Top, "Top", "Layer top"), Layer::TOP},
|
||||||
{0, 0, _FBTEXT(Layer, Normal, "Normal", "Layer normal"), Layer::NORMAL},
|
{0, 0, _FB_XTEXT(Layer, Normal, "Normal", "Layer normal"), Layer::NORMAL},
|
||||||
{0, 0, _FBTEXT(Layer, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM},
|
{0, 0, _FB_XTEXT(Layer, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM},
|
||||||
{0, 0, _FBTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
|
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
|
||||||
};
|
};
|
||||||
|
|
||||||
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
|
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
|
||||||
|
|
|
@ -193,13 +193,13 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
|
||||||
if (submenu == 0)
|
if (submenu == 0)
|
||||||
return;
|
return;
|
||||||
if (str_label.empty())
|
if (str_label.empty())
|
||||||
menu.insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"));
|
menu.insert(_FB_XTEXT(Menu, Icons, "Icons", "Iconic windows menu title"));
|
||||||
else
|
else
|
||||||
menu.insert(str_label, submenu);
|
menu.insert(str_label, submenu);
|
||||||
} else if (str_key == "exit") { // exit
|
} else if (str_key == "exit") { // exit
|
||||||
FbTk::RefCount<FbTk::Command> exit_cmd(CommandParser::instance().parseLine("exit"));
|
FbTk::RefCount<FbTk::Command> exit_cmd(CommandParser::instance().parseLine("exit"));
|
||||||
if (str_label.empty())
|
if (str_label.empty())
|
||||||
menu.insert(_FBTEXT(Menu, Exit, "Exit", "Exit Command"), exit_cmd);
|
menu.insert(_FB_XTEXT(Menu, Exit, "Exit", "Exit Command"), exit_cmd);
|
||||||
else
|
else
|
||||||
menu.insert(str_label, exit_cmd);
|
menu.insert(str_label, exit_cmd);
|
||||||
} else if (str_key == "exec") {
|
} else if (str_key == "exec") {
|
||||||
|
@ -319,10 +319,10 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
|
||||||
// special NLS default labels
|
// special NLS default labels
|
||||||
if (str_label.empty()) {
|
if (str_label.empty()) {
|
||||||
if (str_key == "reconfig" || str_key == "reconfigure") {
|
if (str_key == "reconfig" || str_key == "reconfigure") {
|
||||||
menu.insert(_FBTEXT(Menu, Reconfigure, "Reload Config", "Reload all the configs"), command);
|
menu.insert(_FB_XTEXT(Menu, Reconfigure, "Reload Config", "Reload all the configs"), command);
|
||||||
return;
|
return;
|
||||||
} else if (str_key == "restart") {
|
} else if (str_key == "restart") {
|
||||||
menu.insert(_FBTEXT(Menu, Restart, "Restart", "Restart Command"), command);
|
menu.insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart Command"), command);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
|
|
||||||
if (type == "shade") {
|
if (type == "shade") {
|
||||||
RefCmd shade_cmd(new WindowCmd<void>(&FluxboxWindow::shade));
|
RefCmd shade_cmd(new WindowCmd<void>(&FluxboxWindow::shade));
|
||||||
menu.insert(label.empty()?_FBTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label, shade_cmd);
|
menu.insert(label.empty()?_FB_XTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label, shade_cmd);
|
||||||
} else if (type == "maximize") {
|
} else if (type == "maximize") {
|
||||||
RefCmd maximize_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeFull));
|
RefCmd maximize_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeFull));
|
||||||
RefCmd maximize_vert_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeVertical));
|
RefCmd maximize_vert_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeVertical));
|
||||||
|
@ -498,7 +498,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
FbTk::MultiButtonMenuItem *maximize_item =
|
FbTk::MultiButtonMenuItem *maximize_item =
|
||||||
new FbTk::MultiButtonMenuItem(3,
|
new FbTk::MultiButtonMenuItem(3,
|
||||||
label.empty()?
|
label.empty()?
|
||||||
_FBTEXT(Windowmenu, Maximize,
|
_FB_XTEXT(Windowmenu, Maximize,
|
||||||
"Maximize", "Maximize the window"):
|
"Maximize", "Maximize the window"):
|
||||||
label);
|
label);
|
||||||
// create maximize item with:
|
// create maximize item with:
|
||||||
|
@ -512,37 +512,37 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
} else if (type == "iconify") {
|
} else if (type == "iconify") {
|
||||||
RefCmd iconify_cmd(new WindowCmd<void>(&FluxboxWindow::iconify));
|
RefCmd iconify_cmd(new WindowCmd<void>(&FluxboxWindow::iconify));
|
||||||
menu.insert(label.empty() ?
|
menu.insert(label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Iconify,
|
_FB_XTEXT(Windowmenu, Iconify,
|
||||||
"Iconify", "Iconify the window") :
|
"Iconify", "Iconify the window") :
|
||||||
label, iconify_cmd);
|
label, iconify_cmd);
|
||||||
} else if (type == "close") {
|
} else if (type == "close") {
|
||||||
RefCmd close_cmd(new WindowCmd<void>(&FluxboxWindow::close));
|
RefCmd close_cmd(new WindowCmd<void>(&FluxboxWindow::close));
|
||||||
menu.insert(label.empty() ?
|
menu.insert(label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Close,
|
_FB_XTEXT(Windowmenu, Close,
|
||||||
"Close", "Close the window") :
|
"Close", "Close the window") :
|
||||||
label, close_cmd);
|
label, close_cmd);
|
||||||
} else if (type == "kill" || type == "killwindow") {
|
} else if (type == "kill" || type == "killwindow") {
|
||||||
RefCmd kill_cmd(new WindowCmd<void>(&FluxboxWindow::kill));
|
RefCmd kill_cmd(new WindowCmd<void>(&FluxboxWindow::kill));
|
||||||
menu.insert(label.empty() ?
|
menu.insert(label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Kill,
|
_FB_XTEXT(Windowmenu, Kill,
|
||||||
"Kill", "Kill the window"):
|
"Kill", "Kill the window"):
|
||||||
label, kill_cmd);
|
label, kill_cmd);
|
||||||
} else if (type == "lower") {
|
} else if (type == "lower") {
|
||||||
RefCmd lower_cmd(new WindowCmd<void>(&FluxboxWindow::lower));
|
RefCmd lower_cmd(new WindowCmd<void>(&FluxboxWindow::lower));
|
||||||
menu.insert( label.empty() ?
|
menu.insert( label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Lower,
|
_FB_XTEXT(Windowmenu, Lower,
|
||||||
"Lower", "Lower the window"):
|
"Lower", "Lower the window"):
|
||||||
label, lower_cmd);
|
label, lower_cmd);
|
||||||
} else if (type == "raise") {
|
} else if (type == "raise") {
|
||||||
RefCmd raise_cmd(new WindowCmd<void>(&FluxboxWindow::raise));
|
RefCmd raise_cmd(new WindowCmd<void>(&FluxboxWindow::raise));
|
||||||
menu.insert(label.empty() ?
|
menu.insert(label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Raise,
|
_FB_XTEXT(Windowmenu, Raise,
|
||||||
"Raise", "Raise the window"):
|
"Raise", "Raise the window"):
|
||||||
label, raise_cmd);
|
label, raise_cmd);
|
||||||
} else if (type == "stick") {
|
} else if (type == "stick") {
|
||||||
RefCmd stick_cmd(new WindowCmd<void>(&FluxboxWindow::stick));
|
RefCmd stick_cmd(new WindowCmd<void>(&FluxboxWindow::stick));
|
||||||
menu.insert(label.empty() ?
|
menu.insert(label.empty() ?
|
||||||
_FBTEXT(Windowmenu, Stick,
|
_FB_XTEXT(Windowmenu, Stick,
|
||||||
"Stick", "Stick the window"):
|
"Stick", "Stick the window"):
|
||||||
label, stick_cmd);
|
label, stick_cmd);
|
||||||
} else if (type == "extramenus") {
|
} else if (type == "extramenus") {
|
||||||
|
@ -555,7 +555,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type == "sendto") {
|
} else if (type == "sendto") {
|
||||||
menu.insert(label.empty() ? _FBTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"):
|
menu.insert(label.empty() ? _FB_XTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"):
|
||||||
label, new SendToMenu(*Fluxbox::instance()->findScreen(menu.screenNumber())));
|
label, new SendToMenu(*Fluxbox::instance()->findScreen(menu.screenNumber())));
|
||||||
} else if (type == "layer") {
|
} else if (type == "layer") {
|
||||||
BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
|
BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
|
||||||
|
@ -570,7 +570,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
&context,
|
&context,
|
||||||
false);
|
false);
|
||||||
submenu->disableTitle();
|
submenu->disableTitle();
|
||||||
menu.insert(label.empty()?_FBTEXT(Windowmenu, Layer, "Layer ...", "Layer menu"):label, submenu);
|
menu.insert(label.empty()?_FB_XTEXT(Windowmenu, Layer, "Layer ...", "Layer menu"):label, submenu);
|
||||||
|
|
||||||
|
|
||||||
} else if (type == "separator") {
|
} else if (type == "separator") {
|
||||||
|
|
|
@ -64,7 +64,7 @@ m_regex(0) {
|
||||||
errstr = new char[size];
|
errstr = new char[size];
|
||||||
|
|
||||||
regerror(ret, m_regex, errstr, size);
|
regerror(ret, m_regex, errstr, size);
|
||||||
cerr<<_FBTEXT(Fluxbox, ErrorRegexp, "Error parsing regular expression", "Error parsing regular expression (following)")<<": "<<errstr<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, ErrorRegexp, "Error parsing regular expression", "Error parsing regular expression (following)")<<": "<<errstr<<endl;
|
||||||
delete [] errstr;
|
delete [] errstr;
|
||||||
delete m_regex; // I don't think I regfree a failed compile?
|
delete m_regex; // I don't think I regfree a failed compile?
|
||||||
m_regex = 0;
|
m_regex = 0;
|
||||||
|
|
|
@ -129,25 +129,25 @@ FbTk::Menu *createRememberMenu(BScreen &screen) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Workspace, "Workspace", "Remember Workspace"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Workspace, "Workspace", "Remember Workspace"),
|
||||||
Remember::REM_WORKSPACE));
|
Remember::REM_WORKSPACE));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, JumpToWorkspace, "Jump to workspace", "Change active workspace to remembered one on open"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, JumpToWorkspace, "Jump to workspace", "Change active workspace to remembered one on open"),
|
||||||
Remember::REM_JUMPWORKSPACE));
|
Remember::REM_JUMPWORKSPACE));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Head, "Head", "Remember Head"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Head, "Head", "Remember Head"),
|
||||||
Remember::REM_HEAD));
|
Remember::REM_HEAD));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Dimensions, "Dimensions", "Remember Dimensions - with width and height"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Dimensions, "Dimensions", "Remember Dimensions - with width and height"),
|
||||||
Remember::REM_DIMENSIONS));
|
Remember::REM_DIMENSIONS));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Position, "Position", "Remember position - window co-ordinates"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Position, "Position", "Remember position - window co-ordinates"),
|
||||||
Remember::REM_POSITION));
|
Remember::REM_POSITION));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Sticky, "Sticky", "Remember Sticky"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Sticky, "Sticky", "Remember Sticky"),
|
||||||
Remember::REM_STUCKSTATE));
|
Remember::REM_STUCKSTATE));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Decorations, "Decorations", "Remember window decorations"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Decorations, "Decorations", "Remember window decorations"),
|
||||||
Remember::REM_DECOSTATE));
|
Remember::REM_DECOSTATE));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Shaded, "Shaded", "Remember shaded"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Shaded, "Shaded", "Remember shaded"),
|
||||||
Remember::REM_SHADEDSTATE));
|
Remember::REM_SHADEDSTATE));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, Layer, "Layer", "Remember Layer"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, Layer, "Layer", "Remember Layer"),
|
||||||
Remember::REM_LAYER));
|
Remember::REM_LAYER));
|
||||||
menu->insert(new RememberMenuItem(_FBTEXT(Remember, SaveOnClose, "Save on close", "Save remembered attributes on close"),
|
menu->insert(new RememberMenuItem(_FB_XTEXT(Remember, SaveOnClose, "Save on close", "Save remembered attributes on close"),
|
||||||
Remember::REM_SAVEONCLOSE));
|
Remember::REM_SAVEONCLOSE));
|
||||||
|
|
||||||
menu->updateMenu();
|
menu->updateMenu();
|
||||||
|
@ -463,7 +463,7 @@ int Remember::parseApp(std::ifstream &file, Application &app, std::string *first
|
||||||
} else if (strcasecmp(str_key.c_str(), "end") == 0) {
|
} else if (strcasecmp(str_key.c_str(), "end") == 0) {
|
||||||
return row;
|
return row;
|
||||||
} else {
|
} else {
|
||||||
cerr << _FBTEXT(Remember, Unknown, "Unknown apps key", "apps entry type not known")<<" = " << str_key << endl;
|
cerr << _FB_CONSOLETEXT(Remember, Unknown, "Unknown apps key", "apps entry type not known")<<" = " << str_key << endl;
|
||||||
}
|
}
|
||||||
if (had_error) {
|
if (had_error) {
|
||||||
cerr<<"Error parsing apps entry: ("<<line<<")"<<endl;
|
cerr<<"Error parsing apps entry: ("<<line<<")"<<endl;
|
||||||
|
@ -1083,7 +1083,7 @@ void Remember::updateClientClose(WinClient &winclient) {
|
||||||
void Remember::initForScreen(BScreen &screen) {
|
void Remember::initForScreen(BScreen &screen) {
|
||||||
// All windows get the remember menu.
|
// All windows get the remember menu.
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
screen.addExtraWindowMenu(_FBTEXT(Remember, MenuItemName, "Remember...", "Remember item in menu"),
|
screen.addExtraWindowMenu(_FB_XTEXT(Remember, MenuItemName, "Remember...", "Remember item in menu"),
|
||||||
createRememberMenu(screen));
|
createRememberMenu(screen));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ void RootTheme::reconfigTheme() {
|
||||||
|
|
||||||
if (!m_background_loaded) {
|
if (!m_background_loaded) {
|
||||||
cerr<<"Fluxbox: "<<
|
cerr<<"Fluxbox: "<<
|
||||||
_FBTEXT(Common, BackgroundWarning,
|
_FB_CONSOLETEXT(Common, BackgroundWarning,
|
||||||
"There is no background option specified in this style."
|
"There is no background option specified in this style."
|
||||||
" Please consult the manual or read the FAQ.",
|
" Please consult the manual or read the FAQ.",
|
||||||
"Background missing warning")<<endl;
|
"Background missing warning")<<endl;
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace {
|
||||||
|
|
||||||
int anotherWMRunning(Display *display, XErrorEvent *) {
|
int anotherWMRunning(Display *display, XErrorEvent *) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
cerr<<_FBTEXT(Screen, AnotherWMRunning,
|
cerr<<_FB_CONSOLETEXT(Screen, AnotherWMRunning,
|
||||||
"BScreen::BScreen: an error occured while querying the X server.\n"
|
"BScreen::BScreen: an error occured while querying the X server.\n"
|
||||||
" another window manager already running on display ",
|
" another window manager already running on display ",
|
||||||
"Message when another WM is found already active on all screens")
|
"Message when another WM is found already active on all screens")
|
||||||
|
@ -360,7 +360,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
|
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
fprintf(stderr, _FBTEXT(Screen, ManagingScreen,
|
fprintf(stderr, _FB_CONSOLETEXT(Screen, ManagingScreen,
|
||||||
"BScreen::BScreen: managing screen %d "
|
"BScreen::BScreen: managing screen %d "
|
||||||
"using visual 0x%lx, depth %d\n",
|
"using visual 0x%lx, depth %d\n",
|
||||||
"informational message saying screen number (%d), visual (%lx), and colour depth (%d)").c_str(),
|
"informational message saying screen number (%d), visual (%lx), and colour depth (%d)").c_str(),
|
||||||
|
@ -428,7 +428,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
// own resources we must do this.
|
// own resources we must do this.
|
||||||
fluxbox->load_rc(*this);
|
fluxbox->load_rc(*this);
|
||||||
|
|
||||||
m_configmenu.reset(createMenu(_FBTEXT(Menu, Configuration,
|
m_configmenu.reset(createMenu(_FB_XTEXT(Menu, Configuration,
|
||||||
"Configuration", "Title of configuration menu")));
|
"Configuration", "Title of configuration menu")));
|
||||||
setupConfigmenu(*m_configmenu.get());
|
setupConfigmenu(*m_configmenu.get());
|
||||||
m_configmenu->setInternalMenu();
|
m_configmenu->setInternalMenu();
|
||||||
|
@ -1525,15 +1525,15 @@ void BScreen::initMenu() {
|
||||||
|
|
||||||
if (m_rootmenu.get() == 0) {
|
if (m_rootmenu.get() == 0) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
m_rootmenu.reset(createMenu(_FBTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu")));
|
m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu")));
|
||||||
FbTk::RefCount<FbTk::Command> restart_fb(CommandParser::instance().parseLine("restart"));
|
FbTk::RefCount<FbTk::Command> restart_fb(CommandParser::instance().parseLine("restart"));
|
||||||
FbTk::RefCount<FbTk::Command> exit_fb(CommandParser::instance().parseLine("exit"));
|
FbTk::RefCount<FbTk::Command> exit_fb(CommandParser::instance().parseLine("exit"));
|
||||||
FbTk::RefCount<FbTk::Command> execute_xterm(CommandParser::instance().parseLine("exec xterm"));
|
FbTk::RefCount<FbTk::Command> execute_xterm(CommandParser::instance().parseLine("exec xterm"));
|
||||||
m_rootmenu->setInternalMenu();
|
m_rootmenu->setInternalMenu();
|
||||||
m_rootmenu->insert("xterm", execute_xterm);
|
m_rootmenu->insert("xterm", execute_xterm);
|
||||||
m_rootmenu->insert(_FBTEXT(Menu, Restart, "Restart", "Restart command"),
|
m_rootmenu->insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart command"),
|
||||||
restart_fb);
|
restart_fb);
|
||||||
m_rootmenu->insert(_FBTEXT(Menu, Exit, "Exit", "Exit command"),
|
m_rootmenu->insert(_FB_XTEXT(Menu, Exit, "Exit", "Exit command"),
|
||||||
exit_fb);
|
exit_fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1587,16 +1587,16 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
// create focus menu
|
// create focus menu
|
||||||
// we don't set this to internal menu so will
|
// we don't set this to internal menu so will
|
||||||
// be deleted toghether with the parent
|
// be deleted toghether with the parent
|
||||||
FbTk::FbString focusmenu_label = _FBTEXT(Configmenu, FocusModel,
|
FbTk::FbString focusmenu_label = _FB_XTEXT(Configmenu, FocusModel,
|
||||||
"Focus Model",
|
"Focus Model",
|
||||||
"Method used to give focus to windows");
|
"Method used to give focus to windows");
|
||||||
FbTk::Menu *focus_menu = createMenu(focusmenu_label);
|
FbTk::Menu *focus_menu = createMenu(focusmenu_label);
|
||||||
|
|
||||||
#define _BOOLITEM(m,a, b, c, d, e, f) (m).insert(new BoolMenuItem(_FBTEXT(a, b, c, d), e, f))
|
#define _BOOLITEM(m,a, b, c, d, e, f) (m).insert(new BoolMenuItem(_FB_XTEXT(a, b, c, d), e, f))
|
||||||
|
|
||||||
|
|
||||||
#define _FOCUSITEM(a, b, c, d, e) \
|
#define _FOCUSITEM(a, b, c, d, e) \
|
||||||
focus_menu->insert(new FocusModelMenuItem(_FBTEXT(a, b, c, d), focusControl(), \
|
focus_menu->insert(new FocusModelMenuItem(_FB_XTEXT(a, b, c, d), focusControl(), \
|
||||||
e, save_and_reconfigure))
|
e, save_and_reconfigure))
|
||||||
|
|
||||||
_FOCUSITEM(Configmenu, ClickFocus,
|
_FOCUSITEM(Configmenu, ClickFocus,
|
||||||
|
@ -1615,7 +1615,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
save_and_reconfigure));
|
save_and_reconfigure));
|
||||||
|
|
||||||
|
|
||||||
focus_menu->insert(new BoolMenuItem(_FBTEXT(Configmenu,
|
focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu,
|
||||||
AutoRaise,
|
AutoRaise,
|
||||||
"Auto Raise",
|
"Auto Raise",
|
||||||
"Auto Raise windows on sloppy"),
|
"Auto Raise windows on sloppy"),
|
||||||
|
@ -1630,11 +1630,11 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
|
|
||||||
// BEGIN tab menu
|
// BEGIN tab menu
|
||||||
|
|
||||||
FbTk::FbString tabmenu_label = _FBTEXT(Configmenu, TabMenu,
|
FbTk::FbString tabmenu_label = _FB_XTEXT(Configmenu, TabMenu,
|
||||||
"Tab Options",
|
"Tab Options",
|
||||||
"heading for tab-related options");
|
"heading for tab-related options");
|
||||||
FbTk::Menu *tab_menu = createMenu(tabmenu_label);
|
FbTk::Menu *tab_menu = createMenu(tabmenu_label);
|
||||||
FbTk::FbString tabplacement_label = _FBTEXT(Menu, Placement, "Placement", "Title of Placement menu");
|
FbTk::FbString tabplacement_label = _FB_XTEXT(Menu, Placement, "Placement", "Title of Placement menu");
|
||||||
FbTk::Menu *tabplacement_menu = createToggleMenu(tabplacement_label);
|
FbTk::Menu *tabplacement_menu = createToggleMenu(tabplacement_label);
|
||||||
|
|
||||||
tab_menu->insert(tabplacement_label, tabplacement_menu);
|
tab_menu->insert(tabplacement_label, tabplacement_menu);
|
||||||
|
@ -1644,7 +1644,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
*resource.default_internal_tabs, save_and_reconftabs);
|
*resource.default_internal_tabs, save_and_reconftabs);
|
||||||
|
|
||||||
FbTk::MenuItem *tab_width_item =
|
FbTk::MenuItem *tab_width_item =
|
||||||
new IntResMenuItem(_FBTEXT(Configmenu, ExternalTabWidth,
|
new IntResMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth,
|
||||||
"External Tab Width",
|
"External Tab Width",
|
||||||
"Width of external-style tabs"),
|
"Width of external-style tabs"),
|
||||||
resource.tab_width, 10, 3000, /* silly number */
|
resource.tab_width, 10, 3000, /* silly number */
|
||||||
|
@ -1658,14 +1658,14 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
Placements place_menu;
|
Placements place_menu;
|
||||||
|
|
||||||
// menu is 2 wide, 2 down
|
// menu is 2 wide, 2 down
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopLeft, "Top Left", "Top Left"), FbWinFrame::TOPLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopLeft, "Top Left", "Top Left"), FbWinFrame::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftTop, "Left Top", "Left Top"), FbWinFrame::LEFTTOP));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftTop, "Left Top", "Left Top"), FbWinFrame::LEFTTOP));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftBottom, "Left Bottom", "Left Bottom"), FbWinFrame::LEFTBOTTOM));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftBottom, "Left Bottom", "Left Bottom"), FbWinFrame::LEFTBOTTOM));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), FbWinFrame::BOTTOMLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), FbWinFrame::BOTTOMLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopRight, "Top Right", "Top Right"), FbWinFrame::TOPRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopRight, "Top Right", "Top Right"), FbWinFrame::TOPRIGHT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightTop, "Right Top", "Right Top"), FbWinFrame::RIGHTTOP));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightTop, "Right Top", "Right Top"), FbWinFrame::RIGHTTOP));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightBottom, "Right Bottom", "Right Bottom"), FbWinFrame::RIGHTBOTTOM));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightBottom, "Right Bottom", "Right Bottom"), FbWinFrame::RIGHTBOTTOM));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), FbWinFrame::BOTTOMRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), FbWinFrame::BOTTOMRIGHT));
|
||||||
|
|
||||||
tabplacement_menu->setMinimumSublevels(2);
|
tabplacement_menu->setMinimumSublevels(2);
|
||||||
// create items in sub menu
|
// create items in sub menu
|
||||||
|
@ -1733,20 +1733,20 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
if (FbTk::Transparent::haveRender() ||
|
if (FbTk::Transparent::haveRender() ||
|
||||||
FbTk::Transparent::haveComposite()) {
|
FbTk::Transparent::haveComposite()) {
|
||||||
|
|
||||||
FbTk::FbString alphamenu_label = _FBTEXT(Configmenu, Transparency,
|
FbTk::FbString alphamenu_label = _FB_XTEXT(Configmenu, Transparency,
|
||||||
"Transparency",
|
"Transparency",
|
||||||
"Menu containing various transparency options");
|
"Menu containing various transparency options");
|
||||||
FbTk::Menu *alpha_menu = createMenu(alphamenu_label);
|
FbTk::Menu *alpha_menu = createMenu(alphamenu_label);
|
||||||
|
|
||||||
if (FbTk::Transparent::haveComposite(true)) {
|
if (FbTk::Transparent::haveComposite(true)) {
|
||||||
alpha_menu->insert(new BoolMenuItem(_FBTEXT(Configmenu, ForcePseudoTrans,
|
alpha_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, ForcePseudoTrans,
|
||||||
"Force Pseudo-Transparency",
|
"Force Pseudo-Transparency",
|
||||||
"When composite is available, still use old pseudo-transparency"),
|
"When composite is available, still use old pseudo-transparency"),
|
||||||
Fluxbox::instance()->getPseudoTrans(), save_and_reconfigure));
|
Fluxbox::instance()->getPseudoTrans(), save_and_reconfigure));
|
||||||
}
|
}
|
||||||
|
|
||||||
FbTk::MenuItem *focused_alpha_item =
|
FbTk::MenuItem *focused_alpha_item =
|
||||||
new IntResMenuItem(_FBTEXT(Configmenu, FocusedAlpha,
|
new IntResMenuItem(_FB_XTEXT(Configmenu, FocusedAlpha,
|
||||||
"Focused Window Alpha",
|
"Focused Window Alpha",
|
||||||
"Transparency level of the focused window"),
|
"Transparency level of the focused window"),
|
||||||
resource.focused_alpha, 0, 255, *alpha_menu);
|
resource.focused_alpha, 0, 255, *alpha_menu);
|
||||||
|
@ -1754,7 +1754,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
alpha_menu->insert(focused_alpha_item);
|
alpha_menu->insert(focused_alpha_item);
|
||||||
|
|
||||||
FbTk::MenuItem *unfocused_alpha_item =
|
FbTk::MenuItem *unfocused_alpha_item =
|
||||||
new IntResMenuItem(_FBTEXT(Configmenu,
|
new IntResMenuItem(_FB_XTEXT(Configmenu,
|
||||||
UnfocusedAlpha,
|
UnfocusedAlpha,
|
||||||
"Unfocused Window Alpha",
|
"Unfocused Window Alpha",
|
||||||
"Transparency level of unfocused windows"),
|
"Transparency level of unfocused windows"),
|
||||||
|
@ -1764,7 +1764,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
alpha_menu->insert(unfocused_alpha_item);
|
alpha_menu->insert(unfocused_alpha_item);
|
||||||
|
|
||||||
FbTk::MenuItem *menu_alpha_item =
|
FbTk::MenuItem *menu_alpha_item =
|
||||||
new IntResMenuItem(_FBTEXT(Configmenu, MenuAlpha,
|
new IntResMenuItem(_FB_XTEXT(Configmenu, MenuAlpha,
|
||||||
"Menu Alpha", "Transparency level of menu"),
|
"Menu Alpha", "Transparency level of menu"),
|
||||||
resource.menu_alpha, 0, 255, *alpha_menu);
|
resource.menu_alpha, 0, 255, *alpha_menu);
|
||||||
menu_alpha_item->setCommand(saverc_cmd);
|
menu_alpha_item->setCommand(saverc_cmd);
|
||||||
|
@ -1862,7 +1862,7 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
sprintf(label,
|
sprintf(label,
|
||||||
_FBTEXT(Screen, GeometryFormat,
|
_FB_XTEXT(Screen, GeometryFormat,
|
||||||
"W: %4d x H: %4d",
|
"W: %4d x H: %4d",
|
||||||
"Format for width and height window, %4d for width, and %4d for height").c_str(),
|
"Format for width and height window, %4d for width, and %4d for height").c_str(),
|
||||||
gx, gy);
|
gx, gy);
|
||||||
|
@ -1929,7 +1929,7 @@ void BScreen::renderGeomWindow() {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
sprintf(label,
|
sprintf(label,
|
||||||
_FBTEXT(Screen, GeometryFormat,
|
_FB_XTEXT(Screen, GeometryFormat,
|
||||||
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(),
|
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(),
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
|
|
54
src/Slit.cc
54
src/Slit.cc
|
@ -219,8 +219,8 @@ public:
|
||||||
std::string reallabel = m_label + " " +
|
std::string reallabel = m_label + " " +
|
||||||
( m_slit.direction() == Slit::HORIZONTAL ?
|
( m_slit.direction() == Slit::HORIZONTAL ?
|
||||||
|
|
||||||
_FBTEXT(Align, Horizontal, "Horizontal", "Horizontal"):
|
_FB_XTEXT(Align, Horizontal, "Horizontal", "Horizontal"):
|
||||||
_FBTEXT(Align, Vertical, "Vertical", "Vertical"));
|
_FB_XTEXT(Align, Vertical, "Vertical", "Vertical"));
|
||||||
FbTk::MenuItem::setLabel(reallabel);
|
FbTk::MenuItem::setLabel(reallabel);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
@ -294,7 +294,7 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
|
||||||
scr.resizeSig().attach(this);
|
scr.resizeSig().attach(this);
|
||||||
scr.reconfigureSig().attach(this); // if alpha changed (we disablethis signal when we get theme change sig)
|
scr.reconfigureSig().attach(this); // if alpha changed (we disablethis signal when we get theme change sig)
|
||||||
|
|
||||||
scr.addConfigMenu(_FBTEXT(Slit, Slit, "Slit", "The Slit"), m_slitmenu);
|
scr.addConfigMenu(_FB_XTEXT(Slit, Slit, "Slit", "The Slit"), m_slitmenu);
|
||||||
|
|
||||||
frame.pixmap = None;
|
frame.pixmap = None;
|
||||||
// move the frame out of sight for a moment
|
// move the frame out of sight for a moment
|
||||||
|
@ -322,7 +322,7 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
|
||||||
getLayer(Layer::MENU),
|
getLayer(Layer::MENU),
|
||||||
this,
|
this,
|
||||||
true));
|
true));
|
||||||
m_layermenu->setLabel(_FBTEXT(Slit, Layer, "Slit Layer", "Title of Slit Layer Menu"));
|
m_layermenu->setLabel(_FB_XTEXT(Slit, Layer, "Slit Layer", "Title of Slit Layer Menu"));
|
||||||
|
|
||||||
moveToLayer((*m_rc_layernum).getNum());
|
moveToLayer((*m_rc_layernum).getNum());
|
||||||
|
|
||||||
|
@ -1162,12 +1162,12 @@ void Slit::updateClientmenu() {
|
||||||
|
|
||||||
// clear old items
|
// clear old items
|
||||||
m_clientlist_menu.removeAll();
|
m_clientlist_menu.removeAll();
|
||||||
m_clientlist_menu.setLabel(_FBTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"));
|
m_clientlist_menu.setLabel(_FB_XTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"));
|
||||||
|
|
||||||
FbTk::RefCount<FbTk::Command> cycle_up(new FbTk::SimpleCommand<Slit>(*this, &Slit::cycleClientsUp));
|
FbTk::RefCount<FbTk::Command> cycle_up(new FbTk::SimpleCommand<Slit>(*this, &Slit::cycleClientsUp));
|
||||||
FbTk::RefCount<FbTk::Command> cycle_down(new FbTk::SimpleCommand<Slit>(*this, &Slit::cycleClientsDown));
|
FbTk::RefCount<FbTk::Command> cycle_down(new FbTk::SimpleCommand<Slit>(*this, &Slit::cycleClientsDown));
|
||||||
m_clientlist_menu.insert(_FBTEXT(Slit, CycleUp, "Cycle Up", "Cycle clients upwards"), cycle_up);
|
m_clientlist_menu.insert(_FB_XTEXT(Slit, CycleUp, "Cycle Up", "Cycle clients upwards"), cycle_up);
|
||||||
m_clientlist_menu.insert(_FBTEXT(Slit, CycleDown, "Cycle Down", "Cycle clients downwards"), cycle_down);
|
m_clientlist_menu.insert(_FB_XTEXT(Slit, CycleDown, "Cycle Down", "Cycle clients downwards"), cycle_down);
|
||||||
|
|
||||||
m_clientlist_menu.insert(new FbTk::MenuSeparator());
|
m_clientlist_menu.insert(new FbTk::MenuSeparator());
|
||||||
|
|
||||||
|
@ -1180,7 +1180,7 @@ void Slit::updateClientmenu() {
|
||||||
|
|
||||||
m_clientlist_menu.insert(new FbTk::MenuSeparator());
|
m_clientlist_menu.insert(new FbTk::MenuSeparator());
|
||||||
FbTk::RefCount<FbTk::Command> savecmd(new FbTk::SimpleCommand<Slit>(*this, &Slit::saveClientList));
|
FbTk::RefCount<FbTk::Command> savecmd(new FbTk::SimpleCommand<Slit>(*this, &Slit::saveClientList));
|
||||||
m_clientlist_menu.insert(_FBTEXT(Slit,
|
m_clientlist_menu.insert(_FB_XTEXT(Slit,
|
||||||
SaveSlitList,
|
SaveSlitList,
|
||||||
"Save SlitList", "Saves the current order in the slit"),
|
"Save SlitList", "Saves the current order in the slit"),
|
||||||
savecmd);
|
savecmd);
|
||||||
|
@ -1242,37 +1242,37 @@ void Slit::setupMenu() {
|
||||||
|
|
||||||
|
|
||||||
// setup base menu
|
// setup base menu
|
||||||
m_slitmenu.setLabel(_FBTEXT(Slit, Slit, "Slit", "The Slit"));
|
m_slitmenu.setLabel(_FB_XTEXT(Slit, Slit, "Slit", "The Slit"));
|
||||||
m_slitmenu.insert(_FBTEXT(Menu, Placement, "Placement", "Title of Placement menu"),
|
m_slitmenu.insert(_FB_XTEXT(Menu, Placement, "Placement", "Title of Placement menu"),
|
||||||
placement_menu);
|
placement_menu);
|
||||||
|
|
||||||
m_slitmenu.insert(_FBTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), m_layermenu.get());
|
m_slitmenu.insert(_FB_XTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), m_layermenu.get());
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (screen().hasXinerama()) {
|
if (screen().hasXinerama()) {
|
||||||
m_slitmenu.insert(_FBTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"),
|
m_slitmenu.insert(_FB_XTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"),
|
||||||
new XineramaHeadMenu<Slit>(
|
new XineramaHeadMenu<Slit>(
|
||||||
screen().menuTheme(),
|
screen().menuTheme(),
|
||||||
screen(),
|
screen(),
|
||||||
screen().imageControl(),
|
screen().imageControl(),
|
||||||
*screen().layerManager().getLayer(::Layer::MENU),
|
*screen().layerManager().getLayer(::Layer::MENU),
|
||||||
*this,
|
*this,
|
||||||
_FBTEXT(Slit, OnHead, "Slit on Head", "Title of Slits On Head menu")
|
_FB_XTEXT(Slit, OnHead, "Slit on Head", "Title of Slits On Head menu")
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
#endif //XINERAMA
|
#endif //XINERAMA
|
||||||
|
|
||||||
m_slitmenu.insert(new BoolMenuItem(_FBTEXT(Common, AutoHide, "Auto hide", "This thing automatically hides when not close by"),
|
m_slitmenu.insert(new BoolMenuItem(_FB_XTEXT(Common, AutoHide, "Auto hide", "This thing automatically hides when not close by"),
|
||||||
*m_rc_auto_hide,
|
*m_rc_auto_hide,
|
||||||
save_and_reconfigure_slit));
|
save_and_reconfigure_slit));
|
||||||
|
|
||||||
m_slitmenu.insert(new BoolMenuItem(_FBTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"),
|
m_slitmenu.insert(new BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"),
|
||||||
*m_rc_maximize_over,
|
*m_rc_maximize_over,
|
||||||
save_and_reconfigure_slit));
|
save_and_reconfigure_slit));
|
||||||
|
|
||||||
// this saves resources and clears the slit window to update alpha value
|
// this saves resources and clears the slit window to update alpha value
|
||||||
FbTk::MenuItem *alpha_menuitem =
|
FbTk::MenuItem *alpha_menuitem =
|
||||||
new IntResMenuItem(_FBTEXT(Common, Alpha, "Alpha", "Transparency level"),
|
new IntResMenuItem(_FB_XTEXT(Common, Alpha, "Alpha", "Transparency level"),
|
||||||
m_rc_alpha,
|
m_rc_alpha,
|
||||||
0, 255, m_slitmenu);
|
0, 255, m_slitmenu);
|
||||||
// setup command for alpha value
|
// setup command for alpha value
|
||||||
|
@ -1285,14 +1285,14 @@ void Slit::setupMenu() {
|
||||||
|
|
||||||
m_slitmenu.insert(alpha_menuitem);
|
m_slitmenu.insert(alpha_menuitem);
|
||||||
|
|
||||||
m_slitmenu.insert(new SlitDirMenuItem(_FBTEXT(Slit, Direction, "Slit Direction", "Orientation of slit"),
|
m_slitmenu.insert(new SlitDirMenuItem(_FB_XTEXT(Slit, Direction, "Slit Direction", "Orientation of slit"),
|
||||||
*this,
|
*this,
|
||||||
save_and_reconfigure));
|
save_and_reconfigure));
|
||||||
m_slitmenu.insert(_FBTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"), &m_clientlist_menu);
|
m_slitmenu.insert(_FB_XTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"), &m_clientlist_menu);
|
||||||
m_slitmenu.updateMenu();
|
m_slitmenu.updateMenu();
|
||||||
|
|
||||||
// setup sub menu
|
// setup sub menu
|
||||||
placement_menu->setLabel(_FBTEXT(Slit, Placement, "Slit Placement", "Slit Placement"));
|
placement_menu->setLabel(_FB_XTEXT(Slit, Placement, "Slit Placement", "Slit Placement"));
|
||||||
placement_menu->setMinimumSublevels(3);
|
placement_menu->setMinimumSublevels(3);
|
||||||
m_layermenu->setInternalMenu();
|
m_layermenu->setInternalMenu();
|
||||||
m_clientlist_menu.setInternalMenu();
|
m_clientlist_menu.setInternalMenu();
|
||||||
|
@ -1303,15 +1303,15 @@ void Slit::setupMenu() {
|
||||||
Placements place_menu;
|
Placements place_menu;
|
||||||
|
|
||||||
// menu is 3 wide, 5 down
|
// menu is 3 wide, 5 down
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopLeft, "Top Left", "Top Left"), Slit::TOPLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopLeft, "Top Left", "Top Left"), Slit::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftCenter, "Left Center", "Left Center"), Slit::LEFTCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftCenter, "Left Center", "Left Center"), Slit::LEFTCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), Slit::BOTTOMLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), Slit::BOTTOMLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopCenter, "Top Center", "Top Center"), Slit::TOPCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopCenter, "Top Center", "Top Center"), Slit::TOPCENTER));
|
||||||
place_menu.push_back(PlacementP("", Slit::TOPLEFT));
|
place_menu.push_back(PlacementP("", Slit::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomCenter, "Bottom Center", "Bottom Center"), Slit::BOTTOMCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomCenter, "Bottom Center", "Bottom Center"), Slit::BOTTOMCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopRight, "Top Right", "Top Right"), Slit::TOPRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopRight, "Top Right", "Top Right"), Slit::TOPRIGHT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightCenter, "Right Center", "Right Center"), Slit::RIGHTCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightCenter, "Right Center", "Right Center"), Slit::RIGHTCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), Slit::BOTTOMRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), Slit::BOTTOMRIGHT));
|
||||||
|
|
||||||
|
|
||||||
// create items in sub menu
|
// create items in sub menu
|
||||||
|
|
|
@ -247,15 +247,15 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
|
||||||
|
|
||||||
moveToLayer((*m_rc_layernum).getNum());
|
moveToLayer((*m_rc_layernum).getNum());
|
||||||
|
|
||||||
m_layermenu.setLabel(_FBTEXT(Toolbar, Layer, "Toolbar Layer", "Title of toolbar layer menu"));
|
m_layermenu.setLabel(_FB_XTEXT(Toolbar, Layer, "Toolbar Layer", "Title of toolbar layer menu"));
|
||||||
m_placementmenu.setLabel(_FBTEXT(Toolbar, Placement, "Toolbar Placement", "Title of toolbar placement menu"));
|
m_placementmenu.setLabel(_FB_XTEXT(Toolbar, Placement, "Toolbar Placement", "Title of toolbar placement menu"));
|
||||||
|
|
||||||
m_layermenu.setInternalMenu();
|
m_layermenu.setInternalMenu();
|
||||||
m_placementmenu.setInternalMenu();
|
m_placementmenu.setInternalMenu();
|
||||||
m_toolbarmenu.setInternalMenu();
|
m_toolbarmenu.setInternalMenu();
|
||||||
setupMenus();
|
setupMenus();
|
||||||
// add menu to screen
|
// add menu to screen
|
||||||
screen().addConfigMenu(_FBTEXT(Toolbar, Toolbar, "Toolbar", "title of toolbar menu item"), menu());
|
screen().addConfigMenu(_FB_XTEXT(Toolbar, Toolbar, "Toolbar", "title of toolbar menu item"), menu());
|
||||||
|
|
||||||
// geometry settings
|
// geometry settings
|
||||||
frame.width = width;
|
frame.width = width;
|
||||||
|
@ -808,7 +808,7 @@ void Toolbar::setupMenus() {
|
||||||
typedef RefCount<Command> RefCommand;
|
typedef RefCount<Command> RefCommand;
|
||||||
typedef SimpleCommand<Toolbar> ToolbarCommand;
|
typedef SimpleCommand<Toolbar> ToolbarCommand;
|
||||||
|
|
||||||
menu().setLabel(_FBTEXT(Toolbar, Toolbar,
|
menu().setLabel(_FB_XTEXT(Toolbar, Toolbar,
|
||||||
"Toolbar", "Title of Toolbar menu"));
|
"Toolbar", "Title of Toolbar menu"));
|
||||||
|
|
||||||
RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure));
|
RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure));
|
||||||
|
@ -824,17 +824,17 @@ void Toolbar::setupMenus() {
|
||||||
visible_macro->add(reconfig_toolbar);
|
visible_macro->add(reconfig_toolbar);
|
||||||
visible_macro->add(save_resources);
|
visible_macro->add(save_resources);
|
||||||
RefCommand toggle_visible_cmd(visible_macro);
|
RefCommand toggle_visible_cmd(visible_macro);
|
||||||
menu().insert(new BoolMenuItem(_FBTEXT(Common, Visible,
|
menu().insert(new BoolMenuItem(_FB_XTEXT(Common, Visible,
|
||||||
"Visible", "Whether this item is visible"),
|
"Visible", "Whether this item is visible"),
|
||||||
*m_rc_visible, toggle_visible_cmd));
|
*m_rc_visible, toggle_visible_cmd));
|
||||||
|
|
||||||
menu().insert(new BoolMenuItem(_FBTEXT(Common, AutoHide,
|
menu().insert(new BoolMenuItem(_FB_XTEXT(Common, AutoHide,
|
||||||
"Auto hide", "Toggle auto hide of toolbar"),
|
"Auto hide", "Toggle auto hide of toolbar"),
|
||||||
*m_rc_auto_hide,
|
*m_rc_auto_hide,
|
||||||
reconfig_toolbar_and_save_resource));
|
reconfig_toolbar_and_save_resource));
|
||||||
|
|
||||||
MenuItem *toolbar_menuitem =
|
MenuItem *toolbar_menuitem =
|
||||||
new IntResMenuItem(_FBTEXT(Toolbar, WidthPercent,
|
new IntResMenuItem(_FB_XTEXT(Toolbar, WidthPercent,
|
||||||
"Toolbar width percent",
|
"Toolbar width percent",
|
||||||
"Percentage of screen width taken by toolbar"),
|
"Percentage of screen width taken by toolbar"),
|
||||||
m_rc_width_percent,
|
m_rc_width_percent,
|
||||||
|
@ -844,21 +844,21 @@ void Toolbar::setupMenus() {
|
||||||
toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource);
|
toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource);
|
||||||
menu().insert(toolbar_menuitem);
|
menu().insert(toolbar_menuitem);
|
||||||
|
|
||||||
menu().insert(new BoolMenuItem(_FBTEXT(Common, MaximizeOver,
|
menu().insert(new BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,
|
||||||
"Maximize Over",
|
"Maximize Over",
|
||||||
"Maximize over this thing when maximizing"),
|
"Maximize over this thing when maximizing"),
|
||||||
*m_rc_maximize_over,
|
*m_rc_maximize_over,
|
||||||
reconfig_toolbar_and_save_resource));
|
reconfig_toolbar_and_save_resource));
|
||||||
menu().insert(_FBTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), &layerMenu());
|
menu().insert(_FB_XTEXT(Menu, Layer, "Layer...", "Title of Layer menu"), &layerMenu());
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (screen().hasXinerama()) {
|
if (screen().hasXinerama()) {
|
||||||
menu().insert(_FBTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"),
|
menu().insert(_FB_XTEXT(Menu, OnHead, "On Head...", "Title of On Head menu"),
|
||||||
new XineramaHeadMenu<Toolbar>(screen().menuTheme(),
|
new XineramaHeadMenu<Toolbar>(screen().menuTheme(),
|
||||||
screen(),
|
screen(),
|
||||||
screen().imageControl(),
|
screen().imageControl(),
|
||||||
*screen().layerManager().getLayer(::Layer::MENU),
|
*screen().layerManager().getLayer(::Layer::MENU),
|
||||||
*this,
|
*this,
|
||||||
_FBTEXT(Toolbar, OnHead, "Toolbar on Head",
|
_FB_XTEXT(Toolbar, OnHead, "Toolbar on Head",
|
||||||
"Title of toolbar on head menu")));
|
"Title of toolbar on head menu")));
|
||||||
}
|
}
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
|
@ -868,21 +868,21 @@ void Toolbar::setupMenus() {
|
||||||
Placements place_menu;
|
Placements place_menu;
|
||||||
|
|
||||||
// menu is 3 wide, 5 down
|
// menu is 3 wide, 5 down
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopLeft, "Top Left", "Top Left"), Toolbar::TOPLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopLeft, "Top Left", "Top Left"), Toolbar::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftTop, "Left Top", "Left Top"), Toolbar::LEFTTOP));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftTop, "Left Top", "Left Top"), Toolbar::LEFTTOP));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftCenter, "Left Center", "Left Center"), Toolbar::LEFTCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftCenter, "Left Center", "Left Center"), Toolbar::LEFTCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, LeftBottom, "Left Bottom", "Left Bottom"), Toolbar::LEFTBOTTOM));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, LeftBottom, "Left Bottom", "Left Bottom"), Toolbar::LEFTBOTTOM));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), Toolbar::BOTTOMLEFT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), Toolbar::BOTTOMLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopCenter, "Top Center", "Top Center"), Toolbar::TOPCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopCenter, "Top Center", "Top Center"), Toolbar::TOPCENTER));
|
||||||
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
place_menu.push_back(PlacementP("", Toolbar::TOPLEFT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomCenter, "Bottom Center", "Bottom Center"), Toolbar::BOTTOMCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomCenter, "Bottom Center", "Bottom Center"), Toolbar::BOTTOMCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, TopRight, "Top Right", "Top Right"), Toolbar::TOPRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, TopRight, "Top Right", "Top Right"), Toolbar::TOPRIGHT));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightTop, "Right Top", "Right Top"), Toolbar::RIGHTTOP));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightTop, "Right Top", "Right Top"), Toolbar::RIGHTTOP));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightCenter, "Right Center", "Right Center"), Toolbar::RIGHTCENTER));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightCenter, "Right Center", "Right Center"), Toolbar::RIGHTCENTER));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, RightBottom, "Right Bottom", "Right Bottom"), Toolbar::RIGHTBOTTOM));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, RightBottom, "Right Bottom", "Right Bottom"), Toolbar::RIGHTBOTTOM));
|
||||||
place_menu.push_back(PlacementP(_FBTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), Toolbar::BOTTOMRIGHT));
|
place_menu.push_back(PlacementP(_FB_XTEXT(Align, BottomRight, "Bottom Right", "Bottom Right"), Toolbar::BOTTOMRIGHT));
|
||||||
|
|
||||||
|
|
||||||
placementMenu().setMinimumSublevels(3);
|
placementMenu().setMinimumSublevels(3);
|
||||||
|
@ -901,13 +901,13 @@ void Toolbar::setupMenus() {
|
||||||
}
|
}
|
||||||
place_menu.pop_front();
|
place_menu.pop_front();
|
||||||
}
|
}
|
||||||
menu().insert(_FBTEXT(Menu, Placement, "Placement", "Title of Placement menu"), &placementMenu());
|
menu().insert(_FB_XTEXT(Menu, Placement, "Placement", "Title of Placement menu"), &placementMenu());
|
||||||
placementMenu().updateMenu();
|
placementMenu().updateMenu();
|
||||||
|
|
||||||
|
|
||||||
// this saves resources and clears the slit window to update alpha value
|
// this saves resources and clears the slit window to update alpha value
|
||||||
FbTk::MenuItem *alpha_menuitem =
|
FbTk::MenuItem *alpha_menuitem =
|
||||||
new IntResMenuItem(_FBTEXT(Common, Alpha, "Alpha", "Transparency level"),
|
new IntResMenuItem(_FB_XTEXT(Common, Alpha, "Alpha", "Transparency level"),
|
||||||
m_rc_alpha,
|
m_rc_alpha,
|
||||||
0, 255, menu());
|
0, 255, menu());
|
||||||
// setup command for alpha value
|
// setup command for alpha value
|
||||||
|
|
|
@ -374,10 +374,9 @@ void Workspace::setName(const std::string &name) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
char tname[128];
|
char tname[128];
|
||||||
sprintf(tname,
|
sprintf(tname,
|
||||||
_FBTEXT(Workspace, DefaultNameFormat,
|
_FB_XTEXT(Workspace, DefaultNameFormat,
|
||||||
"Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(),
|
"Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(),
|
||||||
m_id + 1); //m_id starts at 0
|
m_id + 1); //m_id starts at 0
|
||||||
m_name = FbTk::FbStringUtil::LocaleStrToFb(tname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
screen().updateWorkspaceNamesAtom();
|
screen().updateWorkspaceNamesAtom();
|
||||||
|
|
|
@ -115,8 +115,8 @@ void WorkspaceMenu::init(BScreen &screen) {
|
||||||
|
|
||||||
removeAll();
|
removeAll();
|
||||||
|
|
||||||
setLabel(_FBTEXT(Workspace, MenuTitle, "Workspaces", "Title of main workspace menu"));
|
setLabel(_FB_XTEXT(Workspace, MenuTitle, "Workspaces", "Title of main workspace menu"));
|
||||||
insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"),
|
insert(_FB_XTEXT(Menu, Icons, "Icons", "Iconic windows menu title"),
|
||||||
MenuCreator::createMenuType("iconmenu", screen.screenNumber()));
|
MenuCreator::createMenuType("iconmenu", screen.screenNumber()));
|
||||||
insert(new FbTk::MenuSeparator());
|
insert(new FbTk::MenuSeparator());
|
||||||
// for each workspace add workspace name and it's menu to our workspace menu
|
// for each workspace add workspace name and it's menu to our workspace menu
|
||||||
|
@ -150,11 +150,11 @@ void WorkspaceMenu::init(BScreen &screen) {
|
||||||
RefCount<Command> start_edit(CommandParser::instance().parseLine("setworkspacenamedialog"));
|
RefCount<Command> start_edit(CommandParser::instance().parseLine("setworkspacenamedialog"));
|
||||||
|
|
||||||
insert(new FbTk::MenuSeparator());
|
insert(new FbTk::MenuSeparator());
|
||||||
insert(_FBTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"),
|
insert(_FB_XTEXT(Workspace, NewWorkspace, "New Workspace", "Add a new workspace"),
|
||||||
new_workspace_cmd);
|
new_workspace_cmd);
|
||||||
insert(_FBTEXT(Toolbar, EditWkspcName, "Edit current workspace name", "Edit current workspace name"),
|
insert(_FB_XTEXT(Toolbar, EditWkspcName, "Edit current workspace name", "Edit current workspace name"),
|
||||||
start_edit);
|
start_edit);
|
||||||
insert(_FBTEXT(Workspace, RemoveLast, "Remove Last", "Remove the last workspace"),
|
insert(_FB_XTEXT(Workspace, RemoveLast, "Remove Last", "Remove the last workspace"),
|
||||||
remove_last_cmd);
|
remove_last_cmd);
|
||||||
|
|
||||||
updateMenu();
|
updateMenu();
|
||||||
|
|
|
@ -70,11 +70,11 @@ FbTk::FbString getWMName(Window window) {
|
||||||
XFree(text_prop.value);
|
XFree(text_prop.value);
|
||||||
|
|
||||||
} else { // default name
|
} else { // default name
|
||||||
name = FbTk::FbStringUtil::LocaleStrToFb(_FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"));
|
name = _FB_XTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// default name
|
// default name
|
||||||
name = FbTk::FbStringUtil::LocaleStrToFb(_FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"));
|
name = _FB_XTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME");
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
|
|
|
@ -234,10 +234,10 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
|
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
if (s_singleton != 0)
|
if (s_singleton != 0)
|
||||||
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!");
|
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!");
|
||||||
|
|
||||||
if (display() == 0) {
|
if (display() == 0) {
|
||||||
throw _FBTEXT(Fluxbox, NoDisplay,
|
throw _FB_CONSOLETEXT(Fluxbox, NoDisplay,
|
||||||
"Can not connect to X server.\nMake sure you started X before you start Fluxbox.",
|
"Can not connect to X server.\nMake sure you started X before you start Fluxbox.",
|
||||||
"Error message when no X display appears to exist");
|
"Error message when no X display appears to exist");
|
||||||
}
|
}
|
||||||
|
@ -312,10 +312,10 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
setupConfigFiles();
|
setupConfigFiles();
|
||||||
|
|
||||||
if (! XSupportsLocale())
|
if (! XSupportsLocale())
|
||||||
cerr<<_FBTEXT(Fluxbox, WarningLocale, "Warning: X server does not support locale", "XSupportsLocale returned false")<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, WarningLocale, "Warning: X server does not support locale", "XSupportsLocale returned false")<<endl;
|
||||||
|
|
||||||
if (XSetLocaleModifiers("") == 0)
|
if (XSetLocaleModifiers("") == 0)
|
||||||
cerr<<_FBTEXT(Fluxbox, WarningLocaleModifiers, "Warning: cannot set locale modifiers", "XSetLocaleModifiers returned false")<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, WarningLocaleModifiers, "Warning: cannot set locale modifiers", "XSetLocaleModifiers returned false")<<endl;
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_GETPID
|
#ifdef HAVE_GETPID
|
||||||
|
@ -335,7 +335,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
for (i = 1; i < m_argc; i++) {
|
for (i = 1; i < m_argc; i++) {
|
||||||
if (! strcmp(m_argv[i], "-screen")) {
|
if (! strcmp(m_argv[i], "-screen")) {
|
||||||
if ((++i) >= m_argc) {
|
if ((++i) >= m_argc) {
|
||||||
cerr << _FBTEXT(main, ScreenRequiresArg, "error, -screen requires argument", "the -screen option requires a file argument") << endl;
|
cerr << _FB_CONSOLETEXT(main, ScreenRequiresArg, "error, -screen requires argument", "the -screen option requires a file argument") << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
|
|
||||||
|
|
||||||
if (m_screen_list.empty()) {
|
if (m_screen_list.empty()) {
|
||||||
throw _FBTEXT(Fluxbox, ErrorNoScreens,
|
throw _FB_CONSOLETEXT(Fluxbox, ErrorNoScreens,
|
||||||
"Couldn't find screens to manage.\nMake sure you don't have another window manager running.",
|
"Couldn't find screens to manage.\nMake sure you don't have another window manager running.",
|
||||||
"Error message when no unmanaged screens found - usually means another window manager is running");
|
"Error message when no unmanaged screens found - usually means another window manager is running");
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ void Fluxbox::setupConfigFiles() {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
// create directory with perm 700
|
// create directory with perm 700
|
||||||
if (mkdir(dirname.c_str(), 0700)) {
|
if (mkdir(dirname.c_str(), 0700)) {
|
||||||
fprintf(stderr, _FBTEXT(Fluxbox, ErrorCreatingDirectory,
|
fprintf(stderr, _FB_CONSOLETEXT(Fluxbox, ErrorCreatingDirectory,
|
||||||
"Can't create %s directory",
|
"Can't create %s directory",
|
||||||
"Can't create a directory, one %s for directory name").c_str(),
|
"Can't create a directory, one %s for directory name").c_str(),
|
||||||
dirname.c_str());
|
dirname.c_str());
|
||||||
|
@ -758,7 +758,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
screen = searchScreen(e->xmaprequest.parent);
|
screen = searchScreen(e->xmaprequest.parent);
|
||||||
|
|
||||||
if (screen == 0) {
|
if (screen == 0) {
|
||||||
cerr<<"Fluxbox "<<_FBTEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl;
|
cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl;
|
||||||
} else
|
} else
|
||||||
win = screen->createWindow(e->xmaprequest.window);
|
win = screen->createWindow(e->xmaprequest.window);
|
||||||
|
|
||||||
|
@ -1156,17 +1156,17 @@ void Fluxbox::handleSignal(int signum) {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_FBTEXT(BaseDisplay, SignalCaught, "%s: signal %d caught\n", "signal catch debug message. Include %s for command and %d for signal number").c_str(),
|
_FB_CONSOLETEXT(BaseDisplay, SignalCaught, "%s: signal %d caught\n", "signal catch debug message. Include %s for command and %d for signal number").c_str(),
|
||||||
m_argv[0], signum);
|
m_argv[0], signum);
|
||||||
|
|
||||||
if (! m_starting && ! re_enter) {
|
if (! m_starting && ! re_enter) {
|
||||||
re_enter = 1;
|
re_enter = 1;
|
||||||
cerr<<_FBTEXT(BaseDisplay, ShuttingDown, "Shutting Down\n", "Quitting because of signal, end with newline");
|
cerr<<_FB_CONSOLETEXT(BaseDisplay, ShuttingDown, "Shutting Down\n", "Quitting because of signal, end with newline");
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cerr<<_FBTEXT(BaseDisplay, Aborting, "Aborting... dumping core\n", "Aboring and dumping core, end with newline");
|
cerr<<_FB_CONSOLETEXT(BaseDisplay, Aborting, "Aborting... dumping core\n", "Aboring and dumping core, end with newline");
|
||||||
abort();
|
abort();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1455,7 +1455,7 @@ void Fluxbox::save_rc() {
|
||||||
m_resourcemanager.save(dbfile.c_str(), dbfile.c_str());
|
m_resourcemanager.save(dbfile.c_str(), dbfile.c_str());
|
||||||
m_screen_rm.save(dbfile.c_str(), dbfile.c_str());
|
m_screen_rm.save(dbfile.c_str(), dbfile.c_str());
|
||||||
} else
|
} else
|
||||||
cerr<<_FBTEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl;
|
||||||
|
|
||||||
ScreenList::iterator it = m_screen_list.begin();
|
ScreenList::iterator it = m_screen_list.begin();
|
||||||
ScreenList::iterator it_end = m_screen_list.end();
|
ScreenList::iterator it_end = m_screen_list.end();
|
||||||
|
@ -1521,14 +1521,14 @@ void Fluxbox::load_rc() {
|
||||||
|
|
||||||
if (!dbfile.empty()) {
|
if (!dbfile.empty()) {
|
||||||
if (!m_resourcemanager.load(dbfile.c_str())) {
|
if (!m_resourcemanager.load(dbfile.c_str())) {
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
if (!m_resourcemanager.load(DEFAULT_INITFILE))
|
if (!m_resourcemanager.load(DEFAULT_INITFILE))
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!m_resourcemanager.load(DEFAULT_INITFILE))
|
if (!m_resourcemanager.load(DEFAULT_INITFILE))
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_rc_menufile->empty())
|
if (m_rc_menufile->empty())
|
||||||
|
@ -1555,7 +1555,7 @@ void Fluxbox::load_rc() {
|
||||||
|
|
||||||
if (!Workspace::loadGroups(*m_rc_groupfile)) {
|
if (!Workspace::loadGroups(*m_rc_groupfile)) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadGroupFile, "Failed to load groupfile", "Couldn't load the groupfile")<<": "<<*m_rc_groupfile<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadGroupFile, "Failed to load groupfile", "Couldn't load the groupfile")<<": "<<*m_rc_groupfile<<endl;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1610,14 +1610,14 @@ void Fluxbox::load_rc(BScreen &screen) {
|
||||||
|
|
||||||
if (!dbfile.empty()) {
|
if (!dbfile.empty()) {
|
||||||
if (!m_screen_rm.load(dbfile.c_str())) {
|
if (!m_screen_rm.load(dbfile.c_str())) {
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFileTrying, "Retrying with", "Retrying rc file loading with (the following file)")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
if (!m_screen_rm.load(DEFAULT_INITFILE))
|
if (!m_screen_rm.load(DEFAULT_INITFILE))
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!m_screen_rm.load(DEFAULT_INITFILE))
|
if (!m_screen_rm.load(DEFAULT_INITFILE))
|
||||||
cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
150
src/main.cc
150
src/main.cc
|
@ -62,42 +62,85 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
void showInfo(ostream &ostr) {
|
void showInfo(ostream &ostr) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
ostr<<_FBTEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl;
|
||||||
|
|
||||||
if (strlen(svnversion()) > 0)
|
if (strlen(svnversion()) > 0)
|
||||||
ostr << _FBTEXT(Common, SvnRevision, "SVN Revision", "Revision number in SVN repositary") << ": " << svnversion() << endl;
|
ostr << _FB_CONSOLETEXT(Common, SvnRevision, "SVN Revision", "Revision number in SVN repositary") << ": " << svnversion() << endl;
|
||||||
#if defined(__DATE__) && defined(__TIME__)
|
#if defined(__DATE__) && defined(__TIME__)
|
||||||
ostr<<_FBTEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __fluxbox_compiler
|
#ifdef __fluxbox_compiler
|
||||||
ostr<<_FBTEXT(Common, Compiler, "Compiler", "Compiler used to build fluxbox")<<": "<<__fluxbox_compiler<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, Compiler, "Compiler", "Compiler used to build fluxbox")<<": "<<__fluxbox_compiler<<endl;
|
||||||
#endif // __fluxbox_compiler
|
#endif // __fluxbox_compiler
|
||||||
#ifdef __fluxbox_compiler_version
|
#ifdef __fluxbox_compiler_version
|
||||||
ostr<<_FBTEXT(Common, CompilerVersion, "Compiler version", "Compiler version used to build fluxbox")<<": "<<__fluxbox_compiler_version<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, CompilerVersion, "Compiler version", "Compiler version used to build fluxbox")<<": "<<__fluxbox_compiler_version<<endl;
|
||||||
#endif // __fluxbox_compiler_version
|
#endif // __fluxbox_compiler_version
|
||||||
|
|
||||||
ostr<<endl<<_FBTEXT(Common, Defaults, "Defaults", "Default values compiled in")<<":"<<endl;
|
ostr<<endl<<_FB_CONSOLETEXT(Common, Defaults, "Defaults", "Default values compiled in")<<":"<<endl;
|
||||||
|
|
||||||
ostr<<_FBTEXT(Common, DefaultMenuFile, " menu", "default menu file (right aligned - make sure same width as other default values)")<<": "<<DEFAULTMENU<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, DefaultMenuFile, " menu", "default menu file (right aligned - make sure same width as other default values)")<<": "<<DEFAULTMENU<<endl;
|
||||||
ostr<<_FBTEXT(Common, DefaultStyle, " style", "default style (right aligned - make sure same width as other default values)")<<": "<<DEFAULTSTYLE<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, DefaultStyle, " style", "default style (right aligned - make sure same width as other default values)")<<": "<<DEFAULTSTYLE<<endl;
|
||||||
|
|
||||||
ostr<<_FBTEXT(Common, DefaultKeyFile, " keys", "default key file (right aligned - make sure same width as other default values)")<<": "<<DEFAULTKEYSFILE<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, DefaultKeyFile, " keys", "default key file (right aligned - make sure same width as other default values)")<<": "<<DEFAULTKEYSFILE<<endl;
|
||||||
ostr<<_FBTEXT(Common, DefaultInitFile, " init", "default init file (right aligned - make sure same width as other default values)")<<": "<<DEFAULT_INITFILE<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, DefaultInitFile, " init", "default init file (right aligned - make sure same width as other default values)")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
|
|
||||||
#ifdef NLS
|
#ifdef NLS
|
||||||
ostr<<_FBTEXT(Common, DefaultLocalePath, " nls", "location for localization files (right aligned - make sure same width as other default values)")<<": "<<LOCALEPATH<<endl;
|
ostr<<_FB_CONSOLETEXT(Common, DefaultLocalePath, " nls", "location for localization files (right aligned - make sure same width as other default values)")<<": "<<LOCALEPATH<<endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char NOT[] = "-";
|
const char NOT[] = "-";
|
||||||
ostr<<endl<<
|
ostr<<endl<<
|
||||||
_FBTEXT(Common, CompiledOptions, "Compiled options", "Options used when compiled")
|
_FB_CONSOLETEXT(Common, CompiledOptions, "Compiled options", "Options used when compiled")
|
||||||
<<" ("<<NOT<<" => "<<
|
<<" ("<<NOT<<" => "<<
|
||||||
_FBTEXT(Common, Disabled, "disabled", "option is turned off")<<"): "<<endl<<
|
_FB_CONSOLETEXT(Common, Disabled, "disabled", "option is turned off")<<"): "<<endl<<
|
||||||
|
|
||||||
|
/**** NOTE: This list is in alphabetical order! ****/
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
NOT<<
|
NOT<<
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
"DEBUG"<<endl<<
|
"DEBUG"<<endl<<
|
||||||
|
|
||||||
|
#ifndef USE_NEWWMSPEC
|
||||||
|
NOT<<
|
||||||
|
#endif // USE_NEWWMSPEC
|
||||||
|
"EWMH"<<endl<<
|
||||||
|
|
||||||
|
#ifndef USE_GNOME
|
||||||
|
NOT<<
|
||||||
|
#endif // USE_GNOME
|
||||||
|
"GNOME"<<endl<<
|
||||||
|
|
||||||
|
#ifndef HAVE_IMLIB2
|
||||||
|
NOT<<
|
||||||
|
#endif // HAVE_IMLIB2
|
||||||
|
"IMLIB2"<<endl<<
|
||||||
|
|
||||||
|
#ifndef KDE
|
||||||
|
NOT<<
|
||||||
|
#endif // KDE
|
||||||
|
"KDE"<<endl<<
|
||||||
|
|
||||||
|
#ifndef NLS
|
||||||
|
NOT<<
|
||||||
|
#endif // NLS
|
||||||
|
"NLS"<<endl<<
|
||||||
|
|
||||||
|
#ifndef REMEMBER
|
||||||
|
NOT<<
|
||||||
|
#endif // REMEMBER
|
||||||
|
"REMEMBER"<<endl<<
|
||||||
|
|
||||||
|
#ifndef HAVE_XRENDER
|
||||||
|
NOT<<
|
||||||
|
#endif // HAVE_XRENDER
|
||||||
|
"RENDER"<<endl<<
|
||||||
|
|
||||||
|
#ifndef SHAPE
|
||||||
|
NOT<<
|
||||||
|
#endif // SHAPE
|
||||||
|
"SHAPE"<<endl<<
|
||||||
|
|
||||||
#ifndef SLIT
|
#ifndef SLIT
|
||||||
NOT<<
|
NOT<<
|
||||||
#endif // SLIT
|
#endif // SLIT
|
||||||
|
@ -108,60 +151,27 @@ void showInfo(ostream &ostr) {
|
||||||
#endif // USE_TOOLBAR
|
#endif // USE_TOOLBAR
|
||||||
"TOOLBAR"<<endl<<
|
"TOOLBAR"<<endl<<
|
||||||
|
|
||||||
#ifndef HAVE_XPM
|
|
||||||
NOT<<
|
|
||||||
#endif // HAVE_XPM
|
|
||||||
"XPM"<<endl<<
|
|
||||||
|
|
||||||
#ifndef HAVE_IMLIB2
|
|
||||||
NOT<<
|
|
||||||
#endif // HAVE_IMLIB2
|
|
||||||
"IMLIB2"<<endl<<
|
|
||||||
|
|
||||||
#ifndef USE_GNOME
|
|
||||||
NOT<<
|
|
||||||
#endif // USE_GNOME
|
|
||||||
"GNOME"<<endl<<
|
|
||||||
|
|
||||||
#ifndef KDE
|
|
||||||
NOT<<
|
|
||||||
#endif // KDE
|
|
||||||
"KDE"<<endl<<
|
|
||||||
|
|
||||||
#ifndef USE_NEWWMSPEC
|
|
||||||
NOT<<
|
|
||||||
#endif // USE_NEWWMSPEC
|
|
||||||
"EWMH"<<endl<<
|
|
||||||
|
|
||||||
#ifndef REMEMBER
|
|
||||||
NOT<<
|
|
||||||
#endif // REMEMBER
|
|
||||||
"REMEMBER"<<endl<<
|
|
||||||
|
|
||||||
#ifndef SHAPE
|
|
||||||
NOT<<
|
|
||||||
#endif // SHAPE
|
|
||||||
"SHAPE"<<endl<<
|
|
||||||
|
|
||||||
#ifndef USE_XFT
|
#ifndef USE_XFT
|
||||||
NOT<<
|
NOT<<
|
||||||
#endif // USE_XFT
|
#endif // USE_XFT
|
||||||
"XFT"<<endl<<
|
"XFT"<<endl<<
|
||||||
|
|
||||||
#ifndef USE_XMB
|
|
||||||
NOT<<
|
|
||||||
#endif // USE_XMB
|
|
||||||
"XMB"<<endl<<
|
|
||||||
|
|
||||||
#ifndef XINERAMA
|
#ifndef XINERAMA
|
||||||
NOT<<
|
NOT<<
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
"XINERAMA"<<endl<<
|
"XINERAMA"<<endl<<
|
||||||
|
|
||||||
#ifndef HAVE_XRENDER
|
#ifndef USE_XMB
|
||||||
NOT<<
|
NOT<<
|
||||||
#endif // HAVE_XRENDER
|
#endif // USE_XMB
|
||||||
"RENDER"<<endl<<
|
"XMB"<<endl<<
|
||||||
|
|
||||||
|
#ifndef HAVE_XPM
|
||||||
|
NOT<<
|
||||||
|
#endif // HAVE_XPM
|
||||||
|
"XPM"<<endl<<
|
||||||
|
|
||||||
|
|
||||||
endl;
|
endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +190,7 @@ int main(int argc, char **argv) {
|
||||||
// look for alternative rc file to use
|
// look for alternative rc file to use
|
||||||
|
|
||||||
if ((++i) >= argc) {
|
if ((++i) >= argc) {
|
||||||
cerr<<_FBTEXT(main, RCRequiresArg,
|
cerr<<_FB_CONSOLETEXT(main, RCRequiresArg,
|
||||||
"error: '-rc' requires an argument", "the -rc option requires a file argument")<<endl;;
|
"error: '-rc' requires an argument", "the -rc option requires a file argument")<<endl;;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -191,7 +201,7 @@ int main(int argc, char **argv) {
|
||||||
// set by the environment variable DISPLAY
|
// set by the environment variable DISPLAY
|
||||||
|
|
||||||
if ((++i) >= argc) {
|
if ((++i) >= argc) {
|
||||||
cerr<<_FBTEXT(main, DISPLAYRequiresArg,
|
cerr<<_FB_CONSOLETEXT(main, DISPLAYRequiresArg,
|
||||||
"error: '-display' requires an argument",
|
"error: '-display' requires an argument",
|
||||||
"")<<endl;
|
"")<<endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -200,7 +210,7 @@ int main(int argc, char **argv) {
|
||||||
session_display = argv[i];
|
session_display = argv[i];
|
||||||
std::string display_env = "DISPLAY=" + session_display;
|
std::string display_env = "DISPLAY=" + session_display;
|
||||||
if (putenv(const_cast<char *>(display_env.c_str()))) {
|
if (putenv(const_cast<char *>(display_env.c_str()))) {
|
||||||
cerr<<_FBTEXT(main, WarnDisplayEnv,
|
cerr<<_FB_CONSOLETEXT(main, WarnDisplayEnv,
|
||||||
"warning: couldn't set environment variable 'DISPLAY'",
|
"warning: couldn't set environment variable 'DISPLAY'",
|
||||||
"")<<endl;
|
"")<<endl;
|
||||||
perror("putenv()");
|
perror("putenv()");
|
||||||
|
@ -211,13 +221,13 @@ int main(int argc, char **argv) {
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (strcmp(argv[i], "-log") == 0 ) {
|
} else if (strcmp(argv[i], "-log") == 0 ) {
|
||||||
if (i + 1 >= argc) {
|
if (i + 1 >= argc) {
|
||||||
cerr<<_FBTEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl;
|
cerr<<_FB_CONSOLETEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
log_filename = argv[++i];
|
log_filename = argv[++i];
|
||||||
} else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "-h") == 0) {
|
} else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "-h") == 0) {
|
||||||
// print program usage and command line options
|
// print program usage and command line options
|
||||||
printf(_FBTEXT(main, Usage,
|
printf(_FB_CONSOLETEXT(main, Usage,
|
||||||
"Fluxbox %s : (c) %s Henrik Kinnunen\n"
|
"Fluxbox %s : (c) %s Henrik Kinnunen\n"
|
||||||
"Website: http://www.fluxbox.org/\n\n"
|
"Website: http://www.fluxbox.org/\n\n"
|
||||||
"-display <string>\t\tuse display connection.\n"
|
"-display <string>\t\tuse display connection.\n"
|
||||||
|
@ -252,9 +262,9 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
// setup log file
|
// setup log file
|
||||||
if (log_file) {
|
if (log_file) {
|
||||||
cerr<<_FBTEXT(main, LoggingTo, "Logging to", "Logging to a file")<<": "<<log_filename<<endl;
|
cerr<<_FB_CONSOLETEXT(main, LoggingTo, "Logging to", "Logging to a file")<<": "<<log_filename<<endl;
|
||||||
log_file<<"------------------------------------------"<<endl;
|
log_file<<"------------------------------------------"<<endl;
|
||||||
log_file<<_FBTEXT(main, LogFile, "Log File", "")<<": "<<log_filename<<endl;
|
log_file<<_FB_CONSOLETEXT(main, LogFile, "Log File", "")<<": "<<log_filename<<endl;
|
||||||
showInfo(log_file);
|
showInfo(log_file);
|
||||||
log_file<<"------------------------------------------"<<endl;
|
log_file<<"------------------------------------------"<<endl;
|
||||||
// setup log to use cout and cerr stream
|
// setup log to use cout and cerr stream
|
||||||
|
@ -270,19 +280,19 @@ int main(int argc, char **argv) {
|
||||||
exitcode = EXIT_SUCCESS;
|
exitcode = EXIT_SUCCESS;
|
||||||
|
|
||||||
} catch (std::out_of_range &oor) {
|
} catch (std::out_of_range &oor) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorOutOfRange, "Out of range", "Error message")<<": "<<oor.what()<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorOutOfRange, "Out of range", "Error message")<<": "<<oor.what()<<endl;
|
||||||
} catch (std::runtime_error &re) {
|
} catch (std::runtime_error &re) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorRuntime, "Runtime error", "Error message")<<": "<<re.what()<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorRuntime, "Runtime error", "Error message")<<": "<<re.what()<<endl;
|
||||||
} catch (std::bad_cast &bc) {
|
} catch (std::bad_cast &bc) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorBadCast, "Bad cast", "Error message")<<": "<<bc.what()<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorBadCast, "Bad cast", "Error message")<<": "<<bc.what()<<endl;
|
||||||
} catch (std::bad_alloc &ba) {
|
} catch (std::bad_alloc &ba) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorBadAlloc, "Bad Alloc", "Error message")<<": "<<ba.what()<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorBadAlloc, "Bad Alloc", "Error message")<<": "<<ba.what()<<endl;
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorStandardException, "Standard Exception", "Error message")<<": "<<e.what()<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorStandardException, "Standard Exception", "Error message")<<": "<<e.what()<<endl;
|
||||||
} catch (std::string error_str) {
|
} catch (std::string error_str) {
|
||||||
cerr<<_FBTEXT(Common, Error, "Error", "Error message header")<<": "<<error_str<<endl;
|
cerr<<_FB_CONSOLETEXT(Common, Error, "Error", "Error message header")<<": "<<error_str<<endl;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
cerr<<"Fluxbox: "<<_FBTEXT(main, ErrorUnknown, "Unknown error", "Error message")<<"."<<endl;
|
cerr<<"Fluxbox: "<<_FB_CONSOLETEXT(main, ErrorUnknown, "Unknown error", "Error message")<<"."<<endl;
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue