mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
add a page to the new user wizard for the default clip path
This commit is contained in:
parent
357956bd99
commit
095b672b99
2 changed files with 67 additions and 2 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include "pbd/openuri.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/clip_library.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/filename_extensions.h"
|
||||
#include "ardour/plugin_manager.h"
|
||||
|
|
@ -107,6 +108,7 @@ NewUserWizard::NewUserWizard ()
|
|||
|
||||
setup_new_user_page ();
|
||||
setup_first_time_config_page ();
|
||||
setup_clip_lib_page ();
|
||||
setup_final_page ();
|
||||
}
|
||||
|
||||
|
|
@ -227,6 +229,14 @@ NewUserWizard::default_dir_changed ()
|
|||
config_modified = true;
|
||||
}
|
||||
|
||||
void
|
||||
NewUserWizard::clip_lib_changed ()
|
||||
{
|
||||
Config->set_clip_library_dir (clip_lib_chooser->get_filename());
|
||||
clip_lib_label->set_text (clip_lib_chooser->get_filename());
|
||||
config_modified = true;
|
||||
}
|
||||
|
||||
void
|
||||
NewUserWizard::setup_first_time_config_page ()
|
||||
{
|
||||
|
|
@ -252,10 +262,10 @@ Where would you like new %1 sessions to be stored by default?\n\n\
|
|||
vbox->pack_start (*txt, false, false);
|
||||
vbox->pack_start (*hbox, false, true);
|
||||
|
||||
cerr << "set default folder to " << poor_mans_glob (Config->get_default_session_parent_dir()) << endl;
|
||||
Gtkmm2ext::add_volume_shortcuts (*default_dir_chooser);
|
||||
default_dir_chooser->set_title (_("Default Session Location"));
|
||||
default_dir_chooser->set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir()));
|
||||
default_dir_chooser->signal_current_folder_changed().connect (sigc::mem_fun (*this, &NewUserWizard::default_dir_changed));
|
||||
default_dir_chooser->signal_file_set().connect (sigc::mem_fun (*this, &NewUserWizard::default_dir_changed));
|
||||
default_dir_chooser->show ();
|
||||
|
||||
vbox->show_all ();
|
||||
|
|
@ -270,6 +280,55 @@ Where would you like new %1 sessions to be stored by default?\n\n\
|
|||
set_page_complete (*vbox, true);
|
||||
}
|
||||
|
||||
void
|
||||
NewUserWizard::setup_clip_lib_page ()
|
||||
{
|
||||
clip_lib_chooser = manage (new FileChooserButton (string_compose (_("Default folder where %1 should look for samples"), PROGRAM_NAME),
|
||||
FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
||||
clip_lib_label = manage (new Label);
|
||||
|
||||
Gtk::Label* txt = manage (new Label);
|
||||
HBox* hbox = manage (new HBox);
|
||||
VBox* vbox = manage (new VBox);
|
||||
|
||||
txt->set_markup (string_compose (_("<span size=\"larger\">\
|
||||
If you have an existing collection of samples, telling %1\n\
|
||||
where they are will make it easier to find them in the program.\
|
||||
\n\
|
||||
\n\
|
||||
Where would you like new %1 sessions to be stored by default?\n\n\
|
||||
<i>(You can store samples anywhere you want, this is just a default)</i></span>"), PROGRAM_NAME));
|
||||
txt->set_alignment (0.0, 0.0);
|
||||
txt->set_justify (JUSTIFY_FILL);
|
||||
|
||||
vbox->set_spacing (18);
|
||||
vbox->set_border_width (24);
|
||||
|
||||
hbox->pack_start (*clip_lib_chooser, false, true, 8);
|
||||
hbox->pack_start (*clip_lib_label, false, false, 8);
|
||||
|
||||
vbox->pack_start (*txt, false, false);
|
||||
vbox->pack_start (*hbox, false, true);
|
||||
|
||||
clip_lib_label->set_text (ARDOUR::platform_default_clip_library_dir());
|
||||
|
||||
Gtkmm2ext::add_volume_shortcuts (*clip_lib_chooser);
|
||||
clip_lib_chooser->set_title (_("Default sample library location"));
|
||||
clip_lib_chooser->signal_file_set().connect (sigc::mem_fun (*this, &NewUserWizard::clip_lib_changed));
|
||||
clip_lib_chooser->show ();
|
||||
|
||||
vbox->show_all ();
|
||||
|
||||
append_page (*vbox);
|
||||
set_page_title (*vbox, _("Default Sample Library Location"));
|
||||
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
|
||||
NewUserWizard::setup_final_page ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@ private:
|
|||
void setup_first_page ();
|
||||
Gtk::FileChooserButton new_folder_chooser;
|
||||
|
||||
/* Clip lib page */
|
||||
Gtk::FileChooserButton* clip_lib_chooser;
|
||||
Gtk::Label* clip_lib_label;
|
||||
void clip_lib_changed();
|
||||
void setup_clip_lib_page ();
|
||||
|
||||
/* final page */
|
||||
void setup_final_page ();
|
||||
void move_along_now ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue