#include <fstream>
#include <gtkmm/stock.h>
+#include "pbd/openuri.h"
+
#include "ardour/ardour.h"
#include "ardour/filesystem_paths.h"
NagScreen*
NagScreen::maybe_nag (std::string why)
{
- Glib::ustring path;
+ std::string path;
bool really_subscribed;
bool maybe_subscribed;
void
NagScreen::mark_never_again ()
{
- Glib::ustring path;
+ std::string path;
path = Glib::build_filename (user_config_directory().to_string(), ".nevernag");
void
NagScreen::mark_subscriber ()
{
- Glib::ustring path;
+ std::string path;
path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub");
void
NagScreen::mark_affirmed_subscriber ()
{
- Glib::ustring path;
+ std::string path;
path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe");
bool
NagScreen::is_subscribed (bool& really)
{
- Glib::ustring path;
+ std::string path;
really = false;
/* 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
-}