From e487df053d7891d057dd04f85f047ce20d3c9d52 Mon Sep 17 00:00:00 2001 From: Jeremie Knuesel Date: Tue, 23 Jan 2018 19:57:16 +0100 Subject: [PATCH] HiDPI: use original notify callback signature --- zathura/callbacks.c | 7 ++++--- zathura/callbacks.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/zathura/callbacks.c b/zathura/callbacks.c index b257b17..b89a4a7 100644 --- a/zathura/callbacks.c +++ b/zathura/callbacks.c @@ -217,14 +217,15 @@ cb_refresh_view(GtkWidget* GIRARA_UNUSED(view), gpointer data) } void -cb_scale_factor(GtkWidget* widget, GParamSpec* UNUSED(pspec), zathura_t* zathura) +cb_scale_factor(GObject* object, GParamSpec* UNUSED(pspec), gpointer data) { - if (widget == NULL || zathura == NULL || zathura->document == NULL) { + zathura_t* zathura = data; + if (zathura == NULL || zathura->document == NULL) { return; } #ifdef HAVE_HIDPI_SUPPORT - int new_factor = gtk_widget_get_scale_factor(widget); + int new_factor = gtk_widget_get_scale_factor(GTK_WIDGET(object)); #else int new_factor = 1; #endif diff --git a/zathura/callbacks.h b/zathura/callbacks.h index 2be79b0..95ee0fe 100644 --- a/zathura/callbacks.h +++ b/zathura/callbacks.h @@ -85,11 +85,11 @@ void cb_refresh_view(GtkWidget* view, gpointer data); * * It records the new value and triggers a re-rendering of the document. * - * @param widget The view widget + * @param object The view widget * @param pspec The GParamSpec for the scale-factor property - * @param zathura The zathura instance + * @param gpointer The zathura instance */ -void cb_scale_factor(GtkWidget* widget, GParamSpec *pspec, zathura_t* zathura); +void cb_scale_factor(GObject* object, GParamSpec* pspec, gpointer data); /** * This function gets called when the value of the "pages-per-row"