13
0

radio actions now display correctly, region list sorting works

git-svn-id: svn://localhost/trunk/ardour2@227 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-01-02 18:10:29 +00:00
parent 78e61e0c84
commit feed0fc333
4 changed files with 8 additions and 12 deletions

View File

@ -101,7 +101,7 @@ ActionManager::register_action (RefPtr<ActionGroup> group, const char * name, co
RefPtr<Action>
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group& rgroup, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
{
RefPtr<Action> act = register_radio_action (group, rgroup, name, label, sl);
AccelMap::add_entry (act->get_accel_path(), key, mods);
@ -110,7 +110,7 @@ ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Gr
}
RefPtr<Action>
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, const char * name, const char * label, slot<void> sl)
ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group& rgroup, const char * name, const char * label, slot<void> sl)
{
RefPtr<Action> act;

View File

@ -49,10 +49,10 @@ class ActionManager
static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
const char * name, const char * label, sigc::slot<void> sl);
static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group,
static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
const char * name, const char * label, sigc::slot<void> sl,
guint key, Gdk::ModifierType mods);
static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group,
static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&,
const char * name, const char * label, sigc::slot<void> sl);
static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group,

View File

@ -595,10 +595,10 @@ Editor::Editor (AudioEngine& eng)
region_list_display.set_name ("RegionListDisplay");
region_list_model = TreeStore::create (region_list_columns);
region_list_sort_model = TreeModelSort::create (region_list_model);
region_list_model->set_sort_func (0, mem_fun (*this, &Editor::region_list_sorter));
region_list_model->set_sort_column (0, SORT_ASCENDING);
region_list_display.set_model (region_list_sort_model);
region_list_display.set_model (region_list_model);
CellRendererText* renderer = Gtk::manage( new Gtk::CellRendererText() );
region_list_display.append_column (_("Regions"), *renderer);

View File

@ -441,8 +441,6 @@ Editor::region_list_display_button_press (GdkEventButton *ev)
int cellx;
int celly;
cerr << "RL button press\n";
if (region_list_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
if ((iter = region_list_model->get_iter (path))) {
region = (*iter)[region_list_columns.region];
@ -497,8 +495,6 @@ Editor::region_list_display_button_release (GdkEventButton *ev)
int celly;
Region* region;
cerr << "RL button release\n";
if (region_list_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
if ((iter = region_list_model->get_iter (path))) {
region = (*iter)[region_list_columns.region];
@ -631,14 +627,14 @@ Editor::reset_region_list_sort_type (RegionListSortType type)
{
if (type != region_list_sort_type) {
region_list_sort_type = type;
region_list_sort_model->set_sort_func (0, mem_fun (*this, &Editor::region_list_sorter));
region_list_model->set_sort_func (0, (mem_fun (*this, &Editor::region_list_sorter)));
}
}
void
Editor::reset_region_list_sort_direction (bool up)
{
// region_list_display.set_sort_type (up ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
region_list_model->set_sort_column (0, up ? SORT_ASCENDING : SORT_DESCENDING);
}
void