Change the default setting of use_global_engine, and remove some unused
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 11 Feb 2010 02:37:53 +0000 (10:37 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Sat, 20 Feb 2010 02:43:14 +0000 (10:43 +0800)
code.

bus/ibusimpl.c
bus/ibusimpl.h
data/ibus.schemas.in

index d5d2558c0dbd05a497187bcef3d8780209f18287..889b9faad7060a0a0663b519073aee0eda52dbed 100644 (file)
@@ -551,8 +551,7 @@ bus_ibus_impl_init (BusIBusImpl *ibus)
 
     ibus->use_sys_layout = FALSE;
     ibus->embed_preedit_text = TRUE;
-    ibus->use_global_engine = TRUE;
-    ibus->global_engine_enabled = FALSE;
+    ibus->use_global_engine = FALSE;
     ibus->global_engine = NULL;
 
     bus_ibus_impl_reload_config (ibus);
@@ -1016,25 +1015,19 @@ _context_destroy_cb (BusInputContext    *context,
     g_object_unref (context);
 }
 
+#if 0
 static void
 _context_enabled_cb (BusInputContext    *context,
                      BusIBusImpl        *ibus)
 {
-    if (ibus->focused_context == context && ibus->use_global_engine &&
-        (bus_input_context_get_capabilities (context) & IBUS_CAP_FOCUS) != 0) {
-        ibus->global_engine_enabled = TRUE;
-    }
 }
 
 static void
 _context_disabled_cb (BusInputContext    *context,
                       BusIBusImpl        *ibus)
 {
-    if (ibus->focused_context == context && ibus->use_global_engine &&
-        (bus_input_context_get_capabilities (context) & IBUS_CAP_FOCUS) != 0) {
-        ibus->global_engine_enabled = FALSE;
-    }
 }
+#endif
 
 static IBusMessage *
 _ibus_create_input_context (BusIBusImpl     *ibus,
@@ -1078,8 +1071,10 @@ _ibus_create_input_context (BusIBusImpl     *ibus,
         { "focus-in",       G_CALLBACK (_context_focus_in_cb) },
         { "focus-out",      G_CALLBACK (_context_focus_out_cb) },
         { "destroy",        G_CALLBACK (_context_destroy_cb) },
+    #if 0
         { "enabled",        G_CALLBACK (_context_enabled_cb) },
         { "disabled",       G_CALLBACK (_context_disabled_cb) },
+    #endif
     };
 
     for (i = 0; i < G_N_ELEMENTS (signals); i++) {
index 4fa7c29630ac1e35c403a345513fee89febebcef..0152a219d822a114834902790ea83d4f8471c79e 100644 (file)
@@ -85,7 +85,6 @@ struct _BusIBusImpl {
     IBusKeymap      *keymap;
 
     gboolean use_global_engine;
-    gboolean global_engine_enabled;
     BusEngineProxy  *global_engine;
 };
 
index bd734b33c836018bb5ca6ba983287855b7319068..3c0f08966db9215465e2b424c7020a423c7b9146 100644 (file)
       <applyto>/desktop/ibus/general/use_global_engine</applyto>
       <owner>ibus</owner>
       <type>bool</type>
-      <default>true</default>
+      <default>false</default>
       <locale name="C">
         <short>Use global input method</short>
            <long>Share the same input method among all applications</long>