diff options
author | Dan Winship <danw@src.gnome.org> | 2000-06-02 07:40:51 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-06-02 07:40:51 +0800 |
commit | cfd8facc65f6c9d7d35355cd0ad88befd9bc6910 (patch) | |
tree | 2e2e70e252e50760593f7751e7bafa82f83059d1 /shell/e-shell-view-menu.c | |
parent | 5aa154015fd341999091c3a7c6948f61c3996027 (diff) | |
download | gsoc2013-evolution-cfd8facc65f6c9d7d35355cd0ad88befd9bc6910.tar.gz gsoc2013-evolution-cfd8facc65f6c9d7d35355cd0ad88befd9bc6910.tar.zst gsoc2013-evolution-cfd8facc65f6c9d7d35355cd0ad88befd9bc6910.zip |
New menu callback to launch the help browser. (menu_help): add pointers to
* e-shell-view-menu.c (command_help): New menu callback to launch
the help browser.
(menu_help): add pointers to the users' guide.
(e_shell_view_menu_setup): Add the help menu stuff to the uih.
svn path=/trunk/; revision=3347
Diffstat (limited to 'shell/e-shell-view-menu.c')
-rw-r--r-- | shell/e-shell-view-menu.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 8b4bf6c9af..329e4faa24 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -167,6 +167,16 @@ command_about_box (GtkWidget *menuitem, gpointer data) } static void +command_help (BonoboUIHandler *uih, void *data, const char *path) +{ + char *url; + + url = g_strdup_printf ("ghelp:%s/gnome/help/evolution/C/%s", + EVOLUTION_DATADIR, (char *)data); + gnome_url_show (url); +} + +static void command_toggle_folder_bar (BonoboUIHandler *uih, void *data, const char *path) @@ -340,7 +350,26 @@ static GnomeUIInfo menu_actions [] = { static GnomeUIInfo menu_help [] = { GNOMEUIINFO_MENU_ABOUT_ITEM(command_about_box, NULL), - { GNOME_APP_UI_ITEM, N_("_Submit bug"), + + GNOMEUIINFO_SEPARATOR, + { GNOME_APP_UI_ITEM, N_("Help _Index"), NULL, + command_help, "index.html", + NULL, 0, 0, 0, 0 }, + { GNOME_APP_UI_ITEM, N_("Using the _Shell"), NULL, + command_help, "usage-mainwindow.html", + NULL, 0, 0, 0, 0 }, + { GNOME_APP_UI_ITEM, N_("Using the _Mailer"), NULL, + command_help, "usage-mail.html", + NULL, 0, 0, 0, 0 }, + { GNOME_APP_UI_ITEM, N_("Using the _Calendar"), NULL, + command_help, "usage-calendar.html", + NULL, 0, 0, 0, 0 }, + { GNOME_APP_UI_ITEM, N_("Using the Cont_act Manager"), NULL, + command_help, "usage-contact.html", + NULL, 0, 0, 0, 0 }, + + GNOMEUIINFO_SEPARATOR, + { GNOME_APP_UI_ITEM, N_("_Submit bug report"), N_("Submit bug-report via bug-buddy"), command_run_bugbuddy, NULL, NULL, 0, 0, 'n', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, GNOMEUIINFO_END @@ -358,9 +387,12 @@ static GnomeUIInfo menu [] = { { GNOME_APP_UI_SUBTREE, N_("_Tools"), NULL, menu_tools }, { GNOME_APP_UI_SUBTREE, N_("_Actions"), NULL, menu_actions }, - GNOMEUIINFO_MENU_HELP_TREE (menu_help), - /* FIXME: Should provide a help menu here; Bonobo needs it. */ + GNOMEUIINFO_END +}; + +static GnomeUIInfo menu_2 [] = { + GNOMEUIINFO_MENU_HELP_TREE (menu_help), GNOMEUIINFO_END }; @@ -385,6 +417,11 @@ e_shell_view_menu_setup (EShellView *shell_view) bonobo_ui_handler_menu_add_list (uih, "/", list); bonobo_ui_handler_menu_free_list (list); + /* Parse the Help menu without bashing over the user_data */ + list = bonobo_ui_handler_menu_parse_uiinfo_list (menu_2); + bonobo_ui_handler_menu_add_list (uih, "/", list); + bonobo_ui_handler_menu_free_list (list); + gtk_signal_connect (GTK_OBJECT (shell_view), "shortcut_bar_mode_changed", GTK_SIGNAL_FUNC (shortcut_bar_mode_changed_cb), SHORTCUT_BAR_TOGGLE_PATH); |