mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
add key forwarding to playlist selector dialog
This commit is contained in:
parent
2e0fa8943a
commit
b03c8e7849
2 changed files with 21 additions and 0 deletions
|
|
@ -37,6 +37,7 @@
|
||||||
#include "playlist_selector.h"
|
#include "playlist_selector.h"
|
||||||
#include "route_ui.h"
|
#include "route_ui.h"
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
|
|
@ -362,3 +363,22 @@ PlaylistSelector::selection_changed ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
PlaylistSelector::on_key_press_event (GdkEventKey* ev)
|
||||||
|
{
|
||||||
|
/* Allow these keys to have their in-dialog effect */
|
||||||
|
|
||||||
|
switch (ev->keyval) {
|
||||||
|
case GDK_Up:
|
||||||
|
case GDK_Down:
|
||||||
|
case GDK_Return:
|
||||||
|
case GDK_KP_Enter:
|
||||||
|
return ArdourDialog::on_key_press_event (ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't just forward the key press ... make it act as if it occured in
|
||||||
|
whatever the main window currently is.
|
||||||
|
*/
|
||||||
|
return ARDOUR_UI_UTILS::emulate_key_event (ev->keyval, ev->state);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool on_unmap_event (GdkEventAny*);
|
bool on_unmap_event (GdkEventAny*);
|
||||||
|
bool on_key_press_event (GdkEventKey*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<PBD::ID,std::vector<boost::shared_ptr<ARDOUR::Playlist> >*> TrackPlaylistMap;
|
typedef std::map<PBD::ID,std::vector<boost::shared_ptr<ARDOUR::Playlist> >*> TrackPlaylistMap;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue