Index: abi/src/af/xap/unix/xap_UnixFrameImpl.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFrameImpl.cpp,v retrieving revision 1.81 diff -u -r1.81 xap_UnixFrameImpl.cpp --- abi/src/af/xap/unix/xap_UnixFrameImpl.cpp 8 Sep 2004 14:36:45 -0000 1.81 +++ abi/src/af/xap/unix/xap_UnixFrameImpl.cpp 16 Sep 2004 10:09:02 -0000 @@ -1534,18 +1534,11 @@ return false; } - char buf[256]; - buf[0] = 0; - - const char * szAppName = m_pUnixApp->getApplicationTitleForTitleBar(); - - int len = 256 - strlen(szAppName) - 4; - - const char * szTitle = getFrame()->getTitle(len); - - sprintf(buf, "%s - %s", szTitle, szAppName); if(getFrame()->getFrameMode() == XAP_NormalFrame) - gtk_window_set_title(GTK_WINDOW(m_wTopLevelWindow), buf); + { + const char * szTitle = getFrame()->getTitle(MAX_TITLE_LENGTH); + gtk_window_set_title(GTK_WINDOW(m_wTopLevelWindow), szTitle); + } return true; } Index: abi/src/af/xap/xp/xap_FrameImpl.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_FrameImpl.cpp,v retrieving revision 1.23 diff -u -r1.23 xap_FrameImpl.cpp --- abi/src/af/xap/xp/xap_FrameImpl.cpp 11 Apr 2004 17:51:38 -0000 1.23 +++ abi/src/af/xap/xp/xap_FrameImpl.cpp 16 Sep 2004 10:09:03 -0000 @@ -84,7 +84,6 @@ -#define MAX_TITLE_LENGTH 256 bool XAP_FrameImpl::_updateTitle() { /* @@ -113,7 +112,7 @@ if (szName && *szName) { - UT_UTF8String sUntruncatedString = szName; + UT_UTF8String sUntruncatedString(UT_basename(szName)); // WL_FIXME: we probably need a string truncation function, in the ut_utf8string class.. UT_UTF8Stringbuf::UTF8Iterator iter = sUntruncatedString.getIterator (); iter = iter.start (); Index: abi/src/af/xap/xp/xap_FrameImpl.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_FrameImpl.h,v retrieving revision 1.17 diff -u -r1.17 xap_FrameImpl.h --- abi/src/af/xap/xp/xap_FrameImpl.h 23 Mar 2004 00:12:11 -0000 1.17 +++ abi/src/af/xap/xp/xap_FrameImpl.h 16 Sep 2004 10:09:03 -0000 @@ -27,6 +27,8 @@ #include "ut_vector.h" #include "gr_Graphics.h" +#define MAX_TITLE_LENGTH 256 + class XAP_Frame; class XAP_App; class XAP_DialogFactory;