diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-07-06 23:42:06 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-07-07 00:17:59 +0800 |
commit | 8eae40f7e895782fae19d289090edbb102b01bfd (patch) | |
tree | 207626be6479c8068b2b5c96d42819826d47b75e /mail | |
parent | 09e374bfc606916a840e9eb9809d33e6ac5359eb (diff) | |
download | gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar.gz gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar.bz2 gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar.lz gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar.xz gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.tar.zst gsoc2013-evolution-8eae40f7e895782fae19d289090edbb102b01bfd.zip |
EMailConfigWindow: Add a "changes-committed" signal.
Emitted after all changes are successfully committed over D-Bus.
Can connect to this signal to perform followup actions, such as
disconnecting the corresponding CamelService.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-config-window.c | 17 | ||||
-rw-r--r-- | mail/e-mail-config-window.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mail/e-mail-config-window.c b/mail/e-mail-config-window.c index 18cd143a7d..5e8262ac6b 100644 --- a/mail/e-mail-config-window.c +++ b/mail/e-mail-config-window.c @@ -52,10 +52,17 @@ enum { PROP_SESSION }; +enum { + CHANGES_COMMITTED, + LAST_SIGNAL +}; + /* Forward Declarations */ static void e_mail_config_window_alert_sink_init (EAlertSinkInterface *interface); +static guint signals[LAST_SIGNAL]; + G_DEFINE_TYPE_WITH_CODE ( EMailConfigWindow, e_mail_config_window, @@ -161,6 +168,7 @@ mail_config_window_commit_cb (GObject *object, g_error_free (error); } else { + g_signal_emit (window, signals[CHANGES_COMMITTED], 0); gtk_widget_destroy (GTK_WIDGET (window)); } } @@ -475,6 +483,15 @@ e_mail_config_window_class_init (EMailConfigWindowClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); + + signals[CHANGES_COMMITTED] = g_signal_new ( + "changes-committed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EMailConfigWindowClass, changes_committed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void diff --git a/mail/e-mail-config-window.h b/mail/e-mail-config-window.h index 78a7c073b8..6699e8ad38 100644 --- a/mail/e-mail-config-window.h +++ b/mail/e-mail-config-window.h @@ -55,6 +55,9 @@ struct _EMailConfigWindow { struct _EMailConfigWindowClass { GtkDialogClass parent_class; + + /* Signals */ + void (*changes_committed) (EMailConfigWindow *window); }; GType e_mail_config_window_get_type (void) G_GNUC_CONST; |