X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=21995a8d2fb4aec8193d97d42a9fed7ae9def200;hb=34c50c5e74c69ec94cefa4cf99a03d8cac42e769;hp=d0ebe92a2236e4931a34f573e9851ac90aea7915;hpb=fedae32634321129077b5e05c49ee066e9c61d4d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index d0ebe92..21995a8 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1893,25 +1893,13 @@ App::dialog_not_implemented() dialog.run(); } -void -App::dialog_help() -{ - if (!open_url("http://www.synfig.org/Documentation")) - { - 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::open_url(const std::string &url) +static bool +try_open_url(const std::string &url) { #ifdef WIN32 return ShellExecute(GetDesktopWindow(), "open", url.c_str(), NULL, NULL, SW_SHOW); #else // WIN32 - gchar* argv[3] = {strdup(browser_command.c_str()), strdup(url.c_str()), NULL}; + gchar* argv[3] = {strdup(App::browser_command.c_str()), strdup(url.c_str()), NULL}; GError* gerror = NULL; gboolean retval; @@ -1930,6 +1918,24 @@ App::open_url(const std::string &url) #endif // WIN32 } +void +App::dialog_help() +{ + if (!try_open_url("http://synfig.org/Documentation")) + { + 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(); + } +} + +void +App::open_url(const std::string &url) +{ + try_open_url(url); +} + bool App::dialog_entry(const std::string &title, const std::string &message,std::string &text) {