Commit 29b6e45c authored by Jeremie Knuesel's avatar Jeremie Knuesel

Bump GTK+ to 3.10

parent e487df05
...@@ -26,7 +26,7 @@ GLIB_MIN_VERSION = 2.50 ...@@ -26,7 +26,7 @@ GLIB_MIN_VERSION = 2.50
GLIB_PKG_CONFIG_NAME = glib-2.0 GLIB_PKG_CONFIG_NAME = glib-2.0
# GTK # GTK
GTK_VERSION_CHECK ?= 1 GTK_VERSION_CHECK ?= 1
GTK_MIN_VERSION = 3.6 GTK_MIN_VERSION = 3.10
GTK_PKG_CONFIG_NAME = gtk+-3.0 GTK_PKG_CONFIG_NAME = gtk+-3.0
# pkg-config binary # pkg-config binary
...@@ -49,12 +49,9 @@ WITH_MAGIC ?= 1 ...@@ -49,12 +49,9 @@ WITH_MAGIC ?= 1
# HiDPI # HiDPI
HIDPI_SUPPORT_CAIRO = $(shell (${PKG_CONFIG} --atleast-version=1.14 cairo && echo 1) || echo 0) HIDPI_SUPPORT_CAIRO = $(shell (${PKG_CONFIG} --atleast-version=1.14 cairo && echo 1) || echo 0)
HIDPI_SUPPORT_GTK = $(shell (${PKG_CONFIG} --atleast-version=3.10 ${GTK_PKG_CONFIG_NAME} && echo 1) || echo 0)
ifeq (${HIDPI_SUPPORT_CAIRO},1) ifeq (${HIDPI_SUPPORT_CAIRO},1)
ifeq (${HIDPI_SUPPORT_GTK},1)
CPPFLAGS += -DHAVE_HIDPI_SUPPORT CPPFLAGS += -DHAVE_HIDPI_SUPPORT
endif endif
endif
# paths # paths
PREFIX ?= /usr PREFIX ?= /usr
......
...@@ -224,11 +224,7 @@ cb_scale_factor(GObject* object, GParamSpec* UNUSED(pspec), gpointer data) ...@@ -224,11 +224,7 @@ cb_scale_factor(GObject* object, GParamSpec* UNUSED(pspec), gpointer data)
return; return;
} }
#ifdef HAVE_HIDPI_SUPPORT
int new_factor = gtk_widget_get_scale_factor(GTK_WIDGET(object)); int new_factor = gtk_widget_get_scale_factor(GTK_WIDGET(object));
#else
int new_factor = 1;
#endif
double current_x; double current_x;
double current_y; double current_y;
......
...@@ -153,10 +153,8 @@ init_ui(zathura_t* zathura) ...@@ -153,10 +153,8 @@ init_ui(zathura_t* zathura)
g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "refresh-view", g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "refresh-view",
G_CALLBACK(cb_refresh_view), zathura); G_CALLBACK(cb_refresh_view), zathura);
#ifdef HAVE_HIDPI_SUPPORT
g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view),
"notify::scale-factor", G_CALLBACK(cb_scale_factor), zathura); "notify::scale-factor", G_CALLBACK(cb_scale_factor), zathura);
#endif
/* page view */ /* page view */
zathura->ui.page_widget = gtk_grid_new(); zathura->ui.page_widget = gtk_grid_new();
......
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