mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 21:26:26 +01:00
progressing Open Session Dialog (adding double click on recent session name)
[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 457732]
This commit is contained in:
parent
d853c93aee
commit
c6b6ee9278
4 changed files with 29 additions and 13 deletions
|
|
@ -84,6 +84,7 @@ void SessionDialog::init()
|
||||||
_system_configuration_button.signal_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_system_configuration));
|
_system_configuration_button.signal_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_system_configuration));
|
||||||
for (size_t i = 0; i < MAX_RECENT_SESSION_COUNTS; i++) {
|
for (size_t i = 0; i < MAX_RECENT_SESSION_COUNTS; i++) {
|
||||||
_recent_session_button[i]->signal_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_recent_session ));
|
_recent_session_button[i]->signal_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_recent_session ));
|
||||||
|
_recent_session_button[i]->signal_double_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_recent_session_double_click ));
|
||||||
}
|
}
|
||||||
redisplay_system_configuration ();
|
redisplay_system_configuration ();
|
||||||
redisplay_recent_sessions();
|
redisplay_recent_sessions();
|
||||||
|
|
@ -310,6 +311,18 @@ SessionDialog::on_recent_session (WavesButton* clicked_button)
|
||||||
_open_selected_button.set_sensitive (_selection_type == RecentSession);
|
_open_selected_button.set_sensitive (_selection_type == RecentSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SessionDialog::on_recent_session_double_click (WavesButton*)
|
||||||
|
{
|
||||||
|
// we suppose the first click, occurred prior to the second in the
|
||||||
|
// double click sequence has been processed correctly and now
|
||||||
|
// the job is just to respond with ok
|
||||||
|
|
||||||
|
hide();
|
||||||
|
response (Gtk::RESPONSE_ACCEPT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SessionDialog::on_system_configuration (WavesButton* clicked_button)
|
SessionDialog::on_system_configuration (WavesButton* clicked_button)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@
|
||||||
void on_open_saved_session (WavesButton*);
|
void on_open_saved_session (WavesButton*);
|
||||||
void on_new_session (WavesButton*);
|
void on_new_session (WavesButton*);
|
||||||
void on_recent_session (WavesButton*);
|
void on_recent_session (WavesButton*);
|
||||||
|
void on_recent_session_double_click (WavesButton*);
|
||||||
void on_system_configuration (WavesButton*);
|
void on_system_configuration (WavesButton*);
|
||||||
bool on_delete_event (GdkEventAny*);
|
bool on_delete_event (GdkEventAny*);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -275,23 +275,24 @@ WavesButton::on_size_request (Gtk::Requisition* req)
|
||||||
req->width += _corner_radius;
|
req->width += _corner_radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
WavesButton::on_button_press_event (GdkEventButton *ev)
|
WavesButton::on_button_press_event (GdkEventButton *ev)
|
||||||
{
|
{
|
||||||
_pushed = true;
|
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||||
queue_draw ();
|
signal_double_clicked (this);
|
||||||
if (binding_proxy.button_press_handler (ev)) {
|
} else {
|
||||||
return true;
|
_pushed = true;
|
||||||
}
|
queue_draw ();
|
||||||
if (!_act_on_release) {
|
if (binding_proxy.button_press_handler (ev)) {
|
||||||
if (_action) {
|
|
||||||
_action->activate ();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!_act_on_release) {
|
||||||
|
if (_action) {
|
||||||
|
_action->activate ();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,6 @@ class WavesButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||||
void set_border_color(const char*);
|
void set_border_color(const char*);
|
||||||
Glib::RefPtr<Pango::Layout> layout() const { return _layout; }
|
Glib::RefPtr<Pango::Layout> layout() const { return _layout; }
|
||||||
|
|
||||||
sigc::signal1<void, WavesButton*> signal_clicked;
|
|
||||||
|
|
||||||
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); }
|
||||||
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
void set_controllable (boost::shared_ptr<PBD::Controllable> c);
|
||||||
void watch ();
|
void watch ();
|
||||||
|
|
@ -61,6 +59,9 @@ class WavesButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||||
bool on_button_press_event (GdkEventButton*);
|
bool on_button_press_event (GdkEventButton*);
|
||||||
bool on_button_release_event (GdkEventButton*);
|
bool on_button_release_event (GdkEventButton*);
|
||||||
|
|
||||||
|
sigc::signal1<void, WavesButton*> signal_clicked;
|
||||||
|
sigc::signal1<void, WavesButton*> signal_double_clicked;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void render (cairo_t *);
|
void render (cairo_t *);
|
||||||
void on_size_request (Gtk::Requisition* req);
|
void on_size_request (Gtk::Requisition* req);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue