2010-07-25 21:55:08 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2009-2016 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2012-2015 Tim Mayberry <mojofunk@gmail.com>
|
|
|
|
* Copyright (C) 2012-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
* Copyright (C) 2013 Colin Fletcher <colin.m.fletcher@googlemail.com>
|
|
|
|
* Copyright (C) 2013 Michael R. Fisher <mfisher@bketech.com>
|
|
|
|
* Copyright (C) 2015 John Emmas <john@creativepost.co.uk>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2010-07-25 21:55:08 -04:00
|
|
|
|
2010-11-13 00:14:48 -05:00
|
|
|
#ifdef WAF_BUILD
|
|
|
|
#include "gtk2ardour-config.h"
|
2014-09-06 11:59:53 -04:00
|
|
|
#include "gtk2ardour-version.h"
|
2010-11-13 00:14:48 -05:00
|
|
|
#endif
|
|
|
|
|
2009-03-04 18:06:18 -05:00
|
|
|
#include <algorithm>
|
2015-09-05 13:02:32 -04:00
|
|
|
#include <fcntl.h>
|
|
|
|
|
2015-10-05 16:10:58 -04:00
|
|
|
#include "pbd/gstdio_compat.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-06 12:39:53 -04:00
|
|
|
#include <gtkmm.h>
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-09 22:52:46 -04:00
|
|
|
#include "pbd/basename.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
#include "pbd/failed_constructor.h"
|
2015-09-05 13:02:32 -04:00
|
|
|
#include "pbd/scoped_file_descriptor.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
#include "pbd/file_utils.h"
|
2009-04-21 21:35:31 -04:00
|
|
|
#include "pbd/replace_all.h"
|
2010-09-14 11:45:21 -04:00
|
|
|
#include "pbd/whitespace.h"
|
2013-03-09 08:44:22 -05:00
|
|
|
#include "pbd/openuri.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2013-08-03 16:37:10 -04:00
|
|
|
#include "ardour/audioengine.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
#include "ardour/filesystem_paths.h"
|
2015-07-16 15:11:22 -04:00
|
|
|
#include "ardour/filename_extensions.h"
|
|
|
|
#include "ardour/plugin_manager.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
#include "ardour/session.h"
|
|
|
|
#include "ardour/session_state_utils.h"
|
|
|
|
#include "ardour/template_utils.h"
|
2016-05-17 12:19:26 -04:00
|
|
|
#include "ardour/profile.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-01-02 11:37:03 -05:00
|
|
|
#include "gtkmm2ext/utils.h"
|
|
|
|
|
2022-07-26 19:03:03 -04:00
|
|
|
#include "ardour_ui.h"
|
2019-10-08 23:29:47 -04:00
|
|
|
#include "new_user_wizard.h"
|
2009-04-21 21:35:31 -04:00
|
|
|
#include "opts.h"
|
2021-08-13 21:15:14 -04:00
|
|
|
#include "splash.h"
|
2019-10-06 14:56:34 -04:00
|
|
|
#include "ui_config.h"
|
2016-07-14 14:44:52 -04:00
|
|
|
#include "pbd/i18n.h"
|
2010-09-19 13:10:43 -04:00
|
|
|
#include "utils.h"
|
2009-03-04 18:06:18 -05:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Gtk;
|
|
|
|
using namespace Gdk;
|
|
|
|
using namespace Glib;
|
|
|
|
using namespace PBD;
|
|
|
|
using namespace ARDOUR;
|
2014-06-25 15:27:37 -04:00
|
|
|
using namespace ARDOUR_UI_UTILS;
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::NewUserWizard ()
|
2021-08-13 21:15:14 -04:00
|
|
|
: _splash_pushed (false)
|
|
|
|
, config_modified (false)
|
2012-11-08 10:54:16 -05:00
|
|
|
, default_dir_chooser (0)
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2013-09-23 14:41:52 -04:00
|
|
|
set_position (WIN_POS_CENTER);
|
|
|
|
set_border_width (12);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2016-08-04 03:48:47 -04:00
|
|
|
if (! (icon_pixbuf = ::get_icon (PROGRAM_NAME "-icon_48px"))) {
|
2013-09-23 14:41:52 -04:00
|
|
|
throw failed_constructor();
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2013-09-23 14:41:52 -04:00
|
|
|
list<Glib::RefPtr<Gdk::Pixbuf> > window_icons;
|
|
|
|
Glib::RefPtr<Gdk::Pixbuf> icon;
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2016-08-04 03:48:47 -04:00
|
|
|
if ((icon = ::get_icon (PROGRAM_NAME "-icon_16px"))) {
|
2013-09-23 14:41:52 -04:00
|
|
|
window_icons.push_back (icon);
|
|
|
|
}
|
2016-08-04 03:48:47 -04:00
|
|
|
if ((icon = ::get_icon (PROGRAM_NAME "-icon_22px"))) {
|
2013-09-23 14:41:52 -04:00
|
|
|
window_icons.push_back (icon);
|
|
|
|
}
|
2016-08-04 03:48:47 -04:00
|
|
|
if ((icon = ::get_icon (PROGRAM_NAME "-icon_32px"))) {
|
2013-09-23 14:41:52 -04:00
|
|
|
window_icons.push_back (icon);
|
|
|
|
}
|
2016-08-04 03:48:47 -04:00
|
|
|
if ((icon = ::get_icon (PROGRAM_NAME "-icon_48px"))) {
|
2013-09-23 14:41:52 -04:00
|
|
|
window_icons.push_back (icon);
|
|
|
|
}
|
|
|
|
if (!window_icons.empty ()) {
|
|
|
|
set_default_icon_list (window_icons);
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2013-09-23 14:41:52 -04:00
|
|
|
setup_new_user_page ();
|
|
|
|
setup_first_time_config_page ();
|
|
|
|
setup_final_page ();
|
2009-03-04 18:06:18 -05:00
|
|
|
}
|
|
|
|
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::~NewUserWizard ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2021-08-13 21:15:14 -04:00
|
|
|
pop_splash ();
|
2009-03-04 18:06:18 -05:00
|
|
|
}
|
|
|
|
|
2012-11-08 10:54:16 -05:00
|
|
|
bool
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::required ()
|
2012-11-08 10:54:16 -05:00
|
|
|
{
|
2017-02-20 14:47:57 -05:00
|
|
|
if (Glib::file_test (ARDOUR::been_here_before_path (), Glib::FILE_TEST_EXISTS)) {
|
|
|
|
return false;
|
2015-03-31 11:27:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
2012-11-08 10:54:16 -05:00
|
|
|
}
|
|
|
|
|
2009-03-04 18:06:18 -05:00
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::setup_new_user_page ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2009-04-20 14:41:46 -04:00
|
|
|
Label* foomatic = manage (new Label);
|
|
|
|
|
2010-03-14 22:31:27 -04:00
|
|
|
foomatic->set_markup (string_compose (_("\
|
2022-08-11 11:16:06 -04:00
|
|
|
<span size=\"larger\">%1 is a digital audio workstation. \
|
|
|
|
\n\n\
|
|
|
|
You can use %1 to record an orchestra, create with audio/midi loops, edit the perfect vocal take, \
|
|
|
|
mix a live show with effects, dub a video, and master your tracks for digital distribution. \
|
2011-12-08 07:05:32 -05:00
|
|
|
\n\n\
|
|
|
|
There are a few things that need to be configured before you start \
|
|
|
|
using the program.</span> \
|
2010-03-14 22:31:27 -04:00
|
|
|
"), PROGRAM_NAME));
|
2011-12-08 07:05:32 -05:00
|
|
|
foomatic->set_justify (JUSTIFY_FILL);
|
|
|
|
foomatic->set_line_wrap ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2019-10-06 14:56:34 -04:00
|
|
|
VBox* vbox = manage (new VBox);
|
|
|
|
vbox->set_border_width (24);
|
|
|
|
vbox->pack_start (*foomatic, true, true, 12);
|
|
|
|
|
|
|
|
#ifndef __APPLE__
|
|
|
|
Label* barmatic = manage (new Label);
|
2022-08-11 11:16:06 -04:00
|
|
|
barmatic->set_markup (_("<span size=\"larger\">GUI and Font scaling:</span>"));
|
2019-10-06 14:56:34 -04:00
|
|
|
|
|
|
|
Label* bazmatic = manage (new Label);
|
|
|
|
bazmatic->set_markup (_("<small><i>This can later be changed in Preferences > Appearance.</i></small>"));
|
|
|
|
|
2022-01-26 15:11:15 -05:00
|
|
|
ui_font_scale.append (_("100%"));
|
|
|
|
ui_font_scale.append (_("150%"));
|
|
|
|
ui_font_scale.append (_("200%"));
|
|
|
|
ui_font_scale.append (_("250%"));
|
2019-10-06 14:56:34 -04:00
|
|
|
ui_font_scale.set_active_text (_("100%"));
|
|
|
|
|
2009-03-04 18:06:18 -05:00
|
|
|
HBox* hbox = manage (new HBox);
|
2019-10-06 14:56:34 -04:00
|
|
|
HBox* cbox = manage (new HBox);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-06 14:56:34 -04:00
|
|
|
hbox->pack_start (*barmatic, false, false);
|
|
|
|
hbox->pack_start (ui_font_scale, false, false);
|
|
|
|
cbox->pack_start (*hbox, true, false);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-06 14:56:34 -04:00
|
|
|
vbox->pack_start (*cbox, false, false, 2);
|
|
|
|
vbox->pack_start (*bazmatic, false, false);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2019-10-06 14:56:34 -04:00
|
|
|
ui_font_scale.show ();
|
|
|
|
barmatic->show ();
|
|
|
|
bazmatic->show ();
|
2009-03-04 18:06:18 -05:00
|
|
|
hbox->show ();
|
2019-10-06 14:56:34 -04:00
|
|
|
cbox->show ();
|
|
|
|
|
2023-09-25 11:07:15 -04:00
|
|
|
int ui_scale = guess_default_ui_scale ();
|
|
|
|
if (ui_scale <= 100) {
|
|
|
|
ui_font_scale.set_active (0); // 100%
|
|
|
|
} else if (ui_scale <= 150) {
|
|
|
|
ui_font_scale.set_active (1); // 150%
|
|
|
|
} else if (ui_scale <= 200) {
|
|
|
|
ui_font_scale.set_active (2); // 200%
|
|
|
|
} else {
|
|
|
|
ui_font_scale.set_active (3); // 250%
|
|
|
|
}
|
|
|
|
rescale_ui ();
|
|
|
|
|
2019-10-08 23:29:47 -04:00
|
|
|
ui_font_scale.signal_changed ().connect (sigc::mem_fun (*this, &NewUserWizard::rescale_ui));
|
2019-10-06 14:56:34 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
foomatic->show ();
|
2009-03-04 18:06:18 -05:00
|
|
|
vbox->show ();
|
|
|
|
|
2022-06-30 19:18:15 -04:00
|
|
|
append_page (*vbox);
|
2009-03-04 18:06:18 -05:00
|
|
|
set_page_type (*vbox, ASSISTANT_PAGE_INTRO);
|
2010-08-16 20:28:20 -04:00
|
|
|
set_page_title (*vbox, string_compose (_("Welcome to %1"), PROGRAM_NAME));
|
2009-03-04 18:06:18 -05:00
|
|
|
set_page_header_image (*vbox, icon_pixbuf);
|
|
|
|
set_page_complete (*vbox, true);
|
|
|
|
}
|
|
|
|
|
2019-10-06 14:56:34 -04:00
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::rescale_ui ()
|
2019-10-06 14:56:34 -04:00
|
|
|
{
|
|
|
|
int rn = ui_font_scale.get_active_row_number ();
|
2023-09-25 11:07:15 -04:00
|
|
|
if (rn < 0) {
|
2019-10-06 14:56:34 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
float ui_scale = 100 + rn * 50;
|
|
|
|
UIConfiguration::instance ().set_font_scale (1024 * ui_scale);
|
|
|
|
UIConfiguration::instance ().reset_dpi ();
|
|
|
|
}
|
|
|
|
|
2009-04-20 14:41:46 -04:00
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::default_dir_changed ()
|
2009-04-20 14:41:46 -04:00
|
|
|
{
|
2011-08-03 07:14:31 -04:00
|
|
|
Config->set_default_session_parent_dir (default_dir_chooser->get_filename());
|
2012-03-15 08:04:00 -04:00
|
|
|
// make new session folder chooser point to the new default
|
2015-10-05 10:17:49 -04:00
|
|
|
new_folder_chooser.set_current_folder (Config->get_default_session_parent_dir());
|
2009-04-20 14:41:46 -04:00
|
|
|
config_modified = true;
|
|
|
|
}
|
|
|
|
|
2009-03-04 18:06:18 -05:00
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::setup_first_time_config_page ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2010-03-14 22:31:27 -04:00
|
|
|
default_dir_chooser = manage (new FileChooserButton (string_compose (_("Default folder for %1 sessions"), PROGRAM_NAME),
|
2009-04-20 14:41:46 -04:00
|
|
|
FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
2009-03-04 18:06:18 -05:00
|
|
|
Gtk::Label* txt = manage (new Label);
|
2009-06-25 16:46:39 -04:00
|
|
|
HBox* hbox = manage (new HBox);
|
2009-03-04 18:06:18 -05:00
|
|
|
VBox* vbox = manage (new VBox);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2022-08-11 11:16:06 -04:00
|
|
|
txt->set_markup (string_compose (_("<span size=\"larger\">\
|
2010-08-16 20:28:20 -04:00
|
|
|
Each project that you work on with %1 has its own folder.\n\
|
2009-03-04 18:06:18 -05:00
|
|
|
These can require a lot of disk space if you are recording audio.\n\
|
|
|
|
\n\
|
2010-08-16 20:28:20 -04:00
|
|
|
Where would you like new %1 sessions to be stored by default?\n\n\
|
2022-08-11 11:16:06 -04:00
|
|
|
<i>(You can put new sessions anywhere, this is just a default)</i></span>"), PROGRAM_NAME));
|
2009-06-25 16:46:39 -04:00
|
|
|
txt->set_alignment (0.0, 0.0);
|
2022-08-11 11:16:06 -04:00
|
|
|
txt->set_justify (JUSTIFY_FILL);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2009-06-25 16:46:39 -04:00
|
|
|
vbox->set_spacing (18);
|
|
|
|
vbox->set_border_width (24);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2009-06-25 16:46:39 -04:00
|
|
|
hbox->pack_start (*default_dir_chooser, false, true, 8);
|
|
|
|
vbox->pack_start (*txt, false, false);
|
|
|
|
vbox->pack_start (*hbox, false, true);
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2013-10-15 12:37:13 -04:00
|
|
|
cerr << "set default folder to " << poor_mans_glob (Config->get_default_session_parent_dir()) << endl;
|
2019-01-02 11:37:03 -05:00
|
|
|
Gtkmm2ext::add_volume_shortcuts (*default_dir_chooser);
|
2009-04-21 21:35:31 -04:00
|
|
|
default_dir_chooser->set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir()));
|
2019-10-08 23:29:47 -04:00
|
|
|
default_dir_chooser->signal_current_folder_changed().connect (sigc::mem_fun (*this, &NewUserWizard::default_dir_changed));
|
2009-04-20 14:41:46 -04:00
|
|
|
default_dir_chooser->show ();
|
|
|
|
|
2009-06-25 16:46:39 -04:00
|
|
|
vbox->show_all ();
|
2009-03-04 18:06:18 -05:00
|
|
|
|
2022-06-30 19:18:15 -04:00
|
|
|
append_page (*vbox);
|
2009-03-04 18:06:18 -05:00
|
|
|
set_page_title (*vbox, _("Default folder for new sessions"));
|
|
|
|
set_page_header_image (*vbox, icon_pixbuf);
|
|
|
|
set_page_type (*vbox, ASSISTANT_PAGE_CONTENT);
|
|
|
|
|
|
|
|
/* user can just skip all these settings if they want to */
|
|
|
|
|
|
|
|
set_page_complete (*vbox, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::setup_final_page ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2013-09-23 14:41:52 -04:00
|
|
|
string msg = string_compose (_("%1 is ready for use"), PROGRAM_NAME);
|
2015-07-16 15:11:22 -04:00
|
|
|
|
|
|
|
Gtk::Label* final_label = manage (new Label);
|
2022-08-11 11:16:06 -04:00
|
|
|
final_label->set_markup (string_compose ("<span weight=\"bold\" size=\"larger\">%1</span>", msg));
|
2015-07-16 15:11:22 -04:00
|
|
|
final_label->show ();
|
|
|
|
|
|
|
|
VBox* vbox = manage (new VBox);
|
|
|
|
vbox->pack_start (*final_label, true, true);
|
|
|
|
vbox->show ();
|
|
|
|
|
2022-06-30 19:18:15 -04:00
|
|
|
append_page (*vbox);
|
2015-07-16 15:11:22 -04:00
|
|
|
set_page_complete (*vbox, true);
|
|
|
|
set_page_header_image (*vbox, icon_pixbuf);
|
|
|
|
set_page_type (*vbox, ASSISTANT_PAGE_CONFIRM);
|
|
|
|
}
|
|
|
|
|
2009-03-04 18:06:18 -05:00
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::on_cancel ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2019-10-08 13:39:16 -04:00
|
|
|
_signal_response (int (RESPONSE_CANCEL));
|
2009-03-04 18:06:18 -05:00
|
|
|
}
|
|
|
|
|
2009-12-01 08:23:27 -05:00
|
|
|
bool
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::on_delete_event (GdkEventAny*)
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2019-10-08 13:39:16 -04:00
|
|
|
_signal_response (int (RESPONSE_CLOSE));
|
2009-12-01 08:23:27 -05:00
|
|
|
return true;
|
2009-03-04 18:06:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::on_apply ()
|
2009-03-04 18:06:18 -05:00
|
|
|
{
|
2015-03-23 10:36:15 -04:00
|
|
|
/* file-chooser button does not emit 'current_folder_changed' signal
|
|
|
|
* when a folder from the dropdown or the sidebar is chosen.
|
|
|
|
* -> explicitly poll for the dir as suggested by the gtk documentation.
|
|
|
|
*/
|
|
|
|
if (default_dir_chooser && default_dir_chooser->get_filename() != Config->get_default_session_parent_dir ()) {
|
|
|
|
config_modified = true;
|
|
|
|
}
|
|
|
|
|
2009-04-20 14:41:46 -04:00
|
|
|
if (config_modified) {
|
|
|
|
|
|
|
|
if (default_dir_chooser) {
|
2011-08-03 07:14:31 -04:00
|
|
|
Config->set_default_session_parent_dir (default_dir_chooser->get_filename());
|
2009-04-20 14:41:46 -04:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-04-20 14:41:46 -04:00
|
|
|
Config->save_state ();
|
|
|
|
}
|
|
|
|
|
2013-03-14 15:11:31 -04:00
|
|
|
{
|
|
|
|
/* "touch" the been-here-before path now we've successfully
|
|
|
|
made it through the first time setup (at least)
|
|
|
|
*/
|
2015-09-05 13:02:32 -04:00
|
|
|
PBD::ScopedFileDescriptor fout (g_open (been_here_before_path ().c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
|
2013-03-14 15:11:31 -04:00
|
|
|
|
|
|
|
}
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2022-07-26 19:03:03 -04:00
|
|
|
ARDOUR_UI::instance()->copy_demo_sessions ();
|
|
|
|
|
2019-10-09 22:52:46 -04:00
|
|
|
|
2019-10-08 13:39:16 -04:00
|
|
|
_signal_response (int (RESPONSE_OK));
|
2009-03-04 18:06:18 -05:00
|
|
|
}
|
|
|
|
|
2009-04-20 14:41:46 -04:00
|
|
|
|
|
|
|
void
|
2019-10-08 23:29:47 -04:00
|
|
|
NewUserWizard::move_along_now ()
|
2009-04-20 14:41:46 -04:00
|
|
|
{
|
2013-09-20 16:05:54 -04:00
|
|
|
on_apply ();
|
2009-04-20 14:41:46 -04:00
|
|
|
}
|
2021-08-13 21:15:14 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
NewUserWizard::on_show ()
|
|
|
|
{
|
|
|
|
Gtk::Assistant::on_show ();
|
|
|
|
push_splash ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
NewUserWizard::on_unmap ()
|
|
|
|
{
|
|
|
|
pop_splash ();
|
|
|
|
Gtk::Assistant::on_unmap ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
NewUserWizard::pop_splash ()
|
|
|
|
{
|
|
|
|
if (_splash_pushed) {
|
|
|
|
Splash* spl = Splash::exists () ? Splash::instance() : NULL;
|
|
|
|
if (spl) {
|
|
|
|
spl->pop_front_for (*this);
|
|
|
|
}
|
|
|
|
_splash_pushed = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
NewUserWizard::push_splash ()
|
|
|
|
{
|
|
|
|
if (Splash::exists()) {
|
|
|
|
Splash* spl = Splash::instance();
|
2022-01-26 15:21:06 -05:00
|
|
|
if (spl->get_visible()) {
|
2021-08-13 21:15:14 -04:00
|
|
|
spl->pop_back_for (*this);
|
|
|
|
_splash_pushed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|