diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-12 21:46:44 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-12 21:46:44 -0400 |
commit | 4e84bc3a39ca624d62be590c532a8bc33b33baa4 (patch) | |
tree | e81eda4a9f866590e1a4bb5891fba057c9b86ccc /gtk2_ardour/gtk_pianokeyboard.c | |
parent | b05968fb4e303ce47b6e09cd1bc713f3af28a6f9 (diff) |
changes to get cairocanvas branch to build on OS X, with its stupid nil and Rect macros, plus some const_cast<> and unused variable fixes that should really be in master but will have to wait till we rebase master
Diffstat (limited to 'gtk2_ardour/gtk_pianokeyboard.c')
-rw-r--r-- | gtk2_ardour/gtk_pianokeyboard.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c index 1e5768040e..5101bd8aff 100644 --- a/gtk2_ardour/gtk_pianokeyboard.c +++ b/gtk2_ardour/gtk_pianokeyboard.c @@ -244,7 +244,7 @@ bind_key(PianoKeyboard *pk, const char *key, int note) { assert(pk->key_bindings != NULL); - g_hash_table_insert(pk->key_bindings, (gpointer)key, (gpointer)((intptr_t)note)); + g_hash_table_insert(pk->key_bindings, key, (gpointer)((intptr_t)note)); } static void @@ -360,6 +360,8 @@ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer ignored) GdkKeymapKey kk; PianoKeyboard *pk = PIANO_KEYBOARD(mk); + (void) ignored; + /* We're not using event->keyval, because we need keyval with level set to 0. E.g. if user holds Shift and presses '7', we want to get a '7', not '&'. */ kk.keycode = event->hardware_keycode; @@ -440,6 +442,8 @@ mouse_button_event_handler(PianoKeyboard *pk, GdkEventButton *event, gpointer ig int note = get_note_for_xy(pk, x, y); + (void) ignored; + if (event->button != 1) return TRUE; @@ -477,6 +481,8 @@ mouse_motion_event_handler(PianoKeyboard *pk, GdkEventMotion *event, gpointer ig { int note; + (void) ignored; + if ((event->state & GDK_BUTTON1_MASK) == 0) return TRUE; @@ -529,6 +535,8 @@ piano_keyboard_expose(GtkWidget *widget, GdkEventExpose *event) static void piano_keyboard_size_request(GtkWidget* w, GtkRequisition *requisition) { + (void) w; + requisition->width = PIANO_KEYBOARD_DEFAULT_WIDTH; requisition->height = PIANO_KEYBOARD_DEFAULT_HEIGHT; } |