add ctrl-click behaviour to DndVBox, though not generalized to use primary/secondary keyboard mods etc. etc.
git-svn-id: svn://localhost/ardour2/branches/3.0@6202 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
31b8f64319
commit
673a995e5c
@ -258,8 +258,17 @@ private:
|
|||||||
add_to_selection (child);
|
add_to_selection (child);
|
||||||
}
|
}
|
||||||
SelectionChanged (); /* EMIT SIGNAL */
|
SelectionChanged (); /* EMIT SIGNAL */
|
||||||
|
} else {
|
||||||
|
/* XXX THIS NEEDS GENERALIZING FOR OS X */
|
||||||
|
if (ev->button == 1 && (ev->state & Gdk::CONTROL_MASK)) {
|
||||||
|
if (child && selected (child)) {
|
||||||
|
remove_from_selection (child);
|
||||||
|
SelectionChanged (); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return ButtonPress (ev, child); /* EMIT SIGNAL */
|
return ButtonPress (ev, child); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
@ -292,6 +301,16 @@ private:
|
|||||||
_selection.push_back (child);
|
_selection.push_back (child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void remove_from_selection (T* child)
|
||||||
|
{
|
||||||
|
typename std::list<T*>::iterator x = find (_selection.begin(), _selection.end(), child);
|
||||||
|
if (x != _selection.end()) {
|
||||||
|
child->action_widget().set_state (Gtk::STATE_NORMAL);
|
||||||
|
_selection.erase (x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
T* child_from_widget (Gtk::Widget const * w) const
|
T* child_from_widget (Gtk::Widget const * w) const
|
||||||
{
|
{
|
||||||
typename std::list<T*>::const_iterator i = _children.begin();
|
typename std::list<T*>::const_iterator i = _children.begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user