summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/FbTk/XmbFontImp.cc10
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 01a09db..073d536 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.11 2Changes for 0.9.11
3*04/10/04:
4 * Fix handling of setlocale return (Thanks Victor Yegorov)
5 FbTk/XmbFontImp.cc
3*04/09/30: 6*04/09/30:
4 * Fix to show title of current tabbed-window as the label of the 7 * Fix to show title of current tabbed-window as the label of the
5 iconbar-button-group (Mathias) 8 iconbar-button-group (Mathias)
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc
index eb01596..dc5c902 100644
--- a/src/FbTk/XmbFontImp.cc
+++ b/src/FbTk/XmbFontImp.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: XmbFontImp.cc,v 1.13 2004/09/11 22:58:20 fluxgen Exp $ 22// $Id: XmbFontImp.cc,v 1.14 2004/10/04 12:43:52 rathnor Exp $
23 23
24#include "XmbFontImp.hh" 24#include "XmbFontImp.hh"
25 25
@@ -117,7 +117,7 @@ XFontSet createFontSet(const char *fontname, bool utf8mode) {
117 char **missing, *def = "-"; 117 char **missing, *def = "-";
118 int nmissing, pixel_size = 0, buf_size = 0; 118 int nmissing, pixel_size = 0, buf_size = 0;
119 char weight[FONT_ELEMENT_SIZE], slant[FONT_ELEMENT_SIZE]; 119 char weight[FONT_ELEMENT_SIZE], slant[FONT_ELEMENT_SIZE];
120 char * orig_locale = ""; 120 std::string orig_locale = "";
121 121
122#ifdef HAVE_SETLOCALE 122#ifdef HAVE_SETLOCALE
123 if (utf8mode) { 123 if (utf8mode) {
@@ -131,7 +131,7 @@ XFontSet createFontSet(const char *fontname, bool utf8mode) {
131 if (fs && (! nmissing)) { 131 if (fs && (! nmissing)) {
132#ifdef HAVE_SETLOCALE 132#ifdef HAVE_SETLOCALE
133 if (utf8mode) 133 if (utf8mode)
134 setlocale(LC_CTYPE, orig_locale); 134 setlocale(LC_CTYPE, orig_locale.c_str());
135#endif // HAVE_SETLOCALE 135#endif // HAVE_SETLOCALE
136 return fs; 136 return fs;
137 } 137 }
@@ -143,7 +143,7 @@ XFontSet createFontSet(const char *fontname, bool utf8mode) {
143 setlocale(LC_CTYPE, "C"); 143 setlocale(LC_CTYPE, "C");
144 fs = XCreateFontSet(display, fontname, 144 fs = XCreateFontSet(display, fontname,
145 &missing, &nmissing, &def); 145 &missing, &nmissing, &def);
146 setlocale(LC_CTYPE, orig_locale); 146 setlocale(LC_CTYPE, orig_locale.c_str());
147 } 147 }
148#endif // HAVE_SETLOCALE 148#endif // HAVE_SETLOCALE
149 149
@@ -189,7 +189,7 @@ XFontSet createFontSet(const char *fontname, bool utf8mode) {
189 189
190#ifdef HAVE_SETLOCALE 190#ifdef HAVE_SETLOCALE
191 if (utf8mode) 191 if (utf8mode)
192 setlocale(LC_CTYPE, orig_locale); 192 setlocale(LC_CTYPE, orig_locale.c_str());
193#endif // HAVE_SETLOCALE 193#endif // HAVE_SETLOCALE
194 194
195 return fs; 195 return fs;