X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fnag.cc;h=d82d986837bb76b1747cddc6ceacdd876a736f5c;hb=458925dba520d6eb795daef755016f29cf77d015;hp=7ae1b6e809ec10b350abca1c844f6aafc58abab0;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/gtk2_ardour/nag.cc b/gtk2_ardour/nag.cc index 7ae1b6e809..d82d986837 100644 --- a/gtk2_ardour/nag.cc +++ b/gtk2_ardour/nag.cc @@ -5,6 +5,8 @@ #include #include +#include "pbd/openuri.h" + #include "ardour/ardour.h" #include "ardour/filesystem_paths.h" @@ -89,7 +91,7 @@ NagScreen::nag () NagScreen* NagScreen::maybe_nag (std::string why) { - Glib::ustring path; + std::string path; bool really_subscribed; bool maybe_subscribed; @@ -111,7 +113,7 @@ NagScreen::maybe_nag (std::string why) void NagScreen::mark_never_again () { - Glib::ustring path; + std::string path; path = Glib::build_filename (user_config_directory().to_string(), ".nevernag"); @@ -121,7 +123,7 @@ NagScreen::mark_never_again () void NagScreen::mark_subscriber () { - Glib::ustring path; + std::string path; path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub"); @@ -131,7 +133,7 @@ NagScreen::mark_subscriber () void NagScreen::mark_affirmed_subscriber () { - Glib::ustring path; + std::string path; path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe"); @@ -141,7 +143,7 @@ NagScreen::mark_affirmed_subscriber () bool NagScreen::is_subscribed (bool& really) { - Glib::ustring path; + std::string path; really = false; @@ -176,35 +178,16 @@ NagScreen::offer_to_donate () /* we don't care if it fails */ - open_uri (uri); + PBD::open_uri (uri); } void NagScreen::offer_to_subscribe () { const char* uri = "http://ardour.org/subscribe"; - - if (open_uri (uri)) { + + if (PBD::open_uri (uri)) { mark_subscriber (); } } -bool -NagScreen::open_uri (const char* uri) -{ -#ifdef HAVE_GTK_OPEN_URI - GError* err; - return gtk_open_uri (0, uri, GDK_CURRENT_TIME, &err); -#else -#ifdef GTKOSX - extern bool cocoa_open_url (const char*); - return cocoa_open_url (uri); -#else - std::string command = "xdg-open "; - command += uri; - spawn_command_line_async (command); - - return true; -#endif -#endif -}