diff options
author | Raghavendran <raghavguru7@gmail.com> | 2007-01-23 02:59:48 +0800 |
---|---|---|
committer | Veerapuram Varadhan <vvaradan@src.gnome.org> | 2007-01-23 02:59:48 +0800 |
commit | 70d60db4d1da63dcab2798f6d55076be36e44e3f (patch) | |
tree | c367a91b818bdac72e80d77b6b2642977eec36a2 | |
parent | 7aecd03e9465610ddc6d8cb16615e9cf3d4af356 (diff) | |
download | gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar.gz gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar.bz2 gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar.lz gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar.xz gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.tar.zst gsoc2013-evolution-70d60db4d1da63dcab2798f6d55076be36e44e3f.zip |
Added code for implementing Send options via a data hook .
2007-01-18 Raghavendran <raghavguru7@gmail.com>
* org-gnome-groupwise-features.xml:
* mail-send-options.c :
Added code for implementing Send options via
a data hook .
svn path=/trunk/; revision=33139
-rw-r--r-- | plugins/groupwise-features/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/groupwise-features/mail-send-options.c | 15 | ||||
-rw-r--r-- | plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml | 18 |
3 files changed, 21 insertions, 18 deletions
diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog index 721babc7f8..70e2c2c414 100644 --- a/plugins/groupwise-features/ChangeLog +++ b/plugins/groupwise-features/ChangeLog @@ -1,3 +1,9 @@ +2007-01-18 Raghavendran <raghavguru7@gmail.com> + + * org-gnome-groupwise-features.xml: + * mail-send-options.c : + Added code for implementing Send options via + a data hook . 2006-11-17 Harish Krishnaswamy <kharish@novell.com> * proxy-login.c: (proxy_login_get_cnc): Remove 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); diff --git a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml b/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml index 1d0bffec73..47f74060ec 100644 --- a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml +++ b/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml @@ -8,6 +8,7 @@ <author name="Parthasarathi Susarla" email="sparthasarathi@novell.com"/> <author name="Sankar P" email="psankar@novell.com"/> <author name="Shreyas Srinivasan" email="sshreyas@novell.com"/> + <author name="Raghavendran R" email="raghavguru7@gmail.com"/> <_description>A plugin for the features in Groupwise accounts.</_description> <hook class="org.gnome.evolution.mail.config:1.0"> @@ -63,16 +64,13 @@ factory="e_book_groupwise_dummy"/> </group> </hook> - <hook class="org.gnome.evolution.mail.bonobomenu:1.0"> - <menu id="org.gnome.evolution.mail.composer" target="select"> - <ui file="@PLUGINDIR@/org-gnome-compose-send-options.xml"/> - <item - type="item" - verb="EPSOSendOptions" - path="/commands/EPSOSendOptions" - enable="one" - activate="org_gnome_compose_send_options"/> - </menu> + <hook class="org.gnome.evolution.mail.events:1.0"> + <event + id="composer.selectsendoption" + handle="org_gnome_composer_send_options" + target="composer" + enable="sendoption" + /> </hook> <hook class="org.gnome.evolution.mail.config:1.0"> |