summaryrefslogtreecommitdiff
blob: 7376c02d05813eb352d02eba97e5be90a1a8ca57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
http://bugs.gentoo.org/407695
http://code.google.com/p/ibus/issues/detail?id=1427

--- src/IBusChewingEngine.gob
+++ src/IBusChewingEngine.gob
@@ -1041,12 +1041,21 @@
 	    /* Toggle Full <-> Half */
 	    chewing_set_ShapeMode(self->context, !chewing_get_ShapeMode(self->context));
 	}else if (strcmp(prop_name,"chewing_settings_prop")==0){
-	    if (self->settings_prop->state==PROP_STATE_UNCHECKED){
+#if IBUS_CHECK_VERSION(1, 4, 0)
+		if (ibus_property_get_state(self->settings_prop)==PROP_STATE_UNCHECKED)
+#else
+	    if (self->settings_prop->state==PROP_STATE_UNCHECKED)
+#endif
+		{
 		if (gtk_dialog_run(GTK_DIALOG(self->setting_dialog))==GTK_RESPONSE_OK){
 		    self_save_config_all(self);
 		}
 		gtk_widget_hide(self->setting_dialog);
+#if IBUS_CHECK_VERSION(1, 4, 0)
+		ibus_property_set_state(self->settings_prop,PROP_STATE_UNCHECKED);
+#else
 		self->settings_prop->state=PROP_STATE_UNCHECKED;
+#endif
 	    }
 	}else{
 	    G_DEBUG_MSG(3,"[I3]  property_activate(-, %s, %u) not recognized",prop_name, prop_state);
--- src/IBusChewingEngine-input-events.c
+++ src/IBusChewingEngine-input-events.c
@@ -291,12 +291,21 @@
 	/* Toggle Full <-> Half */
 	chewing_set_ShapeMode(self->context, !chewing_get_ShapeMode(self->context));
     }else if (strcmp(prop_name,"chewing_settings_prop")==0){
-	if (self->settings_prop->state==PROP_STATE_UNCHECKED){
+#if IBUS_CHECK_VERSION(1, 4, 0)
+	if (ibus_property_get_state(self->settings_prop)==PROP_STATE_UNCHECKED)
+#else
+	if (self->settings_prop->state==PROP_STATE_UNCHECKED)
+#endif
+	{
 	    if (gtk_dialog_run(GTK_DIALOG(self->setting_dialog))==GTK_RESPONSE_OK){
 		self_save_config_all(self);
 	    }
 	    gtk_widget_hide(self->setting_dialog);
+#if IBUS_CHECK_VERSION(1, 4, 0)
+		ibus_property_set_state(self->settings_prop,PROP_STATE_UNCHECKED);
+#else
 	    self->settings_prop->state=PROP_STATE_UNCHECKED;
+#endif
 	}
     }else{
 	G_DEBUG_MSG(3,"[I3]  property_activate(-, %s, %u) not recognized",prop_name, prop_state);