Lines 19-25
Link Here
|
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: FbWindow.cc 4664 2007-01-08 21:12:47Z markt $ |
22 |
// $Id: FbWindow.cc 4876 2007-05-05 22:33:36Z markt $ |
23 |
|
23 |
|
24 |
#include "FbWindow.hh" |
24 |
#include "FbWindow.hh" |
25 |
#include "FbPixmap.hh" |
25 |
#include "FbPixmap.hh" |
Lines 465-471
Link Here
|
465 |
std::string FbWindow::textProperty(Atom property) const { |
465 |
std::string FbWindow::textProperty(Atom property) const { |
466 |
XTextProperty text_prop; |
466 |
XTextProperty text_prop; |
467 |
char ** stringlist = 0; |
467 |
char ** stringlist = 0; |
468 |
int count; |
468 |
int count = 0; |
469 |
std::string ret; |
469 |
std::string ret; |
470 |
|
470 |
|
471 |
static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); |
471 |
static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); |
Lines 483-498
Link Here
|
483 |
} else if (text_prop.encoding == m_utf8string && text_prop.format == 8) { |
483 |
} else if (text_prop.encoding == m_utf8string && text_prop.format == 8) { |
484 |
#ifdef X_HAVE_UTF8_STRING |
484 |
#ifdef X_HAVE_UTF8_STRING |
485 |
Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
485 |
Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
486 |
if (count == 0) |
486 |
if (count == 0 || stringlist == 0) |
487 |
return ""; |
487 |
return ""; |
488 |
#else |
488 |
#else |
489 |
if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0) |
489 |
if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0 || stringlist == 0) |
490 |
return ""; |
490 |
return ""; |
491 |
#endif |
491 |
#endif |
492 |
ret = stringlist[0]; |
492 |
ret = stringlist[0]; |
493 |
} else { |
493 |
} else { |
494 |
// still returns a "StringList" despite the different name |
494 |
// still returns a "StringList" despite the different name |
495 |
if (XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count) == 0 || count == 0) |
495 |
XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
|
|
496 |
if (count == 0 || stringlist == 0) |
496 |
return ""; |
497 |
return ""; |
497 |
|
498 |
|
498 |
ret = FbStringUtil::LocaleStrToFb(stringlist[0]); |
499 |
ret = FbStringUtil::LocaleStrToFb(stringlist[0]); |