summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Grytsenko <andrej@rep.kiev.ua>2015-06-14 03:34:28 +0300
committerAndriy Grytsenko <andrej@rep.kiev.ua>2015-06-14 03:34:28 +0300
commit92733e0e95dcbff2c21e01eb38d6225db8c09878 (patch)
treeea7cb895794620256965a32268d25532b23e3fa4
parentef9f1eb4887b41be7099e05292d6f55e3af4fd4e (diff)
Replace forged HAVE_OPENBOX_3_5_2 with standard RR_CHECK_VERSION(3,5,2)
-rw-r--r--configure.ac7
-rw-r--r--src/preview.c10
-rw-r--r--src/preview_update.c3
3 files changed, 7 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index a60a853..6525cf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,13 +89,6 @@ PKG_CHECK_MODULES(OPENBOX, [obrender-3.5 >= 3.5 obt-3.5 >= 3.5])
AC_SUBST(OPENBOX_CFLAGS)
AC_SUBST(OPENBOX_LIBS)
-save_CFLAFS="$CFLAGS"
-CFLAGS="$CFLAGS $pkg_cv_OPENBOX_CFLAGS"
-AC_CHECK_MEMBER(RrTheme.btn_desk,
- AC_DEFINE(HAVE_OPENBOX_3_5_2,[],[Openbox version is 3.5.2]),,
- [#include <obrender/theme.h>])
-CFLAGS="$save_CFLAFS"
-
if test "x$enable_gtk3" = "xyes" ; then
CFLAGS="$CFLAGS -DENABLE_GTK3"
gtk_modules="gtk+-3.0 >= 3.0.0"
diff --git a/src/preview.c b/src/preview.c
index 8a5457b..9ae7a73 100644
--- a/src/preview.c
+++ b/src/preview.c
@@ -553,7 +553,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
switch (*layout) {
case 'D':
a = focus ?
-#ifdef HAVE_OPENBOX_3_5_2
+#if RR_CHECK_VERSION(3, 5, 2)
theme->btn_desk->a_focused_unpressed :
theme->btn_desk->a_unfocused_unpressed;
#else
@@ -563,7 +563,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
break;
case 'S':
a = focus ?
-#ifdef HAVE_OPENBOX_3_5_2
+#if RR_CHECK_VERSION(3, 5, 2)
theme->btn_shade->a_focused_unpressed :
theme->btn_shade->a_unfocused_unpressed;
#else
@@ -573,7 +573,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
break;
case 'I':
a = focus ?
-#ifdef HAVE_OPENBOX_3_5_2
+#if RR_CHECK_VERSION(3, 5, 2)
theme->btn_iconify->a_focused_unpressed :
theme->btn_iconify->a_unfocused_unpressed;
#else
@@ -583,7 +583,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
break;
case 'M':
a = focus ?
-#ifdef HAVE_OPENBOX_3_5_2
+#if RR_CHECK_VERSION(3, 5, 2)
theme->btn_max->a_focused_unpressed :
theme->btn_max->a_unfocused_unpressed;
#else
@@ -593,7 +593,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
break;
case 'C':
a = focus ?
-#ifdef HAVE_OPENBOX_3_5_2
+#if RR_CHECK_VERSION(3, 5, 2)
theme->btn_close->a_focused_unpressed :
theme->btn_close->a_unfocused_unpressed;
#else
diff --git a/src/preview_update.c b/src/preview_update.c
index 13963e7..9ecfe55 100644
--- a/src/preview_update.c
+++ b/src/preview_update.c
@@ -43,8 +43,8 @@ static RrFont *osd_inactive_font = NULL;
void preview_update_all()
{
+#if RR_CHECK_VERSION(3, 5, 0)
if (!list_store) return;
- if (!RR_CHECK_VERSION(3,5,0)) return;
if (!(title_layout && active_window_font && inactive_window_font &&
menu_title_font && menu_item_font &&
@@ -65,6 +65,7 @@ void preview_update_all()
gtk_image_set_from_pixbuf( GTK_IMAGE(preview), pix);
g_object_unref(pix);
}
+#endif
}
void preview_update_set_tree_view(GtkTreeView *tr, GtkListStore *ls)