[uim-commit] r2446 - branches/1.0/qt
ekato at freedesktop.org
ekato at freedesktop.org
Thu Dec 8 05:58:49 PST 2005
Author: ekato
Date: 2005-12-08 05:58:40 -0800 (Thu, 08 Dec 2005)
New Revision: 2446
Modified:
branches/1.0/qt/switcher-qt.cpp
Log:
* qt/switcher-qt.cpp : Port r2445 from trunk.
Modified: branches/1.0/qt/switcher-qt.cpp
===================================================================
--- branches/1.0/qt/switcher-qt.cpp 2005-12-08 13:56:47 UTC (rev 2445)
+++ branches/1.0/qt/switcher-qt.cpp 2005-12-08 13:58:40 UTC (rev 2446)
@@ -251,15 +251,24 @@
const QStringList lines = QStringList::split( "\n", message );
for ( unsigned int i = 2; i < lines.count(); i++ )
{
- const QStringList iminfoList = QStringList::split( "\t", lines[ i ] );
+ const QStringList iminfoList = QStringList::split( "\t", lines[ i ], true );
if ( !iminfoList.isEmpty()
&& !iminfoList[ 0 ].isEmpty()
- && !iminfoList[ 1 ].isEmpty()
+ // Language of IM with any locale is set as "".
+ // && !iminfoList[ 1 ].isEmpty()
&& !iminfoList[ 2 ].isEmpty() )
{
+ QString lang, short_desc;
+
+ if (iminfoList[1].isEmpty())
+ lang = QString("-");
+ else
+ lang = QString::fromUtf8(gettext(iminfoList[1].utf8()));
+ short_desc = QString::fromUtf8(gettext(iminfoList[2].utf8()));
+
// add new item to listview
- QListViewItem * item = new QListViewItem( listview, iminfoList[ 0 ], iminfoList[ 1 ], iminfoList[ 2 ] );
+ QListViewItem * item = new QListViewItem( listview, iminfoList[ 0 ], lang, short_desc );
if ( !iminfoList[ 3 ].isEmpty() && QString::compare( iminfoList[ 3 ], "selected" ) == 0 )
listview->setSelected( item, TRUE );
More information about the uim-commit
mailing list