summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-24 18:05:10 +0200
committerraveit65 <[email protected]>2016-06-29 16:23:03 +0200
commite56595993b63ffa15b31aec92afbdac295b12b05 (patch)
treeb0e1af7b45656902ff1f56df80692ebb536203af /libview
parent3431a6b0a94275cdc0a23496848931ff4bb7aca6 (diff)
downloadatril-e56595993b63ffa15b31aec92afbdac295b12b05.tar.bz2
atril-e56595993b63ffa15b31aec92afbdac295b12b05.tar.xz
GTK+-3 ev-view-presentation: Fix a unused-but-set-variable compile warning
taken from: https://git.gnome.org/browse/evince/commit/?id=0981802
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view-presentation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 08694cc1..90a7a0d0 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -1038,8 +1038,10 @@ ev_view_presentation_draw_end_page (EvViewPresentation *pview, cairo_t *cr)
PangoLayout *layout;
PangoFontDescription *font_desc;
gchar *markup;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkAllocation allocation;
GdkRectangle area = {0};
+#endif
const gchar *text = _("End of presentation. Click to exit.");
if (pview->state != EV_PRESENTATION_END)
@@ -1054,9 +1056,11 @@ ev_view_presentation_draw_end_page (EvViewPresentation *pview, cairo_t *cr)
pango_font_description_set_size (font_desc, 16 * PANGO_SCALE);
pango_layout_set_font_description (layout, font_desc);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_allocation (widget, &allocation);
area.width = allocation.width;
area.height = allocation.height;
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_render_layout (gtk_widget_get_style_context (widget),