summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-01-16 00:04:12 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-01-16 00:04:12 +0000
commitd475fd0fca946358facff0ce24a900dc59a1bc9c (patch)
tree90f9cc5db8048d1cb1fc230b388aabd567c0a713
parent03e1970a87d83d0e6251e4760acc9ee08b249a44 (diff)
minor tweaks to gtkapplication quartz code and turn off keyboard event debugging
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6503 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/utils.cc6
-rw-r--r--libs/gtkmm2ext/gtkapplication_quartz.mm5
2 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 22b6cfa9d5..a6b3f4f16c 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -418,7 +418,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
bool special_handling_of_unmodified_accelerators = false;
bool allow_activating = true;
-#define DEBUG_ACCELERATOR_HANDLING
+#undef DEBUG_ACCELERATOR_HANDLING
#ifdef DEBUG_ACCELERATOR_HANDLING
//bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0);
bool debug=true;
@@ -501,7 +501,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (possibly_translate_keyval_to_make_legal_accelerator (fakekey)) {
#ifdef DEBUG_ACCELERATOR_HANDLING
if (debug) {
- cerr << "\tactivate without special handling of unmodified accels\n";
+ cerr << "\tactivate (was " << ev->keyval << " now " << fakekey << ") without special handling of unmodified accels\n";
}
#endif
if (allow_activating && gtk_accel_groups_activate(G_OBJECT(win), fakekey, GdkModifierType(ev->state))) {
@@ -533,7 +533,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
if (gtk_window_activate_key (win, ev)) {
#ifdef DEBUG_ACCELERATOR_HANDLING
if (debug) {
- cerr << "\tactivation handled key\n";
+ cerr << "\tactivation handled key " << ev->keyval << endl;
}
#endif
diff --git a/libs/gtkmm2ext/gtkapplication_quartz.mm b/libs/gtkmm2ext/gtkapplication_quartz.mm
index 127dee4193..cd7a2cdb3b 100644
--- a/libs/gtkmm2ext/gtkapplication_quartz.mm
+++ b/libs/gtkmm2ext/gtkapplication_quartz.mm
@@ -38,7 +38,7 @@
#include <gtkmm2ext/gtkapplication.h>
#include <gtkmm2ext/gtkapplication-private.h>
-#define DEBUG(format, ...) g_printerr ("%s: " format, G_STRFUNC, ## __VA_ARGS__)
+// #define DEBUG(format, ...) g_printerr ("%s: " format, G_STRFUNC, ## __VA_ARGS__)
#define DEBUG(format, ...)
/* TODO
@@ -1048,8 +1048,7 @@ add_menu_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
if (!GTK_WIDGET_IS_SENSITIVE (menu_item))
[cocoa_item setState:NSOffState];
-#if 0
-// requires OS X 10.5 or later
+#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
if (!GTK_WIDGET_VISIBLE (menu_item))
[cocoa_item setHidden:YES];
#endif