From 22fb5d5f21d9ad8cb0f04cdfafdbe2d079c6d2f8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 26 Oct 2013 10:21:20 -0400 Subject: EProxyEditor: Save on "Method" combo box change. --- e-util/e-proxy-editor.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'e-util/e-proxy-editor.c') diff --git a/e-util/e-proxy-editor.c b/e-util/e-proxy-editor.c index 59afed12cf..e88a6d7364 100644 --- a/e-util/e-proxy-editor.c +++ b/e-util/e-proxy-editor.c @@ -139,6 +139,13 @@ proxy_editor_load (EProxyEditor *editor) g_object_unref (source); } +static void +proxy_editor_combo_box_changed_cb (GtkComboBox *widget, + EProxyEditor *editor) +{ + e_proxy_editor_save (editor); +} + static gboolean proxy_editor_focus_out_event_cb (GtkWidget *widget, GdkEvent *event, @@ -320,10 +327,6 @@ proxy_editor_constructed (GObject *object) editor->priv->method_combo_box = widget; /* do not reference */ gtk_widget_show (widget); - g_signal_connect ( - widget, "focus-out-event", - G_CALLBACK (proxy_editor_focus_out_event_cb), editor); - /*** Defer to Desktop Settings ***/ enum_value = g_enum_get_value (enum_class, E_PROXY_METHOD_DEFAULT); @@ -566,6 +569,12 @@ proxy_editor_constructed (GObject *object) /* Populate the widgets. */ proxy_editor_load (editor); + + /* Connect to this signal after the initial load. */ + g_signal_connect ( + editor->priv->method_combo_box, "changed", + G_CALLBACK (proxy_editor_combo_box_changed_cb), editor); + } static void -- cgit v1.2.3