Revision: 6365
Author: nogu.dev
Date: Thu May 6 04:41:07 2010
Log: * qt/switcher-qt.cpp
- (UimImSwitcher::UimImSwitcher): Check if another uim-im-switcher exists
by trying to contact one.
If one exists, this process exits.
- (UimImSwitcher::slotStdinActivated): Parse "im_switcher_{start,quit}".
http://code.google.com/p/uim/source/detail?r=6365
Modified:
/trunk/qt/switcher-qt.cpp
=======================================
--- /trunk/qt/switcher-qt.cpp Sun Apr 4 20:35:54 2010
+++ /trunk/qt/switcher-qt.cpp Thu May 6 04:41:07 2010
@@ -83,6 +83,9 @@
uim_fd = -1;
checkHelperConnection();
+ /* to check if another uim-im-switcher exists */
+ uim_helper_send_message( uim_fd, "im_switcher_start\n" );
+
/* to load input method list */
uim_helper_send_message( uim_fd, "im_list_get\n" );
@@ -240,6 +243,10 @@
reloadImList();
else if ( msg.startsWith( "im_list" ) )
parseHelperStrImList( msg );
+ else if ( msg.startsWith( "im_switcher_start" ) )
+ uim_helper_send_message( uim_fd, "im_switcher_quit\n" );
+ else if ( msg.startsWith( "im_switcher_quit" ) )
+ qApp->quit();
}
}