diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-21 08:07:49 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-03-21 08:07:49 +0800 |
commit | 364cb04c2b58a371d45a6645dbca8d9f069fba2e (patch) | |
tree | 8d74d92fcdf15bfd111f357f7dfc1213556f5355 /shell | |
parent | 9eeff8bfec181a1710b62926c64d617cce766054 (diff) | |
download | gsoc2013-evolution-364cb04c2b58a371d45a6645dbca8d9f069fba2e.tar.gz 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 'shell')
-rw-r--r-- | shell/ChangeLog | 15 | ||||
-rw-r--r-- | shell/Evolution-ShellComponent.idl | 2 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 25 | ||||
-rw-r--r-- | shell/e-shell.c | 38 | ||||
-rw-r--r-- | shell/e-shell.h | 2 | ||||
-rw-r--r-- | shell/evolution-shell-component.c | 22 | ||||
-rw-r--r-- | shell/evolution-shell-component.h | 3 |
7 files changed, 106 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 98bd69fc74..fca8f56557 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,18 @@ +2002-03-20 Ettore Perazzoli <ettore@ximian.com> + + * 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. + 2002-03-18 Ettore Perazzoli <ettore@ximian.com> * e-storage-set-view.etspec: Add `search="string"' for the diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index b5f5095c43..5ca38e3bdb 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -102,6 +102,8 @@ module Evolution { in string parent_folder_physical_uri, in string parent_folder_type) raises (UnsupportedType); + + void sendReceive (in boolean show_dialog); }; interface ShellComponentListener { diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index c72f899bd5..58b2d8790c 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -271,6 +271,20 @@ command_toggle_shortcut_bar (BonoboUIComponent *component, static void +command_send_receive (BonoboUIComponent *ui_component, + void *data, + const char *path) +{ + EShellView *shell_view; + EShell *shell; + + shell_view = E_SHELL_VIEW (data); + shell = e_shell_view_get_shell (shell_view); + + e_shell_send_receive (shell); +} + +static void command_new_folder (BonoboUIComponent *uih, void *data, const char *path) @@ -645,6 +659,12 @@ BonoboUIVerb folder_verbs [] = { BONOBO_UI_VERB_END }; +BonoboUIVerb actions_verbs[] = { + BONOBO_UI_VERB ("SendReceive", command_send_receive), + + BONOBO_UI_VERB_END +}; + BonoboUIVerb tools_verbs[] = { BONOBO_UI_VERB ("Settings", command_settings), @@ -660,11 +680,15 @@ BonoboUIVerb help_verbs [] = { }; static EPixmap pixmaps [] = { + E_PIXMAP ("/commands/SendReceive", "send-receive.xpm"), + E_PIXMAP ("/menu/File/New/Folder", "folder.xpm"), E_PIXMAP ("/menu/File/Folder/Folder", "folder.xpm"), E_PIXMAP ("/menu/File/FileImporter", "import.xpm"), E_PIXMAP ("/menu/File/ToggleOffline", "work_offline.xpm"), + E_PIXMAP ("/Toolbar/SendReceive", "buttons/send-24-receive.png"), + E_PIXMAP_END }; @@ -785,6 +809,7 @@ e_shell_view_menu_setup (EShellView *shell_view) bonobo_ui_component_add_verb_list_with_data (uic, folder_verbs, shell_view); bonobo_ui_component_add_verb_list_with_data (uic, new_verbs, shell_view); + bonobo_ui_component_add_verb_list_with_data (uic, actions_verbs, shell_view); bonobo_ui_component_add_verb_list_with_data (uic, tools_verbs, shell_view); bonobo_ui_component_add_verb_list (uic, help_verbs); diff --git a/shell/e-shell.c b/shell/e-shell.c index ccab2004d5..8330566b4b 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1869,10 +1869,46 @@ e_shell_go_online (EShell *shell, } +void +e_shell_send_receive (EShell *shell) +{ + EShellPrivate *priv; + GList *id_list; + GList *p; + + g_return_if_fail (E_IS_SHELL (shell)); + + priv = shell->priv; + + id_list = e_component_registry_get_id_list (priv->component_registry); + + for (p = id_list; p != NULL; p = p->next) { + EvolutionShellComponentClient *component_client; + CORBA_Environment ev; + const char *id; + + id = (const char *) p->data; + component_client = e_component_registry_get_component_by_id (priv->component_registry, id); + + CORBA_exception_init (&ev); + + GNOME_Evolution_ShellComponent_sendReceive + (bonobo_object_corba_objref (BONOBO_OBJECT (component_client)), TRUE, &ev); + + if (BONOBO_EX (&ev)) + g_warning ("Error invoking Send/Receive on %s -- %s", id, BONOBO_EX_ID (&ev)); + + CORBA_exception_free (&ev); + } + + e_free_string_list (id_list); +} + + Bonobo_ConfigDatabase e_shell_get_config_db (EShell *shell) { - g_return_val_if_fail (shell != NULL, CORBA_OBJECT_NIL); + g_return_val_if_fail (E_IS_SHELL (shell), CORBA_OBJECT_NIL); return shell->priv->db; } diff --git a/shell/e-shell.h b/shell/e-shell.h index bea61037a0..818ba0233f 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -143,6 +143,8 @@ void e_shell_go_offline (EShell *shell, void e_shell_go_online (EShell *shell, EShellView *action_view); +void e_shell_send_receive (EShell *shell); + Bonobo_ConfigDatabase e_shell_get_config_db (EShell *shell); EComponentRegistry *e_shell_get_component_registry (EShell *shell); EShellUserCreatableItemsHandler *e_shell_get_user_creatable_items_handler (EShell *shell); diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 0357a20921..072ff580b1 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -82,6 +82,7 @@ enum { INTERACTIVE, HANDLE_EXTERNAL_URI, USER_CREATE_NEW_ITEM, + SEND_RECEIVE, LAST_SIGNAL }; @@ -657,6 +658,17 @@ impl_userCreateNewItem (PortableServer_Servant servant, gtk_signal_emit (GTK_OBJECT (shell_component), signals[USER_CREATE_NEW_ITEM], id, parent_physical_uri, parent_type); } +static void +impl_sendReceive (PortableServer_Servant servant, + const CORBA_boolean show_dialog, + CORBA_Environment *ev) +{ + EvolutionShellComponent *shell_component; + + shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object_from_servant (servant)); + gtk_signal_emit (GTK_OBJECT (shell_component), signals[SEND_RECEIVE], show_dialog); +} + /* GtkObject methods. */ @@ -831,6 +843,15 @@ class_init (EvolutionShellComponentClass *klass) GTK_TYPE_STRING, GTK_TYPE_STRING); + signals[SEND_RECEIVE] + = gtk_signal_new ("send_receive", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, send_receive), + gtk_marshal_NONE__BOOL, + GTK_TYPE_NONE, 1, + GTK_TYPE_BOOL); + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); parent_class = gtk_type_class (PARENT_TYPE); @@ -849,6 +870,7 @@ class_init (EvolutionShellComponentClass *klass) epv->xferFolderAsync = impl_xferFolderAsync; epv->populateFolderContextMenu = impl_populateFolderContextMenu; epv->userCreateNewItem = impl_userCreateNewItem; + epv->sendReceive = impl_sendReceive; shell_component_class = EVOLUTION_SHELL_COMPONENT_CLASS (object_class); shell_component_class->owner_died = impl_owner_died; diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index 7f7073572e..2364f48450 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -154,6 +154,9 @@ struct _EvolutionShellComponentClass { const char *id, const char *parent_folder_physical_uri, const char *parent_folder_type); + + void (* send_receive) (EvolutionShellComponent *shell_component, + gboolean show_dialog); }; |