summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-10-09 20:32:25 +0200
committerGravatar waker <wakeroid@gmail.com>2011-10-09 20:32:25 +0200
commit829504302c867501c625c17b4a4b94d60a7c6cb0 (patch)
tree216ba88a5cc781030852c0615a9e892eec4d1d8f /plugins
parent00b1ac396170eca14269fa377bfb170adbc6755e (diff)
gdkkeysyms-compat.h fix
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/ddbcellrenderertextmultiline.c3
-rw-r--r--plugins/gtkui/ddblistview.c3
-rw-r--r--plugins/gtkui/search.c6
-rw-r--r--plugins/gtkui/support.h4
4 files changed, 9 insertions, 7 deletions
diff --git a/plugins/gtkui/ddbcellrenderertextmultiline.c b/plugins/gtkui/ddbcellrenderertextmultiline.c
index 1ecb9fc0..cd54e1cf 100644
--- a/plugins/gtkui/ddbcellrenderertextmultiline.c
+++ b/plugins/gtkui/ddbcellrenderertextmultiline.c
@@ -26,8 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkkeysyms-compat.h>
+#include "support.h"
#define DDB_TYPE_CELL_EDITABLE_TEXT_VIEW (ddb_cell_editable_text_view_get_type ())
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c
index 0d4cb15b..8f9986b2 100644
--- a/plugins/gtkui/ddblistview.c
+++ b/plugins/gtkui/ddblistview.c
@@ -20,8 +20,6 @@
#endif
#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkkeysyms-compat.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
@@ -33,6 +31,7 @@
#include "ddblistview.h"
#include "drawing.h"
#include "gtkui.h"
+#include "support.h"
#define min(x,y) ((x)<(y)?(x):(y))
#define max(x,y) ((x)>(y)?(x):(y))
diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c
index e3d46819..846140b5 100644
--- a/plugins/gtkui/search.c
+++ b/plugins/gtkui/search.c
@@ -150,10 +150,10 @@ on_searchwin_key_press_event (GtkWidget *widget,
gpointer user_data)
{
// that's for when user attempts to navigate list while entry has focus
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
gtk_widget_hide (widget);
}
- else if (event->keyval == GDK_Return) {
+ else if (event->keyval == GDK_KEY_Return) {
if (deadbeef->pl_getcount (PL_SEARCH) > 0) {
int row = deadbeef->pl_get_cursor (PL_SEARCH);
DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (max (row, 0), PL_SEARCH);
@@ -163,7 +163,7 @@ on_searchwin_key_press_event (GtkWidget *widget,
}
}
}
- else if (event->keyval != GDK_Delete && event->keyval != GDK_Home && event->keyval != GDK_End){
+ else if (event->keyval != GDK_KEY_Delete && event->keyval != GDK_KEY_Home && event->keyval != GDK_KEY_End){
GtkWidget *pl = lookup_widget (searchwin, "searchlist");
if (!ddb_listview_handle_keypress (DDB_LISTVIEW (pl), event->keyval, event->state)) {
return FALSE;
diff --git a/plugins/gtkui/support.h b/plugins/gtkui/support.h
index f5972602..06833adc 100644
--- a/plugins/gtkui/support.h
+++ b/plugins/gtkui/support.h
@@ -7,7 +7,11 @@
#endif
#include <gtk/gtk.h>
+#if GTK_CHECK_VERSION(3,0,0)
#include <gdk/gdkkeysyms-compat.h>
+#else
+#include <gdk/gdkkeysyms.h>
+#endif
/*
* Standard gettext macros.