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
This commit is contained in:
Paul Davis 2010-01-16 00:04:12 +00:00
parent 03e1970a87
commit d475fd0fca
2 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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