diff options
author | Vivek Jain <jvivek@novell.com> | 2005-07-20 19:59:53 +0800 |
---|---|---|
committer | Jain Vivek <jvivek@src.gnome.org> | 2005-07-20 19:59:53 +0800 |
commit | 7b0b66588bd9cc64ff0149c6743f35d5a6555698 (patch) | |
tree | bc40771279cfa99997d79aeb0a8d5ab527e06cf5 | |
parent | 981030f7093a385e9bf4cca723f92d0363550a65 (diff) | |
download | gsoc2013-evolution-7b0b66588bd9cc64ff0149c6743f35d5a6555698.tar.gz gsoc2013-evolution-7b0b66588bd9cc64ff0149c6743f35d5a6555698.tar.zst gsoc2013-evolution-7b0b66588bd9cc64ff0149c6743f35d5a6555698.zip |
ESendOptionsDialogClass: has a member new virtual method for default
2005-07-20 Vivek Jain <jvivek@novell.com>
* e-send-options.h : ESendOptionsDialogClass: has a member new virtual
method for default callback of "sod_response"
* e-send-options.c : introduced a new signal "sod_response"
captures the response for the child dialog and makes it available at the
object level (useful for the external members invoking the dialog)
svn path=/trunk/; revision=29815
-rw-r--r-- | widgets/misc/ChangeLog | 8 | ||||
-rw-r--r-- | widgets/misc/e-send-options.c | 19 | ||||
-rw-r--r-- | widgets/misc/e-send-options.h | 1 |
3 files changed, 27 insertions, 1 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index cdfc8195ec..38965e6d96 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,11 @@ +2005-07-20 Vivek Jain <jvivek@novell.com> + + * e-send-options.h : ESendOptionsDialogClass: has a member new virtual + method for default callback of "sod_response" + * e-send-options.c : introduced a new signal "sod_response" + captures the response for the child dialog and makes it available at the + object level (useful for the external members invoking the dialog) + 2005-07-20 Srinivasa Ragavan <sragavan@novell.com> * e-attachment-bar.[ch]:(remove_attachment) (update) (e_attachment_bar_get_selector) diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c index 4d0f5b1cfe..5f8a2991bd 100644 --- a/widgets/misc/e-send-options.c +++ b/widgets/misc/e-send-options.c @@ -104,6 +104,12 @@ static void e_sendoptions_dialog_dispose (GObject *object); static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data); static GObjectClass *parent_class = NULL; +enum { + SOD_RESPONSE, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = {0}; static void e_send_options_get_widgets_data (ESendOptionsDialog *sod) @@ -588,7 +594,7 @@ static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data sod = func_data; priv = sod->priv; - + switch (state) { case GTK_RESPONSE_OK: e_send_options_get_widgets_data (sod); @@ -607,6 +613,8 @@ static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data g_warning ("%s", error->message); break; } + g_signal_emit (G_OBJECT (func_data), signals[SOD_RESPONSE], 0, state); + } gboolean @@ -787,6 +795,15 @@ e_sendoptions_dialog_class_init (GObjectClass *object) object_class->finalize = e_sendoptions_dialog_finalize; object_class->dispose = e_sendoptions_dialog_dispose; + signals[SOD_RESPONSE] = g_signal_new ("sod_response", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (ESendOptionsDialogClass, sod_response), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + } GType e_sendoptions_dialog_get_type (void) diff --git a/widgets/misc/e-send-options.h b/widgets/misc/e-send-options.h index ba48734e5a..0ea71e269b 100644 --- a/widgets/misc/e-send-options.h +++ b/widgets/misc/e-send-options.h @@ -104,6 +104,7 @@ struct _ESendOptionsDialog { struct _ESendOptionsDialogClass { GObjectClass parent_class; + void (* sod_response) (ESendOptionsDialog *sd, gint status); }; GType e_sendoptions_dialog_get_type (void); |