diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-03-16 13:03:33 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-03-16 13:03:33 -0500 |
commit | d57546dea2e23cc31f5c2c46fa43b7aa82935677 (patch) | |
tree | 691167b084644ad8c954c4f4fef956e6ea510c24 | |
parent | 72b19e60fe87bec573e0e539fb178842942d21c9 (diff) |
add a warning when using a free/demo version
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 44 | ||||
-rw-r--r-- | gtk2_ardour/startup.cc | 3 |
2 files changed, 45 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index fee23d9d13..c67ba6d9cb 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -885,6 +885,50 @@ ARDOUR_UI::starting () } } +#ifdef NO_PLUGIN_STATE + + ARDOUR::RecentSessions rs; + ARDOUR::read_recent_sessions (rs); + + string path = Glib::build_filename (user_config_directory(), ".iknowaboutfreeversion"); + + if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS) && !rs.empty()) { + + /* already used Ardour, have sessions ... warn about plugin state */ + + ArdourDialog d (_("Free/Demo Version Warning"), true); + Label l; + LinkButton b (string_compose (_("Subscribe and support development of %1"), PROGRAM_NAME)); + CheckButton c (_("Don't warn me about this again")); + + l.set_markup (string_compose (_("<span weight=\"bold\" size=\"large\">%1</span>\n\n<b>%2</b>\n\n<i>%3</i>\n\n%4"), + string_compose (_("This is a free/demo version of %1"), PROGRAM_NAME), + _("It will not restore OR save any plugin settings"), + _("If you load an existing session with plugin settings\n" + "they will not be used and will be lost."), + _("To get full access to updates without this limitation\n" + "consider become a subscriber for a low cost every month"))); + l.set_justify (JUSTIFY_CENTER); + + b.set_uri (X_("https://community.ardour.org/s/subscribe ")); + + d.get_vbox()->pack_start (l, true, true); + d.get_vbox()->pack_start (b, false, false, 12); + d.get_vbox()->pack_start (c, false, false, 12); + + d.add_button (_("Quit now"), RESPONSE_CANCEL); + d.add_button (string_compose (_("Continue using %1"), PROGRAM_NAME), RESPONSE_OK); + + d.show_all (); + + c.signal_toggled().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (toggle_file_existence), path))); + + if (d.run () != RESPONSE_OK) { + _exit (0); + } + } +#endif + /* go get a session */ const bool new_session_required = (ARDOUR_COMMAND_LINE::new_session || brand_new_user); diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index 921a34c64b..4410410ef8 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -125,8 +125,7 @@ ArdourStartup::required () std::string ArdourStartup::been_here_before_path () { - // XXXX use more specific version so we can catch upgrades - return Glib::build_filename (user_config_directory (), ".a3"); + return Glib::build_filename (user_config_directory (), ".a" PROGRAM_VERSION); } void |