diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-09-28 02:22:54 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-09-28 02:22:54 +0800 |
commit | 6c47b86afeb4d2265331cad86cea23be75df00b6 (patch) | |
tree | 06762466d020bd306f3d88c4aa94235cbe2a4b1b /shell | |
parent | bc4de6574433fb7bf1c18a94934d26d2a5fed1a9 (diff) | |
download | gsoc2013-evolution-6c47b86afeb4d2265331cad86cea23be75df00b6.tar.gz gsoc2013-evolution-6c47b86afeb4d2265331cad86cea23be75df00b6.tar.zst gsoc2013-evolution-6c47b86afeb4d2265331cad86cea23be75df00b6.zip |
Remove. (command_new_mail_message): Removed. (command_pilot_settings):
* e-shell-view-menu.c (DEFINE_UNIMPLEMENTED): Remove.
(command_new_mail_message): Removed.
(command_pilot_settings): New.
(e_shell_view_menu_setup): Add tools verbs.
svn path=/trunk/; revision=13194
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 70 |
2 files changed, 45 insertions, 32 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 5e7400a337..7ef4e8e95b 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2001-09-27 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-view-menu.c (DEFINE_UNIMPLEMENTED): Remove. + (command_new_mail_message): Removed. + (command_pilot_settings): New. + (e_shell_view_menu_setup): Add tools verbs. + 2001-09-26 Ettore Perazzoli <ettore@ximian.com> * e-shell-view.c (setup_verb_sensitivity_for_folder): New helper diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 890527950d..f0c392e032 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -45,6 +45,8 @@ #include <liboaf/liboaf.h> #include <bonobo/bonobo-moniker-util.h> +#include <gal/widgets/e-gui-utils.h> + #include "e-shell-folder-creation-dialog.h" #include "e-shell-folder-selection-dialog.h" @@ -504,31 +506,6 @@ command_work_online (BonoboUIComponent *uih, } -/* Unimplemented commands. */ - -#define DEFINE_UNIMPLEMENTED(func) \ -static void \ -func (BonoboUIComponent *uic, void *data, const char *path) \ -{ \ - g_warning ("e-shell-view-menu.c: %s: not implemented.", #func); \ -} \ - -static void -command_new_mail_message (BonoboUIComponent *uih, - gpointer data, - const char *path) -{ - CORBA_Environment ev; - Bonobo_Unknown object; - - CORBA_exception_init (&ev); - object = bonobo_get_object ("OAFIID:GNOME_Evolution_Mail_Composer!visible=1", - "Bonobo/Unknown", &ev); - - CORBA_exception_free (&ev); -} - - static void new_shortcut_dialog_cancelled_cb (EShellFolderSelectionDialog *folder_selection_dialog, void *data) @@ -597,18 +574,39 @@ command_new_shortcut (BonoboUIComponent *uih, gtk_widget_show (folder_selection_dialog); } -DEFINE_UNIMPLEMENTED (command_new_contact) -DEFINE_UNIMPLEMENTED (command_new_task_request) + +/* Tools menu. */ + +static void +command_pilot_settings (BonoboUIComponent *uih, + void *data, + const char *path) +{ + char *args[] = { + "gpilotd-control-applet", + NULL + }; + int pid; + args[0] = gnome_is_program_in_path ("gpilotd-control-applet"); + if (!args[0]) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("The GNOME Pilot tools do not appear to be installed on this system.")); + return; + } + + pid = gnome_execute_async (NULL, 4, args); + g_free (args[0]); + + if (pid == -1) + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Error executing %s."), args[0]); +} + + BonoboUIVerb new_verbs [] = { BONOBO_UI_VERB ("NewFolder", command_new_folder), BONOBO_UI_VERB ("NewShortcut", command_new_shortcut), - BONOBO_UI_VERB ("NewMailMessage", command_new_mail_message), - BONOBO_UI_VERB ("NewAppointment", command_new_shortcut), - BONOBO_UI_VERB ("NewContact", command_new_contact), - BONOBO_UI_VERB ("NewTask", command_new_task_request), - BONOBO_UI_VERB_END }; @@ -638,6 +636,12 @@ BonoboUIVerb folder_verbs [] = { BONOBO_UI_VERB_END }; +BonoboUIVerb tools_verbs[] = { + BONOBO_UI_VERB ("PilotSettings", command_pilot_settings), + + BONOBO_UI_VERB_END +}; + BonoboUIVerb help_verbs [] = { BONOBO_UI_VERB_DATA ("HelpFAQ", command_help_faq, NULL), @@ -770,6 +774,8 @@ 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, tools_verbs, shell_view); + bonobo_ui_component_add_verb_list (uic, help_verbs); menu_do_misc (uic, shell_view); |