First-time startup logic update.
When *not* copying old config, Ardour should display the "first time" dialog.
This commit is contained in:
parent
5f5bdca15b
commit
3a50975c3d
@ -65,6 +65,7 @@
|
||||
#include "pbd/localtime_r.h"
|
||||
#include "pbd/pthread_utils.h"
|
||||
#include "pbd/replace_all.h"
|
||||
#include "pbd/scoped_file_descriptor.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
#include "gtkmm2ext/application.h"
|
||||
@ -324,6 +325,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
UIConfiguration::instance().post_gui_init ();
|
||||
|
||||
if (ARDOUR::handle_old_configuration_files (boost::bind (ask_about_configuration_copy, _1, _2, _3))) {
|
||||
{
|
||||
/* "touch" the been-here-before path now that config has been migrated */
|
||||
PBD::ScopedFileDescriptor fout (g_open (been_here_before_path ().c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
|
||||
}
|
||||
MessageDialog msg (string_compose (_("Your configuration files were copied. You can now restart %1."), PROGRAM_NAME), true);
|
||||
msg.run ();
|
||||
/* configuration was modified, exit immediately */
|
||||
|
@ -119,20 +119,10 @@ ArdourStartup::~ArdourStartup ()
|
||||
bool
|
||||
ArdourStartup::required ()
|
||||
{
|
||||
/* look for a "been here before" file for this version or earlier
|
||||
* versions
|
||||
*/
|
||||
|
||||
const int current_version = atoi (PROGRAM_VERSION);
|
||||
|
||||
for (int v = current_version; v != 0; --v) {
|
||||
if (Glib::file_test (ARDOUR::been_here_before_path (v), Glib::FILE_TEST_EXISTS)) {
|
||||
if (v != current_version) {
|
||||
/* older version exists, create the current one */
|
||||
PBD::ScopedFileDescriptor fout (g_open (been_here_before_path (current_version).c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (Glib::file_test (ARDOUR::been_here_before_path (), Glib::FILE_TEST_EXISTS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user