[evolution] EProxyEditor: Save on "Method" combo box change.



commit 22fb5d5f21d9ad8cb0f04cdfafdbe2d079c6d2f8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Oct 26 10:21:20 2013 -0400

    EProxyEditor: Save on "Method" combo box change.

 e-util/e-proxy-editor.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-proxy-editor.c b/e-util/e-proxy-editor.c
index 59afed1..e88a6d7 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]