21 #include "gtk2ardour-config.h"
22 #include "gtk2ardour-version.h"
28 #include <gtkmm/main.h>
29 #include <gtkmm/filechooser.h>
64 : _response (RESPONSE_OK)
65 , config_modified (false)
66 , default_dir_chooser (0)
67 , monitor_via_hardware_button (
string_compose (
_(
"Use an external mixer or the hardware mixer of your audio interface.\n"
68 "%1 will play NO role in monitoring"), PROGRAM_NAME))
69 , monitor_via_ardour_button (
string_compose (
_(
"Ask %1 to play back material as it is being recorded"), PROGRAM_NAME))
70 , audio_page_index (-1)
71 , new_user_page_index (-1)
72 , default_folder_page_index (-1)
73 , monitoring_page_index (-1)
74 , final_page_index (-1)
76 set_position (WIN_POS_CENTER);
77 set_border_width (12);
83 list<Glib::RefPtr<Gdk::Pixbuf> > window_icons;
84 Glib::RefPtr<Gdk::Pixbuf> icon;
86 if ((icon = ::
get_icon (
"ardour_icon_16px")) != 0) {
87 window_icons.push_back (icon);
89 if ((icon = ::
get_icon (
"ardour_icon_22px")) != 0) {
90 window_icons.push_back (icon);
92 if ((icon = ::
get_icon (
"ardour_icon_32px")) != 0) {
93 window_icons.push_back (icon);
95 if ((icon = ::
get_icon (
"ardour_icon_48px")) != 0) {
96 window_icons.push_back (icon);
98 if (!window_icons.empty ()) {
99 set_default_icon_list (window_icons);
122 const int current_version =
atoi (PROGRAM_VERSION);
124 for (
int v = current_version; v != 0; --v) {
126 if (v != current_version) {
140 Label* foomatic = manage (
new Label);
143 <span size=\"larger\">%1 is a digital audio workstation. You can use it to \
144 record, edit and mix multi-track audio. You can produce your \
145 own CDs, mix video soundtracks, or experiment with new \
146 ideas about music and sound. \
148 There are a few things that need to be configured before you start \
149 using the program.</span> \
151 foomatic->set_justify (JUSTIFY_FILL);
152 foomatic->set_line_wrap ();
154 HBox* hbox = manage (
new HBox);
155 HBox* vbox = manage (
new HBox);
157 vbox->set_border_width (24);
159 hbox->pack_start (*foomatic,
true,
true);
160 vbox->pack_start (*hbox,
true,
true);
167 set_page_type (*vbox, ASSISTANT_PAGE_INTRO);
168 set_page_title (*vbox,
string_compose (
_(
"Welcome to %1"), PROGRAM_NAME));
170 set_page_complete (*vbox,
true);
192 FILE_CHOOSER_ACTION_SELECT_FOLDER));
193 Gtk::Label* txt = manage (
new Label);
194 HBox* hbox = manage (
new HBox);
195 VBox* vbox = manage (
new VBox);
198 Each project that you work on with %1 has its own folder.\n\
199 These can require a lot of disk space if you are recording audio.\n\
201 Where would you like new %1 sessions to be stored by default?\n\n\
202 <i>(You can put new sessions anywhere, this is just a default)</i>"), PROGRAM_NAME));
203 txt->set_alignment (0.0, 0.0);
205 vbox->set_spacing (18);
206 vbox->set_border_width (24);
209 vbox->pack_start (*txt,
false,
false);
210 vbox->pack_start (*hbox,
false,
true);
212 cerr <<
"set default folder to " <<
poor_mans_glob (
Config->get_default_session_parent_dir()) << endl;
220 set_page_title (*vbox,
_(
"Default folder for new sessions"));
222 set_page_type (*vbox, ASSISTANT_PAGE_CONTENT);
226 set_page_complete (*vbox,
true);
235 HBox* hbox = manage (
new HBox);
236 VBox* vbox = manage (
new VBox);
242 While recording instruments or vocals, you probably want to listen to the\n\
243 signal as well as record it. This is called \"monitoring\". There are\n\
244 different ways to do this depending on the equipment you have and the\n\
245 configuration of that equipment. The two most common are presented here.\n\
246 Please choose whichever one is right for your setup.\n\n\
247 <i>(You can change this preference at any time, via the Preferences dialog)</i>\n\n\
248 <i>If you do not understand what this is about, just accept the default.</i>"));
251 vbox->set_spacing (6);
255 hbox->pack_start (*vbox,
true,
true, 8);
257 mon_vbox.pack_start (*hbox,
false,
false);
262 set_page_title (
mon_vbox,
_(
"Monitoring Choices"));
278 HBox* hbox = manage (
new HBox);
279 VBox* main_vbox = manage (
new VBox);
281 Label* l = manage (
new Label);
283 main_vbox->set_spacing (32);
286 l->set_alignment (0.0, 1.0);
287 l->set_markup(
_(
"Connect the Master bus directly to your hardware outputs. This is preferable for simple usage."));
289 vbox = manage (
new VBox);
290 vbox->set_spacing (6);
292 vbox->pack_start (*l,
false,
true);
294 main_vbox->pack_start (*vbox,
false,
false);
297 l = manage (
new Label);
298 l->set_alignment (0.0, 1.0);
299 l->set_text (
_(
"Use a Monitor bus between Master bus and hardware outputs for \n\
300 greater control in monitoring without affecting the mix."));
302 vbox = manage (
new VBox);
303 vbox->set_spacing (6);
305 vbox->pack_start (*l,
false,
true);
307 main_vbox->pack_start (*vbox,
false,
false);
312 if (
Config->get_use_monitor_bus()) {
321 monitor_section_label.set_markup(
_(
"<i>You can change this preference at any time via the Preferences dialog.\nYou can also add or remove the monitor section to/from any session.</i>\n\n\
322 <i>If you do not understand what this is about, just accept the default.</i>"));
325 hbox->pack_start (*main_vbox,
true,
true, 8);
352 set_page_type (
final_page, ASSISTANT_PAGE_CONFIRM);
int atoi(const string &s)
void setup_monitoring_choice_page()
gint monitoring_page_index
Gtk::RadioButton monitor_via_hardware_button
Gtk::FileChooserButton * default_dir_chooser
void setup_monitor_section_choice_page()
void default_dir_changed()
we leave monitoring to the audio hardware
LIBARDOUR_API RCConfiguration * Config
Gtk::RadioButton no_monitor_section_button
void setup_new_user_page()
LIBARDOUR_API std::string been_here_before_path(int version=-1)
LIBPBD_API std::string poor_mans_glob(std::string path)
Glib::RefPtr< Gdk::Pixbuf > icon_pixbuf
void setup_first_time_config_page()
bool on_delete_event(GdkEventAny *)
gint monitor_section_page_index
Gtk::RadioButton monitor_via_ardour_button
Gtk::Label monitor_section_label
Gtk::FileChooserButton new_folder_chooser
Gtk::RadioButton use_monitor_section_button
Glib::RefPtr< Gdk::Pixbuf > get_icon(const char *cname)
gint default_folder_page_index
std::string string_compose(const std::string &fmt, const T1 &o1)
static ArdourStartup * the_startup