From 70d60db4d1da63dcab2798f6d55076be36e44e3f Mon Sep 17 00:00:00 2001 From: Raghavendran Date: Mon, 22 Jan 2007 18:59:48 +0000 Subject: Added code for implementing Send options via a data hook . 2007-01-18 Raghavendran * org-gnome-groupwise-features.xml: * mail-send-options.c : Added code for implementing Send options via a data hook . svn path=/trunk/; revision=33139 --- plugins/groupwise-features/mail-send-options.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'plugins/groupwise-features/mail-send-options.c') diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c index d098f9db76..64992e5c8d 100644 --- a/plugins/groupwise-features/mail-send-options.c +++ b/plugins/groupwise-features/mail-send-options.c @@ -33,6 +33,7 @@ #include "mail/em-menu.h" #include "mail/em-utils.h" +#include "mail/em-event.h" #include "composer/e-msg-composer.h" #include "libedataserver/e-account.h" @@ -41,7 +42,7 @@ static ESendOptionsDialog * dialog = NULL ; -void org_gnome_compose_send_options (EPlugin *ep, EMMenuTargetWidget *t); +void org_gnome_compose_send_options (EPlugin *ep, EMEventTargetComposer *t); static time_t add_day_to_time (time_t time, int days) @@ -137,27 +138,25 @@ send_options_commit (EMsgComposer *comp, gpointer user_data) } void -org_gnome_compose_send_options (EPlugin *ep, EMMenuTargetWidget *t) +org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t) { - struct _EMenuTarget menu = t->target ; - EMsgComposer *comp = (struct _EMsgComposer *)menu.widget ; + EMsgComposer *comp = (struct _EMsgComposer *)t->composer ; EAccount *account = NULL; char *temp = NULL; account = e_msg_composer_get_preferred_account (comp) ; temp = strstr (account->transport->url, "groupwise") ; if (!temp) { - g_print ("Sorry send options only available for a groupwise account\n") ; return; - } + } + e_msg_composer_set_send_options (comp, TRUE); /*disply the send options dialog*/ if (!dialog) { g_print ("New dialog\n\n") ; dialog = e_sendoptions_dialog_new () ; } - - e_sendoptions_dialog_run (dialog, menu.widget, E_ITEM_MAIL) ; + e_sendoptions_dialog_run (dialog, comp, E_ITEM_MAIL) ; g_signal_connect (dialog, "sod_response", G_CALLBACK (feed_input_data), comp); -- cgit v1.2.3