aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-10 20:52:55 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-10 21:07:17 -0300
commite5b3b17a4ab9529e228dafe7fd2f674460977d8d (patch)
tree01d01916954d48768cffa27d79025d6566e0c6e6
parent2564fa6b573774176c8fab78e937b1015d3f8b8b (diff)
zbargtk: cleanup the last two deprecated warnings0.22.90
The two deprecated warnings that were seeking for a fix were: 1) disable double-buffered mode. This should improve performance, but it is otherwise useless. So, we can live without that. 2) set the custom widget with a background. From other similar code, it seems that this is required only up to Gtk 3.18, so we can simply get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--gtk/zbargtk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/zbargtk.c b/gtk/zbargtk.c
index 70df9b4..e1fc864 100644
--- a/gtk/zbargtk.c
+++ b/gtk/zbargtk.c
@@ -343,9 +343,13 @@ static void zbar_gtk_realize (GtkWidget *widget)
return;
ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private);
- gtk_widget_set_double_buffered(widget, FALSE);
gtk_widget_set_realized(widget, TRUE);
+#if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 14
+ // FIXME: this is deprecated after 3.14 - no idea what replaces it
+#else
+ gtk_widget_set_double_buffered(widget, FALSE);
+#endif
GdkWindowAttr attributes;
GtkAllocation allocation;
@@ -364,9 +368,9 @@ static void zbar_gtk_realize (GtkWidget *widget)
GDK_WA_X | GDK_WA_Y);
gtk_widget_set_window(widget, window);
gdk_window_set_user_data(window, widget);
-#if GTK_MAJOR_VERSION >= 3
+#if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 18
gdk_window_set_background_pattern(window, NULL);
-#else
+#elif GTK_MAJOR_VERSION < 3
gdk_window_set_back_pixmap(window, NULL, TRUE);
#endif

Privacy Policy