13
0

Remove some dead code.

git-svn-id: svn://localhost/ardour2/branches/3.0@7090 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-05-10 01:37:35 +00:00
parent ce1316a907
commit c899ba4368
11 changed files with 17 additions and 135 deletions

View File

@ -490,10 +490,6 @@ AutomationTimeAxisView::build_display_menu ()
{
using namespace Menu_Helpers;
/* get the size menu ready */
build_size_menu ();
/* prepare it */
TimeAxisView::build_display_menu ();
@ -502,8 +498,6 @@ AutomationTimeAxisView::build_display_menu ()
MenuList& items = display_menu->items();
items.push_back (MenuElem (_("Height"), *size_menu));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Hide"), sigc::mem_fun(*this, &AutomationTimeAxisView::hide_clicked)));
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Clear"), sigc::mem_fun(*this, &AutomationTimeAxisView::clear_clicked)));

View File

@ -4890,16 +4890,16 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
}
void
Editor::hide_track_in_display (TimeAxisView& tv, bool /*temponly*/)
Editor::hide_track_in_display (TimeAxisView* tv, bool /*temponly*/)
{
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&tv);
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
if (rtv && current_mixer_strip && (rtv->route() == current_mixer_strip->route())) {
// this will hide the mixer strip
set_selected_mixer_strip (tv);
set_selected_mixer_strip (*tv);
}
_routes->hide_track_in_display (tv);
_routes->hide_track_in_display (*tv);
}
bool

View File

@ -334,7 +334,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void create_editor_mixer ();
void show_editor_list (bool yn);
void set_selected_mixer_strip (TimeAxisView&);
void hide_track_in_display (TimeAxisView& tv, bool temporary = false);
void hide_track_in_display (TimeAxisView* tv, bool temporary = false);
/* nudge is initiated by transport controls owned by ARDOUR_UI */

View File

@ -1736,7 +1736,7 @@ Editor::temporal_zoom_region (bool both_axes)
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
if (find (tracks.begin(), tracks.end(), (*i)) == tracks.end()) {
hide_track_in_display (**i, true);
hide_track_in_display (*i, true);
}
}
@ -6357,7 +6357,7 @@ Editor::fit_tracks (TrackViewList & tracks)
first_y_pos = std::min ((*t)->y_position (), first_y_pos);
} else {
if (prev_was_selected && next_is_selected) {
hide_track_in_display (**t);
hide_track_in_display (*t);
}
}

View File

@ -536,7 +536,7 @@ EditorRouteGroups::row_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel
} else {
for (TrackViewList::const_iterator j = _editor->get_track_views().begin(); j != _editor->get_track_views().end(); ++j) {
if ((*j)->route_group() == group) {
_editor->hide_track_in_display (**j);
_editor->hide_track_in_display (*j);
}
}
}

View File

