add show setup
authorPeng Wu <alexepico@gmail.com>
Fri, 30 Sep 2011 02:30:11 +0000 (10:30 +0800)
committerPeng Wu <alexepico@gmail.com>
Thu, 22 Dec 2011 04:23:13 +0000 (12:23 +0800)
src/PYPBopomofoEngine.cc
src/PYPPinyinEngine.cc

index e48e9af..a8ff6fc 100644 (file)
@@ -181,7 +181,8 @@ LibPinyinBopomofoEngine::cursorDown (void)
 inline void
 LibPinyinBopomofoEngine::showSetupDialog (void)
 {
-    g_assert (FALSE);
+    g_spawn_command_line_async
+        (LIBEXECDIR"/ibus-setup-pinyin bopomofo --libpinyin", NULL);
 }
 
 gboolean
index 1fc4933..c163cfc 100644 (file)
@@ -150,7 +150,7 @@ LibPinyinPinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modif
 #endif
                 }
             } else { /* Unknown */
-                g_assert_not_reached ();
+                g_warn_if_reached ();
             }
         }
         retval = m_editors[m_input_mode]->processKeyEvent (keyval, keycode, modifiers);
@@ -247,8 +247,8 @@ LibPinyinPinyinEngine::cursorDown (void)
 inline void
 LibPinyinPinyinEngine::showSetupDialog (void)
 {
-    /* TODO: to be implemented */
-    g_assert (FALSE);
+    g_spawn_command_line_async
+        (LIBEXECDIR"/ibus-setup-pinyin pinyin --libpinyin", NULL);
 }
 
 gboolean