From adf048e0505aa016e9b4c2ec13ab2050ee006906 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 24 Sep 2002 15:53:14 +0000 Subject: Add PilotConduitSettings verb. [#14019] (command_pilot_conduit_settings): Implementation for the verb. (launch_pilot_settings): Helper function. svn path=/trunk/; revision=18201 --- shell/ChangeLog | 10 +++++++++- shell/e-shell-view-menu.c | 50 +++++++++++++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 18 deletions(-) (limited to 'shell') 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 + + [#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 - * 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 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 -- cgit v1.2.3