remove Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator().

This is no longer needed because we can set the modifier to the actual bits that GTK uses for Command (META+MOD2)
This commit is contained in:
Paul Davis 2015-10-27 13:11:18 -04:00
parent 157b4b6b72
commit aba063bfaa
3 changed files with 0 additions and 26 deletions

View file

@ -5204,7 +5204,6 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
GdkModifierType modifier = GdkModifierType (ev->state);
modifier = GdkModifierType (modifier & gtk_accelerator_get_default_mod_mask());
Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator(modifier);
if (focus) {

View file

@ -123,7 +123,6 @@ namespace Gtkmm2ext {
LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent);
LIBGTKMM2EXT_API bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval);
LIBGTKMM2EXT_API bool possibly_translate_mod_to_make_legal_accelerator (GdkModifierType& mod);
LIBGTKMM2EXT_API uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval);
LIBGTKMM2EXT_API int physical_screen_height (Glib::RefPtr<Gdk::Window>);

View file

@ -381,30 +381,6 @@ Gtkmm2ext::detach_menu (Gtk::Menu& menu)
}
}
bool
Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator (GdkModifierType& mod)
{
#ifdef GTKOSX
/* GTK on OS X is currently (February 2012) setting both
the Meta and Mod2 bits in the event modifier state if
the Command key is down.
gtk_accel_groups_activate() does not invoke any of the logic
that gtk_window_activate_key() will that sorts out that stupid
state of affairs, and as a result it fails to find a match
for the key event and the current set of accelerators.
to fix this, if the meta bit is set, remove the mod2 bit
from the modifier. this assumes that our bindings use Primary
which will have set the meta bit in the accelerator entry.
*/
if (mod & GDK_META_MASK) {
mod = GdkModifierType (mod & ~GDK_MOD2_MASK);
}
#endif
return true;
}
bool
Gtkmm2ext::possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval)
{