summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Color.cc2
-rw-r--r--src/FbTk/I18n.cc46
-rw-r--r--src/FbTk/I18n.hh36
-rw-r--r--src/FbTk/ImageControl.cc2
-rw-r--r--src/FbTk/Resource.cc4
-rw-r--r--src/FbTk/TextureRender.cc20
-rw-r--r--src/FbTk/Theme.cc2
-rw-r--r--src/FbTk/Transparent.cc10
-rw-r--r--src/FbTk/XFontImp.cc6
9 files changed, 90 insertions, 38 deletions
diff --git a/src/FbTk/Color.cc b/src/FbTk/Color.cc
index 9e3868e..5c4f1b8 100644
--- a/src/FbTk/Color.cc
+++ b/src/FbTk/Color.cc
@@ -164,7 +164,7 @@ void Color::allocate(unsigned short red, unsigned short green, unsigned short bl
164 164
165 if (!XAllocColor(disp, DefaultColormap(disp, screen), &color)) { 165 if (!XAllocColor(disp, DefaultColormap(disp, screen), &color)) {
166 _FB_USES_NLS; 166 _FB_USES_NLS;
167 cerr<<"FbTk::Color: "<<_FBTKTEXT(Error, ColorAllocation, "Allocation error.", "XAllocColor failed...")<<endl; 167 cerr<<"FbTk::Color: "<<_FBTK_CONSOLETEXT(Error, ColorAllocation, "Allocation error.", "XAllocColor failed...")<<endl;
168 } else { 168 } else {
169 free(); 169 free();
170 setRGB(maxValue(color.red), 170 setRGB(maxValue(color.red),
diff --git a/src/FbTk/I18n.cc b/src/FbTk/I18n.cc
index 8d05204..7876821 100644
--- a/src/FbTk/I18n.cc
+++ b/src/FbTk/I18n.cc
@@ -38,6 +38,7 @@
38#endif // _GNU_SOURCE 38#endif // _GNU_SOURCE
39 39
40#include "I18n.hh" 40#include "I18n.hh"
41#include "FileUtil.hh"
41 42
42#include <X11/Xlocale.h> 43#include <X11/Xlocale.h>
43 44
@@ -72,7 +73,7 @@ void NLSInit(const char *catalog) {
72} 73}
73 74
74 75
75I18n::I18n():m_multibyte(false), m_catalog_fd((nl_catd)(-1)) { 76I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)(-1)) {
76#ifdef HAVE_SETLOCALE 77#ifdef HAVE_SETLOCALE
77 //make sure we don't get 0 to m_locale string 78 //make sure we don't get 0 to m_locale string
78 char *temp = setlocale(LC_MESSAGES, ""); 79 char *temp = setlocale(LC_MESSAGES, "");
@@ -122,13 +123,33 @@ I18n *I18n::instance() {
122 123
123void I18n::openCatalog(const char *catalog) { 124void I18n::openCatalog(const char *catalog) {
124#if defined(NLS) && defined(HAVE_CATOPEN) 125#if defined(NLS) && defined(HAVE_CATOPEN)
125 126
126 string catalog_filename = LOCALEPATH; 127 string catalog_filename = LOCALEPATH;
127 catalog_filename += '/'; 128 catalog_filename += '/';
128 catalog_filename += m_locale; 129 catalog_filename += m_locale;
129 catalog_filename += '/'; 130 catalog_filename += '/';
130 catalog_filename += catalog; 131 catalog_filename += catalog;
131 132
133 if (!FileUtil::isRegularFile(catalog_filename.c_str()) && m_locale != "C" && FbStringUtil::haveUTF8()) {
134 // try the UTF-8 catalog, this also picks up situations where
135 // the codeset somehow isn't specified
136
137 // remove everything after @
138 string::size_type index = m_locale.find('.');
139 // erase all characters starting at index
140 if (index != string::npos)
141 m_locale.erase(index);
142
143 m_locale.append(".UTF-8");
144 m_utf8_translate = true;
145
146 catalog_filename = LOCALEPATH;
147 catalog_filename += '/';
148 catalog_filename += m_locale;
149 catalog_filename += '/';
150 catalog_filename += catalog;
151 }
152
132#ifdef MCLoadBySet 153#ifdef MCLoadBySet
133 m_catalog_fd = catopen(catalog_filename.c_str(), MCLoadBySet); 154 m_catalog_fd = catopen(catalog_filename.c_str(), MCLoadBySet);
134#else // !MCLoadBySet 155#else // !MCLoadBySet
@@ -147,16 +168,29 @@ void I18n::openCatalog(const char *catalog) {
147} 168}
148 169
149 170
171// Translate_FB means it'll become an FbString that goes to X for Fonts,
172// No translate means it stays in the local encoding, for printing to the
173// console.
150FbString I18n::getMessage(int set_number, int message_number, 174FbString I18n::getMessage(int set_number, int message_number,
151 const char *default_message) const { 175 const char *default_message, bool translate_fb) const {
152 176
153#if defined(NLS) && defined(HAVE_CATGETS) 177#if defined(NLS) && defined(HAVE_CATGETS)
154 if (m_catalog_fd != (nl_catd)-1) { 178 if (m_catalog_fd != (nl_catd)-1) {
155 const char *ret = catgets(m_catalog_fd, set_number, message_number, default_message); 179 const char *ret = catgets(m_catalog_fd, set_number, message_number, default_message);
180 // can't translate, leave it in raw ascii (utf-8 compatible)
156 if (ret == default_message || ret == NULL) 181 if (ret == default_message || ret == NULL)
157 return default_message; // don't recode the default 182 return default_message;
158 183
159 return FbStringUtil::LocaleStrToFb(ret); 184 if (!m_utf8_translate && translate_fb)
185 // Local input, UTF-8 output
186 return FbStringUtil::LocaleStrToFb(ret);
187 else if (m_utf8_translate && !translate_fb)
188 // UTF-8 input, local output
189 return FbStringUtil::FbStrToLocale(ret);
190 else
191 // UTF-8 input, UTF-8 output OR
192 // local input, local output
193 return ret;
160 } 194 }
161 else 195 else
162#endif // NLS && HAVE_CATGETS 196#endif // NLS && HAVE_CATGETS
diff --git a/src/FbTk/I18n.hh b/src/FbTk/I18n.hh
index cbf241d..9a936d8 100644
--- a/src/FbTk/I18n.hh
+++ b/src/FbTk/I18n.hh
@@ -68,20 +68,36 @@ void catclose(nl_catd cat);
68 FbTk::I18n &i18n = *FbTk::I18n::instance() 68 FbTk::I18n &i18n = *FbTk::I18n::instance()
69 69
70// ignore the description, it's for helping translators 70// ignore the description, it's for helping translators
71#define _FBTEXT(msgset, msgid, default_text, description) \ 71
72 i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text) 72// Text for X
73 73#define _FB_XTEXT(msgset, msgid, default_text, description) \
74 i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text, true)
75
76// Text for console
77#define _FB_CONSOLETEXT(msgset, msgid, default_text, description) \
78 i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text, false)
79
74// This ensure that FbTk nls stuff is in a kind of namespace of its own 80// This ensure that FbTk nls stuff is in a kind of namespace of its own
75#define _FBTKTEXT( msgset, msgid, default_text, description) \ 81#define _FBTK_XTEXT( msgset, msgid, default_text, description) \
76 i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text) 82 i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text, true)
83
84#define _FBTK_CONSOLETEXT( msgset, msgid, default_text, description) \
85 i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text, false)
77 86
78#else // no NLS 87#else // no NLS
79 88
80#define _FB_USES_NLS 89#define _FB_USES_NLS
81#define _FBTEXT(msgset, msgid, default_text, description) \ 90
91#define _FB_XTEXT(msgset, msgid, default_text, description) \
82 std::string(default_text) 92 std::string(default_text)
83 93
84#define _FBTKTEXT(msgset, msgid, default_text, description) \ 94#define _FB_CONSOLETEXT(msgset, msgid, default_text, description) \
95 std::string(default_text)
96
97#define _FBTK_XTEXT(msgset, msgid, default_text, description) \
98 std::string(default_text)
99
100#define _FBTK_CONSOLETEXT(msgset, msgid, default_text, description) \
85 std::string(default_text) 101 std::string(default_text)
86 102
87#endif // defined NLS 103#endif // defined NLS
@@ -96,15 +112,17 @@ public:
96 inline const nl_catd &getCatalogFd() const { return m_catalog_fd; } 112 inline const nl_catd &getCatalogFd() const { return m_catalog_fd; }
97 113
98 FbString getMessage(int set_number, int message_number, 114 FbString getMessage(int set_number, int message_number,
99 const char *default_messsage = 0) const; 115 const char *default_messsage = 0, bool translate_fb = false) const;
116
100 void openCatalog(const char *catalog); 117 void openCatalog(const char *catalog);
101private: 118private:
102 I18n(); 119 I18n();
103 ~I18n(); 120 ~I18n();
104 std::string m_locale; 121 std::string m_locale;
105 bool m_multibyte; 122 bool m_multibyte, m_utf8_translate;
106 nl_catd m_catalog_fd; 123 nl_catd m_catalog_fd;
107 124
125
108}; 126};
109 127
110void NLSInit(const char *); 128void NLSInit(const char *);
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index 7fe9154..64e3db5 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -660,7 +660,7 @@ void ImageControl::createColorTable() {
660 660
661 default: 661 default:
662 _FB_USES_NLS; 662 _FB_USES_NLS;
663 cerr<<"FbTk::ImageControl: "<<_FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X")<<endl; 663 cerr<<"FbTk::ImageControl: "<<_FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X")<<endl;
664 break; 664 break;
665 } 665 }
666} 666}
diff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc
index d1c80bc..d8e781d 100644
--- a/src/FbTk/Resource.cc
+++ b/src/FbTk/Resource.cc
@@ -87,8 +87,8 @@ bool ResourceManager::load(const char *filename) {
87 resource->setFromString(value.addr); 87 resource->setFromString(value.addr);
88 else { 88 else {
89 _FB_USES_NLS; 89 _FB_USES_NLS;
90 cerr<<_FBTKTEXT(Error, FailedRead, "Failed to read", "Couldn't load a resource (following)")<<": "<<resource->name()<<endl; 90 cerr<<_FBTK_CONSOLETEXT(Error, FailedRead, "Failed to read", "Couldn't load a resource (following)")<<": "<<resource->name()<<endl;
91 cerr<<_FBTKTEXT(Error, UsingDefault, "Setting default value", "Falling back to default value for resource")<<endl; 91 cerr<<_FBTK_CONSOLETEXT(Error, UsingDefault, "Setting default value", "Falling back to default value for resource")<<endl;
92 resource->setDefaultValue(); 92 resource->setDefaultValue();
93 } 93 }
94 } 94 }
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index 7af8f08..7626c3b 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -70,12 +70,12 @@ TextureRender::TextureRender(ImageControl &imgctrl,
70 _FB_USES_NLS; 70 _FB_USES_NLS;
71 // clamp to "normal" size 71 // clamp to "normal" size
72 if (width > texture_max_width) { 72 if (width > texture_max_width) {
73 cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl; 73 cerr<<"TextureRender: "<<_FBTK_CONSOLETEXT(Error, BigWidth, "Warning! Width > 3200 setting Width = 3200", "Image width seems too big, clamping")<<endl;
74 width = texture_max_width; 74 width = texture_max_width;
75 } 75 }
76 76
77 if (height > texture_max_height) { 77 if (height > texture_max_height) {
78 cerr<<"TextureRender: "<<_FBTKTEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl; 78 cerr<<"TextureRender: "<<_FBTK_CONSOLETEXT(Error, BigHeight, "Warning! Height > 3200 setting Height = 3200", "Image height seems too big, clamping")<<endl;
79 height = texture_max_height; 79 height = texture_max_height;
80 } 80 }
81 81
@@ -120,7 +120,7 @@ void TextureRender::allocateColorTables() {
120 char sbuf[128]; 120 char sbuf[128];
121 sprintf(sbuf, "%ld", (long int) size); 121 sprintf(sbuf, "%ld", (long int) size);
122 throw std::string("TextureRender::TextureRender(): " + 122 throw std::string("TextureRender::TextureRender(): " +
123 std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf)); 123 std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf));
124 } 124 }
125 125
126 126
@@ -129,7 +129,7 @@ void TextureRender::allocateColorTables() {
129 char sbuf[128]; 129 char sbuf[128];
130 sprintf(sbuf, "%ld", (long int) size); 130 sprintf(sbuf, "%ld", (long int) size);
131 throw std::string("TextureRender::TextureRender(): " + 131 throw std::string("TextureRender::TextureRender(): " +
132 std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf)); 132 std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf));
133 } 133 }
134 134
135 blue = FB_new_nothrow unsigned char[size]; 135 blue = FB_new_nothrow unsigned char[size];
@@ -137,7 +137,7 @@ void TextureRender::allocateColorTables() {
137 char sbuf[128]; 137 char sbuf[128];
138 sprintf(sbuf, "%ld", (long int) size); 138 sprintf(sbuf, "%ld", (long int) size);
139 throw std::string("TextureRender::TextureRender(): " + 139 throw std::string("TextureRender::TextureRender(): " +
140 std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf)); 140 std::string(_FBTK_CONSOLETEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf));
141 } 141 }
142 142
143 143
@@ -152,7 +152,7 @@ Pixmap TextureRender::renderSolid(const FbTk::Texture &texture) {
152 152
153 if (pixmap.drawable() == None) { 153 if (pixmap.drawable() == None) {
154 _FB_USES_NLS; 154 _FB_USES_NLS;
155 cerr<<"FbTk::TextureRender::render_solid(): "<<_FBTKTEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl; 155 cerr<<"FbTk::TextureRender::render_solid(): "<<_FBTK_CONSOLETEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
156 return None; 156 return None;
157 } 157 }
158 158
@@ -321,7 +321,7 @@ XImage *TextureRender::renderXImage() {
321 321
322 if (! image) { 322 if (! image) {
323 _FB_USES_NLS; 323 _FB_USES_NLS;
324 cerr << "FbTk::TextureRender::renderXImage(): " << _FBTKTEXT(Error, CreateXImage, "Can't create XImage", "Couldn't create an XImage") << "." << endl; 324 cerr << "FbTk::TextureRender::renderXImage(): " << _FBTK_CONSOLETEXT(Error, CreateXImage, "Can't create XImage", "Couldn't create an XImage") << "." << endl;
325 return 0; 325 return 0;
326 } 326 }
327 327
@@ -594,7 +594,7 @@ XImage *TextureRender::renderXImage() {
594 default: 594 default:
595 _FB_USES_NLS; 595 _FB_USES_NLS;
596 cerr << "TextureRender::renderXImage(): " << 596 cerr << "TextureRender::renderXImage(): " <<
597 _FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl; 597 _FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
598 delete [] d; 598 delete [] d;
599 XDestroyImage(image); 599 XDestroyImage(image);
600 return (XImage *) 0; 600 return (XImage *) 0;
@@ -697,7 +697,7 @@ XImage *TextureRender::renderXImage() {
697 default: 697 default:
698 _FB_USES_NLS; 698 _FB_USES_NLS;
699 cerr << "TextureRender::renderXImage(): " << 699 cerr << "TextureRender::renderXImage(): " <<
700 _FBTKTEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl; 700 _FBTK_CONSOLETEXT(Error, UnsupportedVisual, "Unsupported visual", "A visual is a technical term in X") << endl;
701 delete [] d; 701 delete [] d;
702 XDestroyImage(image); 702 XDestroyImage(image);
703 return (XImage *) 0; 703 return (XImage *) 0;
@@ -716,7 +716,7 @@ Pixmap TextureRender::renderPixmap() {
716 716
717 if (pixmap.drawable() == None) { 717 if (pixmap.drawable() == None) {
718 _FB_USES_NLS; 718 _FB_USES_NLS;
719 cerr<<"FbTk::TextureRender::renderPixmap(): "<<_FBTKTEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl; 719 cerr<<"FbTk::TextureRender::renderPixmap(): "<<_FBTK_CONSOLETEXT(Error, CreatePixmap, "Error creating pixmap", "Couldn't create a pixmap - image - for some reason")<<endl;
720 return None; 720 return None;
721 } 721 }
722 722
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index e3c7f7f..6ff26a9 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -190,7 +190,7 @@ void ThemeManager::loadTheme(Theme &tm) {
190 if (!tm.fallback(*resource)) { 190 if (!tm.fallback(*resource)) {
191 if (verbose()) { 191 if (verbose()) {
192 _FB_USES_NLS; 192 _FB_USES_NLS;
193 cerr<<_FBTKTEXT(Error, ThemeItem, "Failed to read theme item", "When reading a style, couldn't read a specific item (following)")<<": "<<resource->name()<<endl; 193 cerr<<_FBTK_CONSOLETEXT(Error, ThemeItem, "Failed to read theme item", "When reading a style, couldn't read a specific item (following)")<<": "<<resource->name()<<endl;
194 } 194 }
195 resource->setDefaultValue(); 195 resource->setDefaultValue();
196 } 196 }
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc
index edbab62..81aca99 100644
--- a/src/FbTk/Transparent.cc
+++ b/src/FbTk/Transparent.cc
@@ -52,7 +52,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
52 PictFormatDepth | PictFormatAlphaMask, 52 PictFormatDepth | PictFormatAlphaMask,
53 &pic_format, 0); 53 &pic_format, 0);
54 if (format == 0) { 54 if (format == 0) {
55 cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderFormat, "Warning: Failed to find valid format for alpha.", "transparency requires a pict format, can't get one...")<<endl; 55 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;
56 return 0; 56 return 0;
57 } 57 }
58 58
@@ -60,7 +60,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
60 Pixmap alpha_pm = XCreatePixmap(disp, drawable, 60 Pixmap alpha_pm = XCreatePixmap(disp, drawable,
61 1, 1, 8); 61 1, 1, 8);
62 if (alpha_pm == 0) { 62 if (alpha_pm == 0) {
63 cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl; 63 cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl;
64 return 0; 64 return 0;
65 } 65 }
66 66
@@ -71,7 +71,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
71 format, CPRepeat, &attr); 71 format, CPRepeat, &attr);
72 if (alpha_pic == 0) { 72 if (alpha_pic == 0) {
73 XFreePixmap(disp, alpha_pm); 73 XFreePixmap(disp, alpha_pm);
74 cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPicture, "Warning: Failed to create alpha picture.", "XRenderCreatePicture failed")<<endl; 74 cerr<<"FbTk::Transparent: "<<_FBTK_CONSOLETEXT(Error, NoRenderPicture, "Warning: Failed to create alpha picture.", "XRenderCreatePicture failed")<<endl;
75 return 0; 75 return 0;
76 } 76 }
77 77
@@ -234,7 +234,7 @@ void Transparent::setDest(Drawable dest, int screen_num) {
234 if (format == 0) { 234 if (format == 0) {
235 _FB_USES_NLS; 235 _FB_USES_NLS;
236 cerr<<"FbTk::Transparent: "; 236 cerr<<"FbTk::Transparent: ";
237 fprintf(stderr, _FBTKTEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num); 237 fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
238 cerr<<endl; 238 cerr<<endl;
239 } 239 }
240 m_dest_pic = XRenderCreatePicture(disp, dest, format, 0, 0); 240 m_dest_pic = XRenderCreatePicture(disp, dest, format, 0, 0);
@@ -273,7 +273,7 @@ void Transparent::setSource(Drawable source, int screen_num) {
273 if (format == 0) { 273 if (format == 0) {
274 _FB_USES_NLS; 274 _FB_USES_NLS;
275 cerr<<"FbTk::Transparent: "; 275 cerr<<"FbTk::Transparent: ";
276 fprintf(stderr, _FBTKTEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num); 276 fprintf(stderr, _FBTK_CONSOLETEXT(Error, NoRenderVisualFormat, "Failed to find format for screen(%d)", "XRenderFindVisualFormat failed... include %d for screen number").c_str(), screen_num);
277 cerr<<endl; 277 cerr<<endl;
278 } 278 }
279 m_src_pic = XRenderCreatePicture(disp, m_source, format, 279 m_src_pic = XRenderCreatePicture(disp, m_source, format,
diff --git a/src/FbTk/XFontImp.cc b/src/FbTk/XFontImp.cc
index f356224..7398625 100644
--- a/src/FbTk/XFontImp.cc
+++ b/src/FbTk/XFontImp.cc
@@ -149,7 +149,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
149 XRotFontStruct *rotfont = m_rotfonts[orient]; 149 XRotFontStruct *rotfont = m_rotfonts[orient];
150 150
151 if (rotfont == 0) { 151 if (rotfont == 0) {
152 cerr<<"RotFont: "<<_FBTKTEXT(Error, OutOfMemory, "Out of memory", "Something couldn't allocate memory")<<endl; 152 cerr<<"RotFont: "<<_FBTK_CONSOLETEXT(Error, OutOfMemory, "Out of memory", "Something couldn't allocate memory")<<endl;
153 return; 153 return;
154 } 154 }
155 155
@@ -215,7 +215,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
215 vert_w, vert_h, 8, 0); 215 vert_w, vert_h, 8, 0);
216 216
217 if (I1 == None) { 217 if (I1 == None) {
218 cerr << "RotFont: " << _FBTKTEXT(Error, CreateXImage, 218 cerr << "RotFont: " << _FBTK_CONSOLETEXT(Error, CreateXImage,
219 "Can't create XImage", 219 "Can't create XImage",
220 "XCreateImage failed for some reason") 220 "XCreateImage failed for some reason")
221 << "." << endl; 221 << "." << endl;
@@ -257,7 +257,7 @@ void XFontImp::rotate(FbTk::Orientation orient) {
257 (char *)bitdata, bit_w, bit_h, 8, 0); 257 (char *)bitdata, bit_w, bit_h, 8, 0);
258 258
259 if (I2 == None) { 259 if (I2 == None) {
260 cerr << "XFontImp: " <<_FBTKTEXT(Error, CreateXImage, 260 cerr << "XFontImp: " <<_FBTK_CONSOLETEXT(Error, CreateXImage,
261 "Can't create XImage", 261 "Can't create XImage",
262 "XCreateImage failed for some reason") 262 "XCreateImage failed for some reason")
263 << "." << endl; 263 << "." << endl;