fix panner visual corruption bug #1213; more consistent naming for automation states; carl's wheel-3 patch

git-svn-id: svn://localhost/ardour2/trunk@1581 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-03-13 12:08:41 +00:00
parent a493ea0aab
commit c1a5269c55
4 changed files with 16 additions and 9 deletions

View file

@ -52,7 +52,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
double wx, wy;
switch (ev->direction) {
case GDK_SCROLL_DOWN:
case GDK_SCROLL_UP:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
//if (ev->state == GDK_CONTROL_MASK) {
/* XXX
@ -71,7 +71,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.y = wy;
nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (true, where);
temporal_zoom_to_frame (false, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
if (!current_stepping_trackview) {
@ -88,7 +88,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
return true;
}
break;
case GDK_SCROLL_UP:
case GDK_SCROLL_DOWN:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
//if (ev->state == GDK_CONTROL_MASK) {
track_canvas.get_pointer (x, y);
@ -102,7 +102,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
event.button.y = wy;
nframes_t where = event_frame (&event, 0, 0);
temporal_zoom_to_frame (false, where);
temporal_zoom_to_frame (true, where);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
if (!current_stepping_trackview) {

View file

@ -845,7 +845,7 @@ GainMeter::_astate_string (AutoState state, bool shrt)
switch (state) {
case Off:
sstr = (shrt ? "O" : _("O"));
sstr = (shrt ? "M" : _("M"));
break;
case Play:
sstr = (shrt ? "P" : _("P"));

View file

@ -327,7 +327,7 @@ LadspaPluginUI::automation_state_changed (ControlUI* cui)
switch (insert->get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) {
case Off:
cui->automate_button.set_label (_("Off"));
cui->automate_button.set_label (_("Manual"));
break;
case Play:
cui->automate_button.set_label (_("Play"));
@ -570,7 +570,7 @@ LadspaPluginUI::astate_clicked (ControlUI* cui, uint32_t port)
MenuList& items (automation_menu->items());
items.clear ();
items.push_back (MenuElem (_("Off"),
items.push_back (MenuElem (_("Manual"),
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Off, cui)));
items.push_back (MenuElem (_("Play"),
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Play, cui)));

View file

@ -85,7 +85,7 @@ PannerUI::PannerUI (boost::shared_ptr<IO> io, Session& s)
pan_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
using namespace Menu_Helpers;
pan_astate_menu.items().push_back (MenuElem (_("Off"),
pan_astate_menu.items().push_back (MenuElem (_("Manual"),
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Off)));
pan_astate_menu.items().push_back (MenuElem (_("Play"),
bind (mem_fun (_io->panner(), &Panner::set_automation_state), (AutoState) Play)));
@ -274,6 +274,13 @@ PannerUI::setup_pan ()
pan_adjustments.pop_back ();
}
/* stick something into the panning viewport so that it redraws */
EventBox* eb = manage (new EventBox());
panning_viewport.remove ();
panning_viewport.add (*eb);
panning_viewport.show_all ();
} else if (nouts == 2) {
vector<Adjustment*>::size_type asz;
@ -738,7 +745,7 @@ PannerUI::_astate_string (AutoState state, bool shrt)
switch (state) {
case Off:
sstr = (shrt ? "O" : _("O"));
sstr = (shrt ? "M" : _("M"));
break;
case Play:
sstr = (shrt ? "P" : _("P"));