@ -398,12 +398,15 @@ EditorRoutes::route_deleted (Gtk::TreeModel::Path const &)
void
EditorRoutes::visible_changed (Glib::ustring const & path)
{
cout << "vis cha earl\n";
if (_session && _session->deletion_in_progress()) {
return;
}
TreeIter iter;
cout << "ER vis cha\n";
if ((iter = _model->get_iter (path))) {
TimeAxisView* tv = (*iter)[_columns.tv];
if (tv) {
@ -567,8 +570,11 @@ EditorRoutes::hide_track_in_display (TimeAxisView& tv)
TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i;
cout << "hide.\n";
for (i = rows.begin(); i != rows.end(); ++i) {
if ((*i)[_columns.tv] == &tv) {
cout << "weee\n";
(*i)[_columns.visible] = false;
break;
}

View File

@ -223,7 +223,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void select_all_tracks () = 0;
virtual void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove = false) = 0;
virtual void set_selected_mixer_strip (TimeAxisView&) = 0;
virtual void hide_track_in_display (TimeAxisView& tv, bool temporary = false) = 0;
virtual void hide_track_in_display (TimeAxisView* tv, bool temporary = false) = 0;
virtual void set_stationary_playhead (bool yn) = 0;
virtual void toggle_stationary_playhead () = 0;

View File

@ -110,9 +110,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
, button_table (3, 3)
, route_group_button (_("g"))
, playlist_button (_("p"))
, size_button (_("h"))
, automation_button (_("a"))
, visual_button (_("v"))
, gm (sess, slider, true, 115)
, _ignore_track_mode_change (false)
{
@ -146,26 +144,14 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
route_group_button.set_name ("TrackGroupButton");
playlist_button.set_name ("TrackPlaylistButton");
automation_button.set_name ("TrackAutomationButton");
size_button.set_name ("TrackSizeButton");
visual_button.set_name ("TrackVisualButton");
hide_button.set_name ("TrackRemoveButton");
route_group_button.unset_flags (Gtk::CAN_FOCUS);
playlist_button.unset_flags (Gtk::CAN_FOCUS);
automation_button.unset_flags (Gtk::CAN_FOCUS);
size_button.unset_flags (Gtk::CAN_FOCUS);
visual_button.unset_flags (Gtk::CAN_FOCUS);
hide_button.unset_flags (Gtk::CAN_FOCUS);
hide_button.add (*(manage (new Image (::get_icon("hide")))));
hide_button.show_all ();
route_group_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteTimeAxisView::edit_click), false);
playlist_button.signal_clicked().connect (sigc::mem_fun(*this, &RouteTimeAxisView::playlist_click));
automation_button.signal_clicked().connect (sigc::mem_fun(*this, &RouteTimeAxisView::automation_click));
size_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteTimeAxisView::size_click), false);
visual_button.signal_clicked().connect (sigc::mem_fun(*this, &RouteTimeAxisView::visual_click));
hide_button.signal_clicked().connect (sigc::mem_fun(*this, &RouteTimeAxisView::hide_click));
if (is_track()) {
@ -207,27 +193,12 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group"));
ARDOUR_UI::instance()->set_tip(size_button,_("Display Height"));
ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist"));
ARDOUR_UI::instance()->set_tip(automation_button, _("Automation"));
ARDOUR_UI::instance()->set_tip(visual_button, _("Visual options"));
ARDOUR_UI::instance()->set_tip(hide_button, _("Hide this track"));
label_view ();
if (0) {
/* old school - when we used to put an extra row of buttons in place */
controls_table.attach (hide_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (visual_button, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (size_button, 2, 3, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (automation_button, 3, 4, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
} else {
controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
}
controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
if (is_track() && track()->mode() == ARDOUR::Normal) {
controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
@ -453,10 +424,6 @@ RouteTimeAxisView::build_display_menu ()
{
using namespace Menu_Helpers;
/* get the size menu ready */
build_size_menu ();
/* prepare it */
TimeAxisView::build_display_menu ();
@ -466,7 +433,6 @@ RouteTimeAxisView::build_display_menu ()
MenuList& items = display_menu->items();
display_menu->set_name ("ArdourContextMenu");
items.push_back (MenuElem (_("Height"), *size_menu));
items.push_back (MenuElem (_("Color"), sigc::mem_fun(*this, &RouteTimeAxisView::select_track_color)));
items.push_back (SeparatorElem());
@ -572,7 +538,7 @@ RouteTimeAxisView::build_display_menu ()
route_active_menu_item->set_active (_route->active());
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Hide"), sigc::mem_fun(*this, &RouteTimeAxisView::hide_click)));
items.push_back (MenuElem (_("Hide"), sigc::bind (sigc::mem_fun(_editor, &PublicEditor::hide_track_in_display), this, false)));
if (!Profile->get_sae()) {
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(*this, &RouteUI::remove_this_route)));
} else {
@ -806,9 +772,6 @@ RouteTimeAxisView::set_height (uint32_t h)
rec_enable_button->show();
route_group_button.show();
hide_button.show();
visual_button.show();
size_button.show();
automation_button.show();
if (is_track() && track()->mode() == ARDOUR::Normal) {
@ -832,9 +795,6 @@ RouteTimeAxisView::set_height (uint32_t h)
rec_enable_button->show();
route_group_button.hide ();
hide_button.hide ();
visual_button.hide ();
size_button.hide ();
automation_button.hide ();
if (is_track() && track()->mode() == ARDOUR::Normal) {
@ -865,9 +825,6 @@ RouteTimeAxisView::set_height (uint32_t h)
rec_enable_button->hide();
route_group_button.hide ();
hide_button.hide ();
visual_button.hide ();
size_button.hide ();
automation_button.hide ();
playlist_button.hide ();
name_label.set_text (_route->name());
@ -1336,23 +1293,6 @@ RouteTimeAxisView::name_entry_changed ()
}
}
void
RouteTimeAxisView::visual_click ()
{
popup_display_menu (0);
}
void
RouteTimeAxisView::hide_click ()
{
// LAME fix for hide_button refresh fix
hide_button.set_sensitive(false);
_editor.hide_track_in_display (*this);
hide_button.set_sensitive(true);
}
boost::shared_ptr<Region>
RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
{

View File

@ -249,9 +249,6 @@ protected:
void timestretch (nframes_t start, nframes_t end);
void visual_click ();
void hide_click ();
void speed_changed ();
void map_frozen ();
@ -269,10 +266,7 @@ protected:
Gtk::Button processor_button;
Gtk::Button route_group_button;
Gtk::Button playlist_button;
Gtk::Button size_button;
Gtk::Button automation_button;
Gtk::Button hide_button;
Gtk::Button visual_button;
Gtk::Menu subplugin_menu;
Gtk::Menu* automation_action_menu;

View File

@ -101,7 +101,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
control_parent = 0;
display_menu = 0;
size_menu = 0;
_hidden = false;
in_destructor = false;
height = 0;
@ -599,23 +598,6 @@ TimeAxisView::popup_display_menu (guint32 when)
display_menu->popup (1, when);
}
gint
TimeAxisView::size_click (GdkEventButton *ev)
{
conditionally_add_to_selection ();
popup_size_menu (ev->time);
return TRUE;
}
void
TimeAxisView::popup_size_menu (guint32 when)
{
if (size_menu == 0) {
build_size_menu ();
}
size_menu->popup (1, when);
}
void
TimeAxisView::set_selected (bool yn)
{
@ -648,23 +630,6 @@ TimeAxisView::set_selected (bool yn)
resizer.queue_draw ();
}
void
TimeAxisView::build_size_menu ()
{
using namespace Menu_Helpers;
size_menu = new Menu;
size_menu->set_name ("ArdourContextMenu");
MenuList& items = size_menu->items();
items.push_back (MenuElem (_("Largest"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights), hLargest)));
items.push_back (MenuElem (_("Large"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights), hLarge)));
items.push_back (MenuElem (_("Larger"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights), hLarger)));
items.push_back (MenuElem (_("Normal"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights), hNormal)));
items.push_back (MenuElem (_("Smaller"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights),hSmaller)));
items.push_back (MenuElem (_("Small"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_heights), hSmall)));
}
void
TimeAxisView::build_display_menu ()
{

View File

@ -277,26 +277,9 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
*/
virtual bool handle_display_menu_map_event (GdkEventAny * /*ev*/) { return false; }
/** Build the standard LHS control size menu for the default heights options.
*/
virtual void build_size_menu();
/** Displays the standard LHS controls size menu for the track heights
*
* @param when the popup activation time
*/
void popup_size_menu(guint32 when);
/** Handle the size option of our main menu.
*
* @param ev the event
*/
gint size_click(GdkEventButton *ev);
/* The standard LHS Track control popup-menus */
Gtk::Menu *display_menu;
Gtk::Menu *size_menu;
Gtk::Label name_label;