summaryrefslogtreecommitdiff
path: root/capplets/common
diff options
context:
space:
mode:
authorRichard Hestilow <hestilow@ximian.com>2002-02-12 06:16:11 +0000
committerRachel Hestilow <hestgray@src.gnome.org>2002-02-12 06:16:11 +0000
commit31ac49063fa4928a81657b9ca4ede30dd184c175 (patch)
tree0e145da34add07b0a5acabfa3ce43f32ae4d736c /capplets/common
parent95d4480dc2680940a5452c76743fd103481ebffe (diff)
downloadgnome-control-center-31ac49063fa4928a81657b9ca4ede30dd184c175.tar.gz
Committed instant-apply patch sans background.
2002-02-11 Richard Hestilow <hestilow@ximian.com> * Committed instant-apply patch sans background.
Diffstat (limited to 'capplets/common')
-rw-r--r--capplets/common/gconf-property-editor.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/capplets/common/gconf-property-editor.c b/capplets/common/gconf-property-editor.c
index 4fd4c372f..fc8137022 100644
--- a/capplets/common/gconf-property-editor.c
+++ b/capplets/common/gconf-property-editor.c
@@ -409,6 +409,7 @@ peditor_string_value_changed (GConfClient *client,
GConfPropertyEditor *peditor)
{
GConfValue *value, *value_wid;
+ const char *entry_current_text;
if (peditor->p->changeset != NULL)
gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
@@ -417,7 +418,10 @@ peditor_string_value_changed (GConfClient *client,
if (value != NULL) {
value_wid = peditor->p->conv_to_widget_cb (value);
- gtk_entry_set_text (GTK_ENTRY (peditor->p->ui_control), gconf_value_get_string (value));
+ entry_current_text = gtk_entry_get_text (GTK_ENTRY (peditor->p->ui_control));
+ if (strcmp (entry_current_text, gconf_value_get_string (value)) != 0) {
+ gtk_entry_set_text (GTK_ENTRY (peditor->p->ui_control), gconf_value_get_string (value_wid));
+ }
gconf_value_free (value_wid);
}
}
@@ -426,13 +430,17 @@ static void
peditor_string_widget_changed (GConfPropertyEditor *peditor,
GtkEntry *entry)
{
- GConfValue *value, *value_wid;
-
+ GConfValue *value, *value_wid;
+
if (!peditor->p->inited) return;
+
value_wid = gconf_value_new (GCONF_VALUE_STRING);
+
gconf_value_set_string (value_wid, gtk_entry_get_text (entry));
value = peditor->p->conv_from_widget_cb (value_wid);
+
peditor_set_gconf_value (peditor, peditor->p->key, value);
+
g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
gconf_value_free (value_wid);
gconf_value_free (value);