diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-24 23:53:14 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-24 23:53:14 +0800 |
commit | adf048e0505aa016e9b4c2ec13ab2050ee006906 (patch) | |
tree | 873a868de4ead1244ca61709dcb64fa50d7eaa24 /shell | |
parent | eb5d078e80b7fec3d4d7c957f657bc42749a9b99 (diff) | |
download | gsoc2013-evolution-adf048e0505aa016e9b4c2ec13ab2050ee006906.tar.gz gsoc2013-evolution-adf048e0505aa016e9b4c2ec13ab2050ee006906.tar.zst gsoc2013-evolution-adf048e0505aa016e9b4c2ec13ab2050ee006906.zip |
Add PilotConduitSettings verb. [#14019]
(command_pilot_conduit_settings): Implementation for the verb.
(launch_pilot_settings): Helper function.
svn path=/trunk/; revision=18201
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 10 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 50 |
2 files changed, 42 insertions, 18 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 6290eb625f..7642a60eec 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,6 +1,14 @@ +2002-09-24 Ettore Perazzoli <ettore@ximian.com> + + [#14019] + + * e-shell-view-menu.c: Add PilotConduitSettings verb. + (command_pilot_conduit_settings): Implementation for the verb. + (launch_pilot_settings): Helper function. + 2002-09-24 Mike Kestner <mkestner@ximian.com> - * e-storage-set-view.c (e_storage_set_enable_search): use the new + * e-storage-set-view.c (e_storage_set_enable_search): Use the new e_tree_set_search_column function instead of my lameass sort hack. 2002-09-23 Ettore Perazzoli <ettore@ximian.com> diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index b4f66baeb6..7503fda642 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -78,6 +78,30 @@ get_path_for_folder_op (EShellView *shell_view) return e_shell_view_get_current_path (shell_view); } +static void +launch_pilot_settings (const char *extra_arg) +{ + char *args[] = { + "gpilotd-control-applet", + extra_arg, + 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, extra_arg ? 2 : 1, args); + g_free (args[0]); + + if (pid == -1) + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Error executing %s."), args[0]); +} + /* EShellView callbacks. */ @@ -621,24 +645,15 @@ 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]); + launch_pilot_settings (NULL); +} - if (pid == -1) - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Error executing %s."), args[0]); +static void +command_pilot_conduit_settings (BonoboUIComponent *uih, + void *data, + const char *path) +{ + launch_pilot_settings ("--cap-id=1"); } @@ -686,6 +701,7 @@ static BonoboUIVerb actions_verbs[] = { static BonoboUIVerb tools_verbs[] = { BONOBO_UI_VERB ("Settings", command_settings), + BONOBO_UI_VERB ("PilotConduitSettings", command_pilot_conduit_settings), BONOBO_UI_VERB ("PilotSettings", command_pilot_settings), BONOBO_UI_VERB_END |