make show all option on region list context menu work
git-svn-id: svn://localhost/trunk/ardour2@236 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c480cc1c18
commit
b75112adea
@ -196,6 +196,7 @@
|
||||
<menuitem action='rlRemove'/>
|
||||
<separator/>
|
||||
<menuitem action='rlShowAll'/>
|
||||
<menuitem action='rlShowAuto'/>
|
||||
<menu name='Sort' action='RegionListSort'>
|
||||
<menuitem action='SortAscending'/>
|
||||
<menuitem action='SortDescending'/>
|
||||
|
@ -339,8 +339,6 @@ Editor::Editor (AudioEngine& eng)
|
||||
new_transport_marker_menu = 0;
|
||||
editor_mixer_strip_width = Wide;
|
||||
repos_zoom_queued = false;
|
||||
import_audio_item = 0;
|
||||
embed_audio_item = 0;
|
||||
region_edit_menu_split_item = 0;
|
||||
temp_location = 0;
|
||||
region_edit_menu_split_multichannel_item = 0;
|
||||
|
@ -693,8 +693,8 @@ class Editor : public PublicEditor
|
||||
RegionListDisplayModelColumns region_list_columns;
|
||||
Gtkmm2ext::DnDTreeView region_list_display;
|
||||
Glib::RefPtr<Gtk::TreeStore> region_list_model;
|
||||
Glib::RefPtr<Gtk::TreeModelSort> region_list_sort_model;
|
||||
Glib::RefPtr<Gtk::Action> toggle_full_region_list_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
|
||||
|
||||
void region_list_selection_changed ();
|
||||
|
||||
@ -711,12 +711,6 @@ class Editor : public PublicEditor
|
||||
void build_region_list_menu ();
|
||||
void show_region_list_display_context_menu (int button, int time);
|
||||
|
||||
Gtk::CheckMenuItem* toggle_auto_regions_item;
|
||||
Gtk::CheckMenuItem* toggle_full_region_list_item;
|
||||
|
||||
Gtk::MenuItem* import_audio_item;
|
||||
Gtk::MenuItem* embed_audio_item;
|
||||
|
||||
bool show_automatic_regions_in_region_list;
|
||||
Editing::RegionListSortType region_list_sort_type;
|
||||
|
||||
|
@ -263,7 +263,8 @@ Editor::register_actions ()
|
||||
ActionManager::region_list_selection_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
|
||||
ActionManager::region_list_selection_sensitive_actions.push_back (act);
|
||||
ActionManager::register_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
|
||||
ActionManager::register_toggle_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
|
||||
ActionManager::register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show automatic regions"), mem_fun(*this, &Editor::toggle_show_auto_regions));
|
||||
|
||||
ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
|
||||
bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true));
|
||||
|
@ -373,21 +373,30 @@ Editor::build_region_list_menu ()
|
||||
|
||||
/* now grab specific menu items that we need */
|
||||
|
||||
toggle_full_region_list_action = ActionManager::get_action (X_("RegionList"), X_("rlShowAll"));
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
act = ActionManager::get_action (X_("RegionList"), X_("rlShowAll"));
|
||||
if (act) {
|
||||
toggle_full_region_list_action = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
}
|
||||
|
||||
act = ActionManager::get_action (X_("RegionList"), X_("rlShowAuto"));
|
||||
if (act) {
|
||||
toggle_show_auto_regions_action = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_show_auto_regions ()
|
||||
{
|
||||
//show_automatic_regions_in_region_list = toggle_auto_regions_item->get_active();
|
||||
show_automatic_regions_in_region_list = true;
|
||||
show_automatic_regions_in_region_list = toggle_show_auto_regions_action->get_active();
|
||||
redisplay_regions ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_full_region_list ()
|
||||
{
|
||||
if (toggle_full_region_list_item->get_active()) {
|
||||
if (toggle_full_region_list_action->get_active()) {
|
||||
region_list_display.expand_all ();
|
||||
} else {
|
||||
region_list_display.collapse_all ();
|
||||
|
@ -157,21 +157,19 @@ FastMeter::vertical_expose (GdkEventExpose* ev)
|
||||
/* draw the part of the meter image that we need. the area we draw is bounded "in reverse" (top->bottom)
|
||||
*/
|
||||
|
||||
RefPtr<Gdk::Window> win(get_window());
|
||||
win->draw_drawable(get_style()->get_fg_gc(get_state()), v_pixmap,
|
||||
intersection.x, v_pixheight - top_of_meter,
|
||||
intersection.x, v_pixheight - top_of_meter,
|
||||
intersection.width, intersection.height);
|
||||
get_window()->draw_drawable(get_style()->get_fg_gc(get_state()), v_pixmap,
|
||||
intersection.x, v_pixheight - top_of_meter,
|
||||
intersection.x, v_pixheight - top_of_meter,
|
||||
intersection.width, intersection.height);
|
||||
}
|
||||
|
||||
/* draw peak bar */
|
||||
|
||||
if (hold_state) {
|
||||
RefPtr<Gdk::Window> win(get_window());
|
||||
win->draw_drawable(get_style()->get_fg_gc(get_state()), v_pixmap,
|
||||
intersection.x, v_pixheight - (gint) floor (v_pixheight * current_peak),
|
||||
intersection.x, v_pixheight - (gint) floor (v_pixheight * current_peak),
|
||||
intersection.width, 3);
|
||||
get_window()->draw_drawable(get_style()->get_fg_gc(get_state()), v_pixmap,
|
||||
intersection.x, v_pixheight - (gint) floor (v_pixheight * current_peak),
|
||||
intersection.x, v_pixheight - (gint) floor (v_pixheight * current_peak),
|
||||
intersection.width, 3);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -191,21 +189,19 @@ FastMeter::horizontal_expose (GdkEventExpose* ev)
|
||||
/* draw the part of the meter image that we need.
|
||||
*/
|
||||
|
||||
RefPtr<Gdk::Window> win(get_window());
|
||||
win->draw_drawable(get_style()->get_fg_gc(get_state()), h_pixmap,
|
||||
intersection.x, intersection.y,
|
||||
intersection.x, intersection.y,
|
||||
intersection.width, intersection.height);
|
||||
get_window()->draw_drawable(get_style()->get_fg_gc(get_state()), h_pixmap,
|
||||
intersection.x, intersection.y,
|
||||
intersection.x, intersection.y,
|
||||
intersection.width, intersection.height);
|
||||
}
|
||||
|
||||
|
||||
/* draw peak bar */
|
||||
|
||||
|
||||
if (hold_state) {
|
||||
RefPtr<Gdk::Window> win(get_window());
|
||||
win->draw_drawable(get_style()->get_fg_gc(get_state()), h_pixmap,
|
||||
right_of_meter, intersection.y,
|
||||
right_of_meter, intersection.y,
|
||||
3, intersection.height);
|
||||
get_window()->draw_drawable(get_style()->get_fg_gc(get_state()), h_pixmap,
|
||||
right_of_meter, intersection.y,
|
||||
right_of_meter, intersection.y,
|
||||
3, intersection.height);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user