opt->enableMacro = SCIM_IMENGINE_UNIKEY_MACROENABLED_DEF;
opt->processwatbegin = SCIM_IMENGINE_UNIKEY_PROCESSWATWORDBEGIN_DEF;
- opt->enablepreedit = SCIM_IMENGINE_UNIKEY_PREEDIT_DEF;
opt->macrofile = get_macro_file();
}
opt->processwatbegin = t;
}
// END get ProcessWAtBegin
-
- // get EnablePreedit
- b = scim_get_config(SCIM_IMENGINE_UNIKEY_PREEDIT, G_TYPE_BOOLEAN, &t);
- if (b == TRUE)
- {
- opt->enablepreedit = t;
- }
- // END get EnablePreedit
}
void write_config(UnikeyMainSetupOptions* opt)
scim_set_config(SCIM_IMENGINE_UNIKEY_FREEMARKING, G_TYPE_BOOLEAN, &opt->freeMarking);
scim_set_config(SCIM_IMENGINE_UNIKEY_MACROENABLED, G_TYPE_BOOLEAN, &opt->enableMacro);
scim_set_config(SCIM_IMENGINE_UNIKEY_PROCESSWATWORDBEGIN, G_TYPE_BOOLEAN, &opt->processwatbegin);
- scim_set_config(SCIM_IMENGINE_UNIKEY_PREEDIT, G_TYPE_BOOLEAN, &opt->enablepreedit);
}
int force_engine_to_reload_config()
g_object_set_data(G_OBJECT(dlg),
"check_processwatbegin",
gtk_builder_get_object(builder, "check_processwatbegin"));
- g_object_set_data(G_OBJECT(dlg),
- "check_enablepreedit",
- gtk_builder_get_object(builder, "check_enablepreedit"));
// END save object pointer
g_object_unref(builder);
wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_processwatbegin"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wid), opt->processwatbegin);
-// set enablepreedit?
- wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_enablepreedit"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wid), opt->enablepreedit);
-
// set macro file name data
g_object_set_data(G_OBJECT(dlg), "macrofile", opt->macrofile);
}
// get processwatbegin?
wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_processwatbegin"));
opt->processwatbegin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid));
-
-// get enablepreedit?
- wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_enablepreedit"));
- opt->enablepreedit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid));
-
}
void macro_enable_toggle_cb(GtkToggleButton* btn, gpointer user_data)
gboolean enableMacro;
gboolean processwatbegin;
- gboolean enablepreedit;
-
gchar* macrofile;
} UnikeyMainSetupOptions;
<property name="position">5</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="check_enablepreedit">
- <property name="label" translatable="yes">Enable PreEdit</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
</object>
</child>
</object>