Fix yet another oversight for the windows icon file update
[ardour.git] / gtk2_ardour / nag.cc
index 45f040eb1d65f1d40c89138e6dd58dff163eac69..d553efd1979220bf97629d596ad98e4a75ddaca5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Paul Davis 
+    Copyright (C) 2012 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #include "gtk2ardour-config.h"
 #endif
 
-#include <fstream>
+#include "pbd/gstdio_compat.h"
 #include <gtkmm/stock.h>
 
 #include "pbd/openuri.h"
 
 #include "ardour/filesystem_paths.h"
+#include "ardour/rc_configuration.h"
 
 #include "nag.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace std;
@@ -37,7 +38,7 @@ using namespace Glib;
 using namespace Gtk;
 
 NagScreen::NagScreen (std::string /*context*/, bool maybe_sub)
-       : ArdourDialog (_("Support Ardour Development"), true)
+       : ArdourDialog (string_compose (_("Support %1 Development"), PROGRAM_NAME), 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"))
        , existing_button (button_group, _("I'm already a subscriber!"))
@@ -135,7 +136,7 @@ NagScreen::mark_never_again ()
 
        path = Glib::build_filename (user_config_directory(), ".nevernag");
 
-       ofstream nagfile (path.c_str());
+       g_file_set_contents (path.c_str(), "", -1, NULL);
 }
 
 void
@@ -145,7 +146,7 @@ NagScreen::mark_subscriber ()
 
        path = Glib::build_filename (user_config_directory(), ".askedaboutsub");
 
-       ofstream subsfile (path.c_str());
+       g_file_set_contents (path.c_str(), "", -1, NULL);
 }
 
 void
@@ -155,7 +156,7 @@ NagScreen::mark_affirmed_subscriber ()
 
        path = Glib::build_filename (user_config_directory(), ".isubscribe");
 
-       ofstream subsfile (path.c_str());
+       g_file_set_contents (path.c_str(), "", -1, NULL);
 }
 
 bool
@@ -192,11 +193,9 @@ NagScreen::is_subscribed (bool& really)
 void
 NagScreen::offer_to_donate ()
 {
-       const char* uri = "http://ardour.org/donate";
-
        /* we don't care if it fails */
 
-        PBD::open_uri (uri);
+        PBD::open_uri (Config->get_donate_url());
 }
 
 void