Commit 1a47c49b authored by Sebastian Ramacher's avatar Sebastian Ramacher

Require Gtk+ 3.16

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 243fbcca
......@@ -10,7 +10,7 @@ enhance the user interface that is used by zathura and jumanji.
Requirements
------------
glib (>= 2.50)
gtk3 (>= 3.4)
gtk3 (>= 3.16)
intltool
libnotify (optional, for notification support)
jscon-c (optional, for configuration dumping support)
......
......@@ -49,7 +49,7 @@ BINDIR ?= bin
# GTK+
GTK_VERSION_CHECK ?= 1
GTK_MIN_VERSION = 3.4
GTK_MIN_VERSION = 3.16
GTK_PKG_CONFIG_NAME = gtk+-3.0
# glib
GLIB_VERSION_CHECK ?= 1
......
......@@ -280,40 +280,17 @@ scrolled_window_set_scrollbar_visibility(GtkScrolledWindow* window,
bool show_horizontal,
bool show_vertical)
{
#if GTK_CHECK_VERSION(3, 16, 0)
if (gtk_check_version(3, 16, 0) == NULL) {
GtkPolicyType hpolicy = GTK_POLICY_AUTOMATIC;
GtkPolicyType vpolicy = GTK_POLICY_AUTOMATIC;
GtkPolicyType hpolicy = GTK_POLICY_AUTOMATIC;
GtkPolicyType vpolicy = GTK_POLICY_AUTOMATIC;
if (show_horizontal == false) {
hpolicy = GTK_POLICY_EXTERNAL;
}
if (show_vertical == false) {
vpolicy = GTK_POLICY_EXTERNAL;
}
gtk_scrolled_window_set_policy(window, hpolicy, vpolicy);
return;
if (show_horizontal == false) {
hpolicy = GTK_POLICY_EXTERNAL;
}
#endif
GtkWidget* vscrollbar = gtk_scrolled_window_get_vscrollbar(window);
GtkWidget* hscrollbar = gtk_scrolled_window_get_hscrollbar(window);
if (vscrollbar != NULL) {
if (show_vertical == true) {
gtk_widget_unset_state_flags(vscrollbar, GTK_STATE_FLAG_INSENSITIVE);
} else {
gtk_widget_set_state_flags(vscrollbar, GTK_STATE_FLAG_INSENSITIVE, false);
}
}
if (hscrollbar != NULL) {
if (show_horizontal == true) {
gtk_widget_unset_state_flags(hscrollbar, GTK_STATE_FLAG_INSENSITIVE);
} else {
gtk_widget_set_state_flags(hscrollbar, GTK_STATE_FLAG_INSENSITIVE, false);
}
if (show_vertical == false) {
vpolicy = GTK_POLICY_EXTERNAL;
}
gtk_scrolled_window_set_policy(window, hpolicy, vpolicy);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment