diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-18 14:41:25 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-18 14:41:25 -0400 |
commit | 1a55e83e98adf46b15cca2062ba2ad571a68c780 (patch) | |
tree | ef9139531039a932dc90696af0559d9a4daefd3d /gtk2_ardour | |
parent | 653b11360751125c853bdc086a64c4653044e6fd (diff) |
move show_gdk_event_state() utility function from gtk2_ardour to libs/gtkmm2ext
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/utils.cc | 59 | ||||
-rw-r--r-- | gtk2_ardour/utils.h | 1 |
3 files changed, 1 insertions, 61 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 9c627dcb01..4ce4a5b944 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -5536,7 +5536,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey DEBUG_TRACE (DEBUG::Accelerators, string_compose ("Win = %1 [title = %9] focus = %7 (%8) Key event: code = %2 state = %3 special handling ? %4 magic widget focus ? %5 focus widget %6 named %7 mods ? %8\n", win, ev->keyval, - show_gdk_event_state (ev->state), + Gtkmm2ext::show_gdk_event_state (ev->state), special_handling_of_unmodified_accelerators, Keyboard::some_magic_widget_has_focus(), focus, diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 7ddccc0f7e..26b048f2b0 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -350,65 +350,6 @@ ARDOUR_UI_UTILS::emulate_key_event (unsigned int keyval) return relay_key_press(&ev, &main_window); } -string -ARDOUR_UI_UTILS::show_gdk_event_state (int state) -{ - string s; - if (state & GDK_SHIFT_MASK) { - s += "+SHIFT"; - } - if (state & GDK_LOCK_MASK) { - s += "+LOCK"; - } - if (state & GDK_CONTROL_MASK) { - s += "+CONTROL"; - } - if (state & GDK_MOD1_MASK) { - s += "+MOD1"; - } - if (state & GDK_MOD2_MASK) { - s += "+MOD2"; - } - if (state & GDK_MOD3_MASK) { - s += "+MOD3"; - } - if (state & GDK_MOD4_MASK) { - s += "+MOD4"; - } - if (state & GDK_MOD5_MASK) { - s += "+MOD5"; - } - if (state & GDK_BUTTON1_MASK) { - s += "+BUTTON1"; - } - if (state & GDK_BUTTON2_MASK) { - s += "+BUTTON2"; - } - if (state & GDK_BUTTON3_MASK) { - s += "+BUTTON3"; - } - if (state & GDK_BUTTON4_MASK) { - s += "+BUTTON4"; - } - if (state & GDK_BUTTON5_MASK) { - s += "+BUTTON5"; - } - if (state & GDK_SUPER_MASK) { - s += "+SUPER"; - } - if (state & GDK_HYPER_MASK) { - s += "+HYPER"; - } - if (state & GDK_META_MASK) { - s += "+META"; - } - if (state & GDK_RELEASE_MASK) { - s += "+RELEASE"; - } - - return s; -} - Glib::RefPtr<Gdk::Pixbuf> ARDOUR_UI_UTILS::get_xpm (std::string name) { diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index ddbf8e9665..590d817b49 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -96,7 +96,6 @@ std::string rate_as_string (float r); bool windows_overlap (Gtk::Window *a, Gtk::Window *b); bool overwrite_file_dialog (Gtk::Window& parent, std::string title, std::string text); -std::string show_gdk_event_state (int state); bool running_from_source_tree (); } // namespace |