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/e-shell-view-menu.c | |
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/e-shell-view-menu.c')
-rw-r--r-- | shell/e-shell-view-menu.c | 50 |
1 files changed, 33 insertions, 17 deletions
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 |