changes to help strp silence
[ardour.git] / gtk2_ardour / nag.cc
index ece3ac3e2a6c1990f9f8e860180b2119683326f5..7ae1b6e809ec10b350abca1c844f6aafc58abab0 100644 (file)
@@ -1,8 +1,12 @@
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <fstream>
 #include <gtkmm/stock.h>
 
-#include <ardour/ardour.h>
-#include <ardour/filesystem_paths.h>
+#include "ardour/ardour.h"
+#include "ardour/filesystem_paths.h"
 
 #include "nag.h"
 #include "i18n.h"
@@ -12,7 +16,7 @@ using namespace std;
 using namespace Glib;
 using namespace Gtk;
 
-NagScreen::NagScreen (std::string context, bool maybe_sub)
+NagScreen::NagScreen (std::string /*context*/, bool maybe_sub)
        : ArdourDialog (_("Support Ardour Development"), true)
        , donate_button (button_group, _("I'd like to make a one-time donation"))
        , subscribe_button (button_group, _("Tell me more about becoming a subscriber"))
@@ -36,13 +40,13 @@ its development with either a one-time donation or subscription. Nothing\n\
 will happen if you choose not to do so. However Ardour's continuing development\n\
 relies on a stable, sustainable income stream. Thanks for using Ardour!"));
        }
-       
+
        button_box.pack_start (donate_button);
        button_box.pack_start (subscribe_button);
        button_box.pack_start (existing_button);
        button_box.pack_start (next_time_button);
        button_box.pack_start (never_again_button);
-       
+
        get_vbox()->set_spacing (12);
        get_vbox()->pack_start (message);
        get_vbox()->pack_start (button_box);
@@ -96,7 +100,7 @@ NagScreen::maybe_nag (std::string why)
        }
 
        maybe_subscribed = is_subscribed (really_subscribed);
-       
+
        if (really_subscribed) {
                return 0;
        }
@@ -110,7 +114,7 @@ NagScreen::mark_never_again ()
        Glib::ustring path;
 
        path = Glib::build_filename (user_config_directory().to_string(), ".nevernag");
-       
+
        ofstream nagfile (path.c_str());
 }
 
@@ -120,7 +124,7 @@ NagScreen::mark_subscriber ()
        Glib::ustring path;
 
        path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub");
-       
+
        ofstream subsfile (path.c_str());
 }
 
@@ -130,7 +134,7 @@ NagScreen::mark_affirmed_subscriber ()
        Glib::ustring path;
 
        path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe");
-       
+
        ofstream subsfile (path.c_str());
 }
 
@@ -141,7 +145,7 @@ NagScreen::is_subscribed (bool& really)
 
        really = false;
 
-       /* what we'd really like here is a way to query paypal 
+       /* what we'd really like here is a way to query paypal
           for someone's subscription status. thats a bit complicated
           so for now, just see if they ever told us they were
           subscribed. we try to trust our users :)
@@ -192,15 +196,15 @@ NagScreen::open_uri (const char* uri)
        GError* err;
        return gtk_open_uri (0, uri, GDK_CURRENT_TIME, &err);
 #else
-#ifndef __APPLE__
+#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;
-#else
-       extern bool cocoa_open_url (const char*);
-       return cocoa_open_url (uri);
 #endif
 #endif
 }