diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-04-24 21:34:23 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-04-24 21:34:23 +0000 |
commit | 484debb45c5ea45bccf0f9cb05b1239a9c2244a3 (patch) | |
tree | b1826b111ff96ce3597dc59f7e0d03a640dcc792 /gtk2_ardour | |
parent | d9343ed8bd2cc1196ffa6720ec32c3f37ffe1832 (diff) |
New session dialog now opens as well as makes new sessions. Avoid seeing an ugly blank editor. Some dialog tweaks.
git-svn-id: svn://localhost/trunk/ardour2@467 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 47 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/glade/new_session_dialog.glade | 1276 | ||||
-rw-r--r-- | gtk2_ardour/main.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/new_session_dialog.cc | 208 | ||||
-rw-r--r-- | gtk2_ardour/new_session_dialog.h | 46 |
7 files changed, 1061 insertions, 525 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index f0f7fb6da3..fbd83e9057 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -440,8 +440,6 @@ ARDOUR_UI::ask_about_saving_session (const string & what) Gtk::Label prompt_label; Gtk::Image* dimage = manage (new Gtk::Image(Stock::DIALOG_WARNING, Gtk::ICON_SIZE_DIALOG)); - dimage->set_alignment(ALIGN_LEFT, ALIGN_TOP); - string msg; msg = string_compose(_("Don't %1"), what); @@ -464,14 +462,14 @@ ARDOUR_UI::ask_about_saving_session (const string & what) } else { type = _("snapshot"); } - prompt = string_compose(_("The %1\n\"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"), + prompt = string_compose(_("The %1\"%2\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"), type, session->snap_name()); prompt_label.set_text (prompt); prompt_label.set_name (X_("PrompterLabel")); prompt_label.set_alignment(ALIGN_LEFT, ALIGN_TOP); dhbox.set_homogeneous (false); - dhbox.pack_start (*dimage, true, false, 5); + dhbox.pack_start (*dimage, false, false, 5); dhbox.pack_start (prompt_label, true, false, 5); window.get_vbox()->pack_start (dhbox); @@ -1710,8 +1708,29 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path) do { response = m_new_session_dialog->run (); - - if(response == Gtk::RESPONSE_OK) { + if(response == Gtk::RESPONSE_CANCEL) { + quit(); + return; + } else if (response == Gtk::RESPONSE_YES) { + /* YES == OPEN, but there's no enum for that */ + std::string session_name = m_new_session_dialog->session_name(); + std::string session_path = m_new_session_dialog->session_folder(); + load_session (session_path, session_name); + + + } else if (response == Gtk::RESPONSE_OK) { + if (m_new_session_dialog->get_current_page() == 1) { + + /* XXX this is a bit of a hack.. + i really want the new sesion dialog to return RESPONSE_YES + if we're on page 1 (the load page) + Unfortunately i can't see how atm.. + */ + std::string session_name = m_new_session_dialog->session_name(); + std::string session_path = m_new_session_dialog->session_folder(); + load_session (session_path, session_name); + + } else { _session_is_new = true; @@ -1777,11 +1796,21 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path) nphysin, nphysout, engine->frame_rate() * 60 * 5); - } + } + } } - + } while(response == Gtk::RESPONSE_HELP); m_new_session_dialog->hide_all(); + show(); + +} + +void +ARDOUR_UI::close_session() +{ + unload_session(); + new_session (); } int @@ -1834,6 +1863,8 @@ ARDOUR_UI::make_session_clean () session->set_clean (); } + show (); + return FALSE; } diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index cff822e2f3..89ae4df7da 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -130,10 +130,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI _will_create_new_session_automatically = yn; } - void new_session(bool startup = false, std::string path = string()); + void new_session(bool startup = false, std::string path = string()); gint cmdline_new_session (string path); int unload_session (); - void close_session() { unload_session(); } + void close_session(); int save_state_canfail (string state_name = ""); void save_state (const string & state_name = ""); diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index a6f0e2dc50..1c270ef38d 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -158,7 +158,7 @@ ARDOUR_UI::unload_session () break; } } - + editor->hide (); second_connection.disconnect (); point_one_second_connection.disconnect (); point_zero_one_second_connection.disconnect(); diff --git a/gtk2_ardour/glade/new_session_dialog.glade b/gtk2_ardour/glade/new_session_dialog.glade index 529df7419b..5824ab4952 100644 --- a/gtk2_ardour/glade/new_session_dialog.glade +++ b/gtk2_ardour/glade/new_session_dialog.glade @@ -12,10 +12,10 @@ <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> @@ -41,11 +41,11 @@ </child> <child> - <widget class="GtkButton" id="CancelButton"> + <widget class="GtkButton" id="QuitButton"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> + <property name="label">gtk-quit</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -86,172 +86,307 @@ </child> <child> - <widget class="GtkTable" id="table1"> - <property name="border_width">5</property> - <property name="n_rows">4</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">1</property> - <property name="column_spacing">1</property> + <widget class="GtkNotebook" id="TheNotebook"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> <child> - <widget class="GtkLabel" id="label2"> - <property name="label">Session Name</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - </packing> - </child> + <widget class="GtkTable" id="table1"> + <property name="border_width">5</property> + <property name="n_rows">4</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">1</property> + <property name="column_spacing">1</property> - <child> - <widget class="GtkEntry" id="SessionNameEntry"> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label2"> + <property name="label">Session Name</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + </packing> + </child> - <child> - <widget class="GtkLabel" id="label3"> - <property name="label">Session Location</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> + <child> + <widget class="GtkEntry" id="SessionNameEntry"> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + </packing> + </child> - <child> - <widget class="GtkFileChooserButton" id="SessionFolderChooser"> - <property name="title">Select A Folder</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="width_chars">-1</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label3"> + <property name="label">Session Location</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> - <child> - <widget class="GtkLabel" id="label4"> - <property name="label">Session Template</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> + <child> + <widget class="GtkFileChooserButton" id="SessionFolderChooser"> + <property name="title">Select A Folder</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> - <child> - <widget class="GtkFileChooserButton" id="SessionTemplateChooser"> - <property name="title" translatable="yes">Select A File</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="width_chars">-1</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label4"> + <property name="label">Session Template</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> - <child> - <widget class="GtkExpander" id="expander1"> - <property name="border_width">10</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expanded">True</property> - <property name="spacing">0</property> + <child> + <widget class="GtkFileChooserButton" id="SessionTemplateChooser"> + <property name="title" translatable="yes">Select a File</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> <child> - <widget class="GtkVBox" id="vbox7"> + <widget class="GtkExpander" id="expander1"> + <property name="border_width">10</property> <property name="visible">True</property> - <property name="homogeneous">False</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> <property name="spacing">0</property> <child> - <widget class="GtkTable" id="table4"> + <widget class="GtkVBox" id="vbox7"> <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">True</property> - <property name="row_spacing">0</property> - <property name="column_spacing">0</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table4"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">True</property> + <property name="row_spacing">0</property> + <property name="column_spacing">0</property> + + <child> + <widget class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes">Channel Count</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="CreateControlBus"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Create Control Bus</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="ControlChannelCount"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">2 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="MasterChannelCount"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">2 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="CreateMasterBus"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Create Master Bus</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">True</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> <child> - <widget class="GtkLabel" id="label19"> + <widget class="GtkLabel" id="label16"> <property name="visible">True</property> - <property name="label" translatable="yes">Channel Count</property> + <property name="label" translatable="yes">Track/Bus connection options</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0</property> + <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -261,199 +396,51 @@ <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="CreateControlBus"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Create Control Bus</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="ControlChannelCount"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">2 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="MasterChannelCount"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">2 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="padding">14</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="CreateMasterBus"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Create Master Bus</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">True</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label16"> - <property name="visible">True</property> - <property name="label" translatable="yes">Track/Bus connection options</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">14</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame4"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment4"> + <widget class="GtkFrame" id="frame4"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkTable" id="table3"> + <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">1</property> - <property name="homogeneous">False</property> - <property name="row_spacing">0</property> - <property name="column_spacing">0</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkHBox" id="hbox1"> + <widget class="GtkTable" id="table3"> <property name="visible">True</property> + <property name="n_rows">1</property> + <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="row_spacing">0</property> + <property name="column_spacing">0</property> <child> - <widget class="GtkCheckButton" id="ConnectInputs"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Automatically connect inputs</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox2"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="LimitInputPorts"> + <widget class="GtkCheckButton" id="ConnectInputs"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Port limit</property> + <property name="label" translatable="yes">Automatically connect inputs</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -469,134 +456,134 @@ </child> <child> - <widget class="GtkSpinButton" id="InputLimitCount"> + <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkCheckButton" id="LimitInputPorts"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Port limit</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="InputLimitCount"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 0 100 1 10 10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> - <property name="fill">True</property> + <property name="fill">False</property> </packing> </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">False</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> </packing> </child> </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - </packing> </child> </widget> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Input</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <child> + <widget class="GtkLabel" id="label14"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Input</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame5"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkAlignment" id="alignment5"> + <widget class="GtkFrame" id="frame5"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox8"> + <widget class="GtkAlignment" id="alignment5"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkHBox" id="hbox3"> + <widget class="GtkVBox" id="vbox8"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="ConnectOutputs"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Automatically connect outputs</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox4"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="LimitOutputPorts"> + <widget class="GtkCheckButton" id="ConnectOutputs"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Port limit</property> + <property name="label" translatable="yes">Automatically connect outputs</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -612,155 +599,430 @@ </child> <child> - <widget class="GtkSpinButton" id="OutputLimitCount"> + <widget class="GtkHBox" id="hbox4"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkCheckButton" id="LimitOutputPorts"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Port limit</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="OutputLimitCount"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 0 100 1 10 10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> - <property name="fill">True</property> + <property name="fill">False</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> - <property name="fill">False</property> + <property name="fill">True</property> </packing> </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox9"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> <child> - <widget class="GtkRadioButton" id="ConnectOutsToMaster"> + <widget class="GtkVBox" id="vbox9"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Connect to Master Bus</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkRadioButton" id="ConnectOutsToPhysical"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Connect to physical outputs</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">ConnectOutsToMaster</property> + <child> + <widget class="GtkRadioButton" id="ConnectOutsToMaster"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Connect to Master Bus</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="ConnectOutsToPhysical"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Connect to physical outputs</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">ConnectOutsToMaster</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> </child> </widget> </child> + + <child> + <widget class="GtkLabel" id="label15"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Output</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Advanced</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes">New Session</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox10"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame7"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkLabel" id="label15"> + <widget class="GtkHBox" id="hbox5"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Output</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label22"> + <property name="label">Open Session</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <placeholder/> + </child> + + <child> + <widget class="GtkFileChooserButton" id="OpenFilechooserButton"> + <property name="title" translatable="yes">Select a Session</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <placeholder/> + </child> </widget> - <packing> - <property name="type">label_item</property> - </packing> </child> </widget> + </child> + + <child> + <widget class="GtkLabel" id="label24"> + <property name="visible">True</property> + <property name="label" translatable="yes">Open Session</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="type">label_item</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> <child> - <widget class="GtkLabel" id="label5"> + <widget class="GtkFrame" id="frame6"> + <property name="border_width">10</property> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Advanced</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="TheTreeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + <property name="fixed_height_mode">False</property> + <property name="hover_selection">False</property> + <property name="hover_expand">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes">Open Recent Session</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">5</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes">Open Session</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> </packing> </child> </widget> diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index edff606329..00b91e00e7 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -436,9 +436,8 @@ To create it from the command line, start ardour as \"ardour --new %1"), path) } else { ui->hide_splash (); - ui->show (); if (!Config->get_no_new_session_dialog()) { - ui->new_session (true); + ui->new_session (true); } } diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc index 90b3500a91..106fea7339 100644 --- a/gtk2_ardour/new_session_dialog.cc +++ b/gtk2_ardour/new_session_dialog.cc @@ -22,11 +22,19 @@ #include "new_session_dialog.h" #include "glade_path.h" +#include <ardour/recent_sessions.h> +#include <ardour/session.h> + +#include <pbd/basename.h> + #include <gtkmm/entry.h> #include <gtkmm/filechooserbutton.h> #include <gtkmm/spinbutton.h> #include <gtkmm/checkbutton.h> #include <gtkmm/radiobutton.h> +#include <gtkmm/filefilter.h> +#include <gtkmm/stock.h> + const char* NewSessionDialogFactory::s_m_top_level_widget_name = X_("NewSessionDialog"); const char* NewSessionDialogFactory::top_level_widget_name() { return s_m_top_level_widget_name; } @@ -43,7 +51,7 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject, : Gtk::Dialog(cobject) { // look up the widgets we care about. - + xml->get_widget(X_("NewSessionDialog"), m_new_session_dialog); xml->get_widget(X_("SessionNameEntry"), m_name); xml->get_widget(X_("SessionFolderChooser"), m_folder); xml->get_widget(X_("SessionTemplateChooser"), m_template); @@ -64,8 +72,99 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject, xml->get_widget(X_("ConnectOutsToMaster"), m_connect_outputs_to_master); xml->get_widget(X_("ConnectOutsToPhysical"), m_connect_outputs_to_physical); + xml->get_widget(X_("OpenFilechooserButton"), m_open_filechooser); + xml->get_widget(X_("TheNotebook"), m_notebook); + xml->get_widget(X_("TheTreeview"), m_treeview); + xml->get_widget(X_("OkButton"), m_okbutton); + + + if (m_treeview) { + /* Shamelessly ripped from ardour_ui.cc */ + std::vector<string *> *sessions; + std::vector<string *>::iterator i; + RecentSessionsSorter cmp; + + recent_model = Gtk::TreeStore::create (recent_columns); + m_treeview->set_model (recent_model); + m_treeview->append_column (_("Recent Sessions"), recent_columns.visible_name); + m_treeview->set_headers_visible (false); + m_treeview->get_selection()->set_mode (Gtk::SELECTION_SINGLE); + + recent_model->clear (); + + ARDOUR::RecentSessions rs; + ARDOUR::read_recent_sessions (rs); + + /* sort them alphabetically */ + sort (rs.begin(), rs.end(), cmp); + sessions = new std::vector<std::string*>; + + for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) { + sessions->push_back (new string ((*i).second)); + } + + for (i = sessions->begin(); i != sessions->end(); ++i) { + + std::vector<std::string*>* states; + std::vector<const gchar*> item; + std::string fullpath = *(*i); + + /* remove any trailing / */ + + if (fullpath[fullpath.length()-1] == '/') { + fullpath = fullpath.substr (0, fullpath.length()-1); + } + + /* now get available states for this session */ + + if ((states = ARDOUR::Session::possible_states (fullpath)) == 0) { + /* no state file? */ + continue; + } + + Gtk::TreeModel::Row row = *(recent_model->append()); + + row[recent_columns.visible_name] = PBD::basename (fullpath); + row[recent_columns.fullpath] = fullpath; + + if (states->size() > 1) { + + /* add the children */ + + for (std::vector<std::string*>::iterator i2 = states->begin(); i2 != states->end(); ++i2) { + + Gtk::TreeModel::Row child_row = *(recent_model->append (row.children())); + + child_row[recent_columns.visible_name] = **i2; + child_row[recent_columns.fullpath] = fullpath; + + delete *i2; + } + } + + delete states; + } + delete sessions; + } + + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); + m_new_session_dialog->set_default_response (Gtk::RESPONSE_OK); + m_notebook->show_all_children(); + m_notebook->set_current_page(0); + + Gtk::FileFilter* filter = manage (new (Gtk::FileFilter)); + + filter->add_pattern(X_("*.ardour")); + filter->add_pattern(X_("*.ardour.bak")); + m_open_filechooser->set_filter (*filter); + ///@ todo connect some signals + m_name->signal_key_release_event().connect(mem_fun (*this, &NewSessionDialog::entry_key_release)); + m_notebook->signal_switch_page().connect (mem_fun (*this, &NewSessionDialog::notebook_page_changed)); + m_treeview->get_selection()->signal_changed().connect (mem_fun (*this, &NewSessionDialog::treeview_selection_changed)); + m_treeview->signal_row_activated().connect (mem_fun (*this, &NewSessionDialog::recent_row_activated)); + m_open_filechooser->signal_selection_changed ().connect (mem_fun (*this, &NewSessionDialog::file_chosen)); } void @@ -77,19 +176,51 @@ NewSessionDialog::set_session_name(const Glib::ustring& name) std::string NewSessionDialog::session_name() const { - return Glib::filename_from_utf8(m_name->get_text()); + std::string str = Glib::filename_from_utf8(m_open_filechooser->get_filename()); + std::string::size_type position = str.find_last_of ('/'); + str = str.substr (position+1); + position = str.find_last_of ('.'); + str = str.substr (0, position); + + /* + XXX what to do if it's a .bak file? + load_session doesn't allow it! + + if ((position = str.rfind(".bak")) != string::npos) { + str = str.substr (0, position); + } + */ + + if (m_notebook->get_current_page() == 0) { + return Glib::filename_from_utf8(m_name->get_text()); + } else { + if (m_treeview->get_selection()->count_selected_rows() == 0) { + return Glib::filename_from_utf8(str); + } + Gtk::TreeModel::iterator i = m_treeview->get_selection()->get_selected(); + return (*i)[recent_columns.visible_name]; + } } std::string NewSessionDialog::session_folder() const { - return Glib::filename_from_utf8(m_folder->get_current_folder()); + if (m_notebook->get_current_page() == 0) { + return Glib::filename_from_utf8(m_folder->get_current_folder()); + } else { + + if (m_treeview->get_selection()->count_selected_rows() == 0) { + return Glib::filename_from_utf8(m_open_filechooser->get_current_folder()); + } + Gtk::TreeModel::iterator i = m_treeview->get_selection()->get_selected(); + return (*i)[recent_columns.fullpath]; + } } bool NewSessionDialog::use_session_template() const { - if(m_template->get_filename().empty()) return false; + if(m_template->get_filename().empty() && (m_notebook->get_current_page() == 0)) return false; return true; } @@ -171,6 +302,12 @@ NewSessionDialog::connect_outs_to_physical() const return m_connect_outputs_to_physical->get_active(); } +int +NewSessionDialog::get_current_page() +{ + return m_notebook->get_current_page(); + +} void NewSessionDialog::reset_name() @@ -179,6 +316,69 @@ NewSessionDialog::reset_name() } +bool +NewSessionDialog::entry_key_release (GdkEventKey* ev) +{ + if (m_name->get_text() != "") { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } else { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); + } + return true; +} + +void +NewSessionDialog::notebook_page_changed (GtkNotebookPage* np, uint pagenum) +{ + if (pagenum == 1) { + m_okbutton->set_label(_("Open")); + m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::OPEN, Gtk::ICON_SIZE_BUTTON))); + if (m_treeview->get_selection()->count_selected_rows() == 0) { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); + } else { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } + } else { + m_okbutton->set_label(_("New")); + m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::NEW, Gtk::ICON_SIZE_BUTTON))); + if (m_name->get_text() == "") { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); + } else { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } + } +} + +void +NewSessionDialog::treeview_selection_changed () +{ + if (m_treeview->get_selection()->count_selected_rows() == 0) { + if (!m_open_filechooser->get_filename().empty()) { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } else { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); + } + } else { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } +} + +void +NewSessionDialog::file_chosen () +{ + m_treeview->get_selection()->unselect_all(); + + if (m_treeview->get_selection()->count_selected_rows() == 0) { + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, true); + } +} + +void +NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col) +{ + m_new_session_dialog->response (Gtk::RESPONSE_YES); +} + /// @todo void NewSessionDialog::reset_template() diff --git a/gtk2_ardour/new_session_dialog.h b/gtk2_ardour/new_session_dialog.h index ec3a3eb033..5e5e9723dd 100644 --- a/gtk2_ardour/new_session_dialog.h +++ b/gtk2_ardour/new_session_dialog.h @@ -25,6 +25,14 @@ #include <string> #include <gtkmm/dialog.h> +#include <gtkmm/treeview.h> +#include <gtkmm/treestore.h> +#include <gtkmm/treepath.h> +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/notebook.h> + +#include <ardour/utils.h> + #include <glibmm/refptr.h> namespace Gtk { @@ -33,6 +41,8 @@ namespace Gtk { class SpinButton; class CheckButton; class RadioButton; + class TreeView; + class Notebook; } #include "glade_factory.h" @@ -82,6 +92,7 @@ public: bool connect_outs_to_master() const; bool connect_outs_to_physical() const ; + int get_current_page(); protected: @@ -92,7 +103,7 @@ protected: void reset(); // references to widgets we care about. - + Gtk::Dialog* m_new_session_dialog; Gtk::Entry* m_name; Gtk::FileChooserButton* m_folder; Gtk::FileChooserButton* m_template; @@ -113,6 +124,39 @@ protected: Gtk::RadioButton* m_connect_outputs_to_master; Gtk::RadioButton* m_connect_outputs_to_physical; + Gtk::Button* m_okbutton; + + Gtk::FileChooserButton* m_open_filechooser; + Gtk::TreeView* m_treeview; + Gtk::Notebook* m_notebook; + Gtk::ScrolledWindow* m_scrolledwindow; + private: + struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord { + RecentSessionModelColumns() { + add (visible_name); + add (fullpath); + } + Gtk::TreeModelColumn<std::string> visible_name; + Gtk::TreeModelColumn<std::string> fullpath; + }; + + RecentSessionModelColumns recent_columns; + Glib::RefPtr<Gtk::TreeStore> recent_model; + + void recent_session_selection_changed (); + void nsd_redisplay_recent_sessions(); + void nsd_recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col); + struct RecentSessionsSorter { + bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const { + return cmp_nocase(a.first, b.first) == -1; + } + }; + bool entry_key_release (GdkEventKey*); + void notebook_page_changed (GtkNotebookPage*, uint); + void treeview_selection_changed (); + void file_chosen (); + void recent_row_activated (const Gtk::TreePath&, Gtk::TreeViewColumn*); + }; |