Revision: 7231
Author: ek.kato
Date: Thu Jul 21 21:21:24 2011
Log: * Merge r7139, r7155 from trunk.
http://code.google.com/p/uim/source/detail?r=7231
Modified:
/branches/1.7/helper/toolbar-common-gtk.c
=======================================
--- /branches/1.7/helper/toolbar-common-gtk.c Tue May 31 00:39:39 2011
+++ /branches/1.7/helper/toolbar-common-gtk.c Thu Jul 21 21:21:24 2011
@@ -311,17 +311,22 @@
return FALSE;
}
+
+static void
+save_default_im_internal(const char *im)
+{
+ uim_scm_callf("custom-set-value!",
+ "yy",
+ "custom-preserved-default-im-name",
+ im);
+ uim_custom_save_custom("custom-preserved-default-im-name");
+}
static void
save_default_im(const char *im)
{
- if (custom_enabled) {
- uim_scm_callf("custom-set-value!",
- "yy",
- "custom-preserved-default-im-name",
- im);
- uim_custom_save_custom("custom-preserved-default-im-name");
- }
+ if (custom_enabled)
+
uim_scm_call_with_gc_ready_stack((uim_gc_gate_func_ptr)save_default_im_internal,
(void *)im);
}
static gboolean
@@ -1034,15 +1039,14 @@
GList *prop_buttons = NULL;
GtkSizeGroup *sg;
-#if 0
/*
- * Please enable this if you'd like to save default IM into
- * ~/.uim.d/custom/custom-global.scm upon system global IM switch.
However,
- * using uim-custom consumes quite amount of memory, and requires
additional
- * startup time.
+ * Set uim-toolbar-save-default-im? #t in ~/.uim enable this if you'd
like to
+ * save default IM into ~/.uim.d/custom/custom-global.scm upon system
global
+ * IM switch. However, using uim-custom consumes quite amount of
memory, and
+ * requires additional startup time.
*/
- custom_enabled = (gboolean)uim_custom_enable();
-#endif
+ if (uim_scm_symbol_value_bool("uim-toolbar-save-default-im?"))
+ custom_enabled = (gboolean)uim_custom_enable();
helper_toolbar_check_custom();
init_icon();