13
0

Update mixer group tabs on strip width change. Don't display the mixer group tab menu if there's not a group involved.

git-svn-id: svn://localhost/ardour2/branches/3.0@5265 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-06-23 23:05:14 +00:00
parent 474bf32ae3
commit acaf05db1d
6 changed files with 17 additions and 15 deletions

View File

@ -86,7 +86,10 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
} else if (ev->button == 3) { } else if (ev->button == 3) {
RouteGroup* g = t ? t->group : 0; RouteGroup* g = t ? t->group : 0;
get_menu(g)->popup (ev->button, ev->time); Menu* m = get_menu (g);
if (m) {
m->popup (ev->button, ev->time);
}
} }

View File

@ -162,6 +162,10 @@ MixerGroupTabs::reflect_tabs (list<Tab> const & tabs)
Gtk::Menu* Gtk::Menu*
MixerGroupTabs::get_menu (RouteGroup* g) MixerGroupTabs::get_menu (RouteGroup* g)
{ {
if (g == 0) {
return 0;
}
using namespace Menu_Helpers; using namespace Menu_Helpers;
delete _menu; delete _menu;

View File

@ -605,9 +605,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
update_output_display (); update_output_display ();
route_group_changed (0); route_group_changed (0);
name_changed (); name_changed ();
#ifdef GTKOSX WidthChanged ();
WidthChanged();
#endif
} }
void void

View File

@ -98,9 +98,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void set_route (boost::shared_ptr<ARDOUR::Route>); void set_route (boost::shared_ptr<ARDOUR::Route>);
void set_button_names (); void set_button_names ();
#ifdef GTKOSX
sigc::signal<void> WidthChanged; sigc::signal<void> WidthChanged;
#endif
static sigc::signal<void,boost::shared_ptr<ARDOUR::Route> > SwitchIO; static sigc::signal<void,boost::shared_ptr<ARDOUR::Route> > SwitchIO;

View File

@ -338,9 +338,7 @@ Mixer_UI::add_strip (RouteList& routes)
route->NameChanged.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip)); route->NameChanged.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip));
strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip)); strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip));
#ifdef GTKOSX strip->WidthChanged.connect (mem_fun(*this, &Mixer_UI::strip_width_changed));
strip->WidthChanged.connect (mem_fun(*this, &Mixer_UI::queue_draw_all_strips));
#endif
strip->signal_button_release_event().connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); strip->signal_button_release_event().connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
} }
@ -774,10 +772,12 @@ Mixer_UI::redisplay_track_list ()
_group_tabs->set_dirty (); _group_tabs->set_dirty ();
} }
#ifdef GTKOSX
void void
Mixer_UI::queue_draw_all_strips () Mixer_UI::strip_width_changed ()
{ {
_group_tabs->set_dirty ();
#ifdef GTKOSX
TreeModel::Children rows = track_model->children(); TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i; TreeModel::Children::iterator i;
long order; long order;
@ -795,8 +795,9 @@ Mixer_UI::queue_draw_all_strips ()
strip->queue_draw(); strip->queue_draw();
} }
} }
}
#endif #endif
}
void void
Mixer_UI::set_auto_rebinding( bool val ) Mixer_UI::set_auto_rebinding( bool val )

View File

@ -154,9 +154,7 @@ class Mixer_UI : public Gtk::Window
void redisplay_track_list (); void redisplay_track_list ();
bool no_track_list_redisplay; bool no_track_list_redisplay;
bool track_display_button_press (GdkEventButton*); bool track_display_button_press (GdkEventButton*);
#ifdef GTKOSX void strip_width_changed ();
void queue_draw_all_strips ();
#endif
void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&); void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
void track_list_delete (const Gtk::TreeModel::Path&); void track_list_delete (const Gtk::TreeModel::Path&);