Skip to content
Browse files

commander: Depend on GTK 2.16 only and check for that version

  • Loading branch information...
1 parent bc46d4a commit 11ec506bd772ef871a93dd6701c815d377846c7d @b4n b4n committed
Showing with 26 additions and 2 deletions.
  1. +2 −2 build/commander.m4
  2. +24 −0 commander/src/commander-plugin.c
View
4 build/commander.m4
@@ -3,8 +3,8 @@ AC_DEFUN([GP_CHECK_COMMANDER],
GP_ARG_DISABLE([Commander], [auto])
GP_CHECK_PLUGIN_DEPS([Commander], [COMMANDER],
- [gtk+-2.0 >= 2.0
- glib-2.0 >= 2.0])
+ [gtk+-2.0 >= 2.16
+ glib-2.0 >= 2.4])
GP_STATUS_PLUGIN_ADD([Commander], [$enable_commander])
View
24 commander/src/commander-plugin.c
@@ -43,6 +43,30 @@ PLUGIN_SET_TRANSLATABLE_INFO (
)
+/* GTK compatibility functions/macros */
+
+#if ! GTK_CHECK_VERSION (2, 18, 0)
+# define gtk_widget_get_visible(w) \
+ (GTK_WIDGET_VISIBLE (w))
+# define gtk_widget_set_can_focus(w) \
+ (GTK_WIDGET_SET_FLAGS ((w), GTK_CAN_FOCUS))
+#endif
+
+#if ! GTK_CHECK_VERSION (2, 21, 8)
+# define GDK_KEY_Down GDK_Down
+# define GDK_KEY_Escape GDK_Escape
+# define GDK_KEY_ISO_Enter GDK_ISO_Enter
+# define GDK_KEY_KP_Enter GDK_KP_Enter
+# define GDK_KEY_Page_Down GDK_Page_Down
+# define GDK_KEY_Page_Up GDK_Page_Up
+# define GDK_KEY_Return GDK_Return
+# define GDK_KEY_Tab GDK_Tab
+# define GDK_KEY_Up GDK_Up
+#endif
+
+
+/* Plugin */
+
enum {
KB_SHOW_PANEL,
KB_COUNT

0 comments on commit 11ec506

Please sign in to comment.
Something went wrong with that request. Please try again.