aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-03-21 08:07:49 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-03-21 08:07:49 +0800
commit364cb04c2b58a371d45a6645dbca8d9f069fba2e (patch)
tree8d74d92fcdf15bfd111f357f7dfc1213556f5355 /mail/component-factory.c
parent9eeff8bfec181a1710b62926c64d617cce766054 (diff)
downloadgsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.gz
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.bz2
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.lz
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.xz
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.zst
gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.zip
Move the ComponentActionsPlaceholder into the Actions menu, instead of the
* evolution.xml: Move the ComponentActionsPlaceholder into the Actions menu, instead of the Actions menu being in the ComponentActionsPlaceholder. * evolution-addressbook.xml: Updated accordingly. * evolution-calendar.xml: Updated accordingly. * evolution-mail-global.xml: Updated accordingly. * evolution-mail-list.xml: Updated accordingly. * evolution-mail-message.xml: Updated accordingly. * evolution-mail-messagedisplay.xml: Updated accordingly. * evolution-tasks.xml: Updated accordingly. * evolution.xml: Add "SendReceive" verb, menu item and toolbar button. * evolution-mail-global.xml: Remove "MailGetSend" verb and menu item. * e-shell-view-menu.c (command_send_receive): New, implementation for the "SendReceive" verb. * e-shell.c (e_shell_send_receive): New. * evolution-shell-component.c (impl_sendReceive): Implementation of ShellComponent::sendReceive. (class_init): Add the "send_receive" signal. * evolution-shell-component.h: Added `send_receive' signal. * Evolution-ShellComponent.idl: Added ShellComponent::sendReceive. * component-factory.c (send_receive_cb): New, callback for the "send_receive" signal on the EvolutionShellComponent. (create_component): Connect. * folder-browser-ui.c: Remove verb "MailGetSend". * mail-callbacks.c (send_receive_mail): Removed. * mail-send-recv.c: Remove member current_folder from struct _send_data. (free_send_data): No need to unref here. (build_dialogue): Removed arg @current_folder. (mail_send_receive): Likewise. svn path=/trunk/; revision=16220
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 1e2a652ca4..452cff2c47 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -901,6 +901,33 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
g_timeout_add(100, idle_quit, NULL);
}
+static void
+send_receive_cb (EvolutionShellComponent *shell_component,
+ gboolean show_dialog,
+ void *data)
+{
+ const MailConfigAccount *account;
+
+ /* FIXME: configure_mail() should be changed to work without a
+ FolderBrowser, and then we will be able to call configure_mail from
+ here properly. */
+ if (!mail_config_is_configured () /* && !configure_mail (fb) */)
+ return;
+
+ account = mail_config_get_default_account ();
+ if (!account || !account->transport) {
+ GtkWidget *dialog;
+
+ dialog = gnome_error_dialog (_("You have not set a mail transport method"));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
+
+ return;
+ }
+
+ mail_send_receive ();
+}
+
static BonoboObject *
create_component (void)
{
@@ -918,6 +945,9 @@ create_component (void)
populate_folder_context_menu,
get_dnd_selection,
NULL);
+
+ gtk_signal_connect (GTK_OBJECT (shell_component), "send_receive",
+ GTK_SIGNAL_FUNC (send_receive_cb), NULL);
destination_interface = evolution_shell_component_dnd_destination_folder_new (destination_folder_handle_motion,
destination_folder_handle_drop,