From 3e255bcee92e6c1773081af46c3feff67aa34f55 Mon Sep 17 00:00:00 2001 From: pabs Date: Sun, 17 Feb 2008 05:46:22 +0000 Subject: [PATCH] For the help menu item, show an information dialog with a link to the documentation page on the website. git-svn-id: http://svn.voria.com/code@1723 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/app.cpp | 9 +++++++++ synfig-studio/trunk/src/gtkmm/app.h | 2 ++ synfig-studio/trunk/src/gtkmm/toolbox.cpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 251e919..f02e1db 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1881,6 +1881,15 @@ App::dialog_not_implemented() dialog.run(); } +void +App::dialog_help() +{ + Gtk::MessageDialog dialog(_("Documentation"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_CLOSE, true); + dialog.set_secondary_text(_("Documentation for Synfig Studio is available on the website:\n\nhttp://www.synfig.org/Documentation")); + dialog.set_title(_("Help")); + dialog.run(); +} + bool App::dialog_entry(const std::string &title, const std::string &message,std::string &text) { diff --git a/synfig-studio/trunk/src/gtkmm/app.h b/synfig-studio/trunk/src/gtkmm/app.h index cc5aa20..ac5cb54 100644 --- a/synfig-studio/trunk/src/gtkmm/app.h +++ b/synfig-studio/trunk/src/gtkmm/app.h @@ -332,6 +332,8 @@ public: static void dialog_not_implemented(); + static void dialog_help(); + static synfig::String get_user_app_directory(); static synfig::String get_config_file(const synfig::String& file); }; // END of class App diff --git a/synfig-studio/trunk/src/gtkmm/toolbox.cpp b/synfig-studio/trunk/src/gtkmm/toolbox.cpp index f65be46..18b24d0 100644 --- a/synfig-studio/trunk/src/gtkmm/toolbox.cpp +++ b/synfig-studio/trunk/src/gtkmm/toolbox.cpp @@ -259,7 +259,7 @@ Toolbox::Toolbox(): Gtk::Menu *helpmenu = manage(new class Gtk::Menu()); helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::HELP, - sigc::ptr_fun(studio::App::dialog_not_implemented))); + sigc::ptr_fun(studio::App::dialog_help))); helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-about"), sigc::ptr_fun(studio::App::dialog_about))); -- 2.7.4