From 92882b86653d874778cd02cda72e9ed3b9df7f20 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Wed, 28 Aug 2013 19:13:46 +0200 Subject: ifdef the hotkey code on osx instead of just commenting it out --- plugins/gtkui/callbacks.c | 6 ++++-- plugins/gtkui/gtkui.c | 8 ++++++-- plugins/gtkui/hotkeys.c | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 031aeb7d..55c3e598 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -27,7 +27,9 @@ #include #include #include -//#include +#ifndef __APPLE__ +#include +#endif #include "../../gettext.h" #include "callbacks.h" @@ -183,7 +185,7 @@ on_mainwin_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { -#if 0 +#ifndef __APPLE__ // local hotkeys // first translate gdk modifiers into X11 constants int mods = 0; diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index ead2e28b..13ec7e68 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -51,7 +51,9 @@ #include "gtkui_api.h" #include "wingeom.h" #include "widgets.h" -//#include "X11/Xlib.h" +#ifndef __APPLE__ +#include "X11/Xlib.h" +#endif #undef EGG_SM_CLIENT_BACKEND_XSMP #ifdef EGG_SM_CLIENT_BACKEND_XSMP #include "smclient/eggsmclient.h" @@ -940,7 +942,9 @@ gtkui_thread (void *ctx) { #ifdef __linux__ prctl (PR_SET_NAME, "deadbeef-gtkui", 0, 0, 0, 0); #endif - //XInitThreads (); // gtkglext/xcb doesn't work without this +#ifndef __APPLE__ + XInitThreads (); // gtkglext/xcb doesn't work without this +#endif // let's start some gtk g_thread_init (NULL); add_pixmap_directory (deadbeef->get_pixmap_dir ()); diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c index 7b3d1664..4b7ac034 100644 --- a/plugins/gtkui/hotkeys.c +++ b/plugins/gtkui/hotkeys.c @@ -57,7 +57,9 @@ typedef struct #include "interface.h" #include "../libparser/parser.h" #include "../hotkeys/hotkeys.h" -//#include // only for the KeySym type +#ifndef __APPLE__ +#include // only for the KeySym type +#endif #include "hotkeys.h" #ifndef strdupa @@ -616,7 +618,11 @@ typedef struct { #define KEY(kname, kcode) { .name=kname, .keysym=kcode }, static const xkey_t keys[] = { -// #include "../hotkeys/keysyms.inc" +#ifndef __APPLE__ + #include "../hotkeys/keysyms.inc" +#else + { .name=NULL, .keysym=0 } +#endif }; static const char * -- cgit v1.2.3