From 66ca1be222fafd0720f7906ae75af77866f241c0 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 20 Jun 2007 12:38:57 +0000 Subject: [PATCH] *** empty log message *** --- src/mim-config.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/mim-config.c b/src/mim-config.c index 04c01cf..a05d212 100644 --- a/src/mim-config.c +++ b/src/mim-config.c @@ -432,29 +432,31 @@ make_store_for_input_methods () } static gboolean -revert_to_saved (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gpointer data) +reset_to_default (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, + gpointer data) { - enum MimStatus status; + enum MimStatus status, new_status; MSymbol lang, name; MimConfigStatus *config_status = data; + MPlist *empty = mplist (); gtk_tree_model_get (model, iter, COL_LANG, &lang, COL_NAME, &name, -1); if (lang == Mnil) return FALSE; - gtk_tree_model_get (model, iter, COL_STATUS, &status, -1); - if (status != MIM_STATUS_MODIFIED) + gtk_tree_model_get (model, iter, COL_STATUS, &status, -1); + if (status == MIM_STATUS_DEFAULT) return FALSE; - minput_config_variable (lang, name, Mnil, NULL); - minput_config_command (lang, name, Mnil, NULL); - status = get_mim_status (lang, name); - update_child_row (model, iter, status, config_status, NULL); + minput_config_variable (lang, name, Mnil, empty); + minput_config_command (lang, name, Mnil, empty); + new_status = get_mim_status (lang, name); + if (status != new_status) + update_child_row (model, iter, new_status, config_status, NULL); return FALSE; } static gboolean -set_as_saved (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gpointer data) +revert_to_saved (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, + gpointer data) { enum MimStatus status; MSymbol lang, name; @@ -466,31 +468,29 @@ set_as_saved (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gtk_tree_model_get (model, iter, COL_STATUS, &status, -1); if (status != MIM_STATUS_MODIFIED) return FALSE; + minput_config_variable (lang, name, Mnil, NULL); + minput_config_command (lang, name, Mnil, NULL); status = get_mim_status (lang, name); update_child_row (model, iter, status, config_status, NULL); return FALSE; } static gboolean -reset_to_default (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gpointer data) +set_as_saved (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, + gpointer data) { - enum MimStatus status, new_status; + enum MimStatus status; MSymbol lang, name; MimConfigStatus *config_status = data; - MPlist *empty = mplist (); gtk_tree_model_get (model, iter, COL_LANG, &lang, COL_NAME, &name, -1); if (lang == Mnil) return FALSE; - gtk_tree_model_get (model, iter, COL_STATUS, &status, -1); - if (status == MIM_STATUS_DEFAULT) + gtk_tree_model_get (model, iter, COL_STATUS, &status, -1); + if (status != MIM_STATUS_MODIFIED) return FALSE; - minput_config_variable (lang, name, Mnil, empty); - minput_config_command (lang, name, Mnil, empty); - new_status = get_mim_status (lang, name); - if (status != new_status) - update_child_row (model, iter, new_status, config_status, NULL); + status = get_mim_status (lang, name); + update_child_row (model, iter, status, config_status, NULL); return FALSE; } -- 1.7.10.4