mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Use the LiveTrax tabbed session dialog
This commit is contained in:
parent
3bfc8c1d4d
commit
524073d855
4 changed files with 419 additions and 399 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/radiobutton.h>
|
||||
#include <gtkmm/filechooserbutton.h>
|
||||
#include <gtkmm/filechooserwidget.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
#include <gtkmm/textview.h>
|
||||
#include <gtkmm/treeview.h>
|
||||
|
|
@ -47,15 +48,23 @@
|
|||
#include "ardour/utils.h"
|
||||
|
||||
#include "ardour_dialog.h"
|
||||
#include "option_editor.h"
|
||||
|
||||
class EngineControl;
|
||||
|
||||
class SessionDialog : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
SessionDialog (bool require_new, const std::string& session_name, const std::string& session_path,
|
||||
enum DialogTab
|
||||
{
|
||||
New = 0,
|
||||
Recent,
|
||||
Open,
|
||||
Prefs
|
||||
};
|
||||
|
||||
SessionDialog (DialogTab initial_tab, const std::string& session_name, const std::string& session_path,
|
||||
const std::string& template_name, bool cancel_not_quit);
|
||||
SessionDialog ();
|
||||
~SessionDialog ();
|
||||
|
||||
std::string session_name (bool& should_be_new);
|
||||
|
|
@ -67,35 +76,54 @@ public:
|
|||
std::string session_template_name();
|
||||
|
||||
uint32_t master_channel_count();
|
||||
void on_show ();
|
||||
|
||||
void set_provided_session (std::string const & name, std::string const & path);
|
||||
void clear_name ();
|
||||
bool was_new_name_edited() const { return new_name_was_edited; }
|
||||
|
||||
private:
|
||||
bool new_only;
|
||||
void delete_selected_template();
|
||||
void show_template_context_menu (int button, int time);
|
||||
bool template_button_press (GdkEventButton*);
|
||||
|
||||
private:
|
||||
bool on_delete_event (GdkEventAny*);
|
||||
|
||||
Gtk::Button* cancel_button;
|
||||
Gtk::Button* open_button;
|
||||
Gtk::Button* back_button;
|
||||
Gtk::Button* quit_button;
|
||||
|
||||
ArdourWidgets::ArdourButton new_button;
|
||||
ArdourWidgets::ArdourButton recent_button;
|
||||
ArdourWidgets::ArdourButton existing_button;
|
||||
ArdourWidgets::ArdourButton prefs_button;
|
||||
|
||||
Gtk::ComboBoxText timebase_chooser;
|
||||
|
||||
bool back_button_pressed (GdkEventButton*);
|
||||
bool new_button_pressed (GdkEventButton*);
|
||||
bool recent_button_pressed (GdkEventButton*);
|
||||
bool existing_button_pressed (GdkEventButton*);
|
||||
bool prefs_button_pressed (GdkEventButton*);
|
||||
|
||||
bool open_button_pressed (GdkEventButton*);
|
||||
|
||||
Gtk::Frame info_frame;
|
||||
Gtk::HBox _info_box;
|
||||
|
||||
Gtk::Table _open_table;
|
||||
|
||||
/* initial choice page */
|
||||
|
||||
void setup_initial_choice_box ();
|
||||
void setup_existing_box ();
|
||||
void setup_recent_sessions ();
|
||||
Gtk::VBox ic_vbox;
|
||||
Gtk::Button ic_new_session_button;
|
||||
void new_session_button_clicked ();
|
||||
Gtk::VBox recent_vbox;
|
||||
|
||||
DialogTab _initial_tab;
|
||||
|
||||
#ifdef MIXBUS
|
||||
Gtk::Button _license_button;
|
||||
Gtk::Label _license_label;
|
||||
void license_button_clicked ();
|
||||
#endif
|
||||
|
||||
/* recent sessions */
|
||||
|
||||
|
|
@ -135,7 +163,7 @@ private:
|
|||
Glib::RefPtr<Gtk::TreeStore> recent_session_model;
|
||||
Gtk::ScrolledWindow recent_scroller;
|
||||
Gtk::Label recent_label;
|
||||
Gtk::FileChooserButton existing_session_chooser;
|
||||
Gtk::FileChooserWidget existing_session_chooser;
|
||||
int redisplay_recent_sessions ();
|
||||
void recent_session_row_selected ();
|
||||
void recent_session_sort_changed ();
|
||||
|
|
@ -144,9 +172,11 @@ private:
|
|||
void recent_context_mennu (GdkEventButton*);
|
||||
void recent_remove_selected ();
|
||||
|
||||
void existing_session_selected ();
|
||||
void session_selected ();
|
||||
|
||||
void existing_file_selected();
|
||||
void existing_file_activated ();
|
||||
|
||||
/* new sessions */
|
||||
|
||||
void setup_new_session_page ();
|
||||
|
|
@ -165,6 +195,7 @@ private:
|
|||
add (description);
|
||||
add (modified_with_short);
|
||||
add (modified_with_long);
|
||||
add (removable);
|
||||
}
|
||||
|
||||
Gtk::TreeModelColumn<std::string> name;
|
||||
|
|
@ -172,6 +203,7 @@ private:
|
|||
Gtk::TreeModelColumn<std::string> description;
|
||||
Gtk::TreeModelColumn<std::string> modified_with_short;
|
||||
Gtk::TreeModelColumn<std::string> modified_with_long;
|
||||
Gtk::TreeModelColumn<bool> removable;
|
||||
};
|
||||
|
||||
SessionTemplateColumns session_template_columns;
|
||||
|
|
@ -186,13 +218,14 @@ private:
|
|||
Gtk::Frame template_desc_frame;
|
||||
|
||||
Gtk::VBox session_new_vbox;
|
||||
Gtk::VBox session_existing_vbox;
|
||||
std::string load_template_override;
|
||||
|
||||
void new_name_changed ();
|
||||
void new_name_activated ();
|
||||
void populate_session_templates ();
|
||||
|
||||
void tab_page_switched(GtkNotebookPage*, guint page_number);
|
||||
|
||||
/* --disable plugins UI */
|
||||
Gtk::CheckButton _disable_plugins;
|
||||
void disable_plugins_clicked ();
|
||||
|
|
@ -204,16 +237,13 @@ private:
|
|||
|
||||
Glib::RefPtr<Pango::Layout> layout;
|
||||
|
||||
bool _existing_session_chooser_used; ///< set to true when the existing session chooser has been used
|
||||
|
||||
Gtk::Label info_scroller_label;
|
||||
std::string::size_type info_scroller_count;
|
||||
bool info_scroller_update();
|
||||
sigc::connection info_scroller_connection;
|
||||
void updates_button_clicked ();
|
||||
|
||||
int inital_height;
|
||||
int inital_width;
|
||||
Gtk::Notebook _tabs;
|
||||
};
|
||||
|
||||
#endif /* __gtk2_ardour_session_dialog_h__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue