dbl-click on a recent session completes dialog; start work on saving modified key bindings

git-svn-id: svn://localhost/trunk/ardour2@427 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-03-30 03:38:33 +00:00
parent f6167b8723
commit 16d0b9f357
3 changed files with 20 additions and 5 deletions

View File

@ -72,8 +72,8 @@
(gtk_accel_path "<Actions>/Editor/extend-range-to-start-of-region" "leftanglebracket")
(gtk_accel_path "<Actions>/Editor/extend-range-to-end-of-region" "rightanglebracket")
(gtk_accel_path "<Actions>/Editor/align-regions-sync" "<meta>a")
(gtk_accel_path "<Actions>/Editor/align-regions-end" "<meta><control>a")
(gtk_accel_path "<Actions>/Editor/align-regions-sync" "<mod2>a")
(gtk_accel_path "<Actions>/Editor/align-regions-end" "<mod2><control>a")
(gtk_accel_path "<Actions>/Editor/align-regions-start-relative" "<shift>a")
(gtk_accel_path "<Actions>/Editor/brush-at-mouse" "<control>b")
@ -82,8 +82,8 @@
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-start" "Tab")
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-end" "<Control>Tab")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-start" "quoteleft")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-end" "<control>quoteleft")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-start" "grave")
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-end" "<control>grave")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-start" "bracketleft")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-end" "<Control>bracketleft")
@ -91,7 +91,7 @@
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-start" "bracketright")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-end" "<Control>bracketright")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-sync" "quoteright")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-sync" "apostrophe")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-sync" "semicolon")
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-range-start" "F1")

View File

@ -29,6 +29,7 @@
#include <iostream>
#include <gtkmm/messagedialog.h>
#include <gtkmm/accelmap.h>
#include <pbd/error.h>
#include <pbd/compose.h>
@ -384,6 +385,10 @@ ARDOUR_UI::save_ardour_state ()
Config->add_instant_xml(enode, get_user_ardour_path());
Config->add_instant_xml(mnode, get_user_ardour_path());
}
/* keybindings */
AccelMap::save ("ardour.saved_bindings");
}
void
@ -789,6 +794,9 @@ ARDOUR_UI::build_session_selector ()
recent_session_display.set_model (recent_session_model);
recent_session_display.append_column (_("Recent Sessions"), recent_session_columns.visible_name);
recent_session_display.set_headers_visible (false);
recent_session_display.get_selection()->set_mode (SELECTION_SINGLE);
recent_session_display.signal_row_activated().connect (mem_fun (*this, &ARDOUR_UI::recent_session_row_activated));
scroller->add (recent_session_display);
scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
@ -799,6 +807,12 @@ ARDOUR_UI::build_session_selector ()
session_selector_window->show_all_children();
}
void
ARDOUR_UI::recent_session_row_activated (const TreePath& path, TreeViewColumn* col)
{
session_selector_window->response (RESPONSE_ACCEPT);
}
void
ARDOUR_UI::open_recent_session ()
{

View File

@ -475,6 +475,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void build_session_selector();
void recent_session_selection_changed ();
void redisplay_recent_sessions();
void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
struct RecentSessionsSorter {
bool operator() (std::pair<string,string> a, std::pair<string,string> b) const {