[Xfce4-commits] [apps/xfce4-screensaver] 98/425: mate-screensaver-dialog: Add GTK3 support and fix GLIB deprecations

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:49:05 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit c16f1bb1fa58041a1dd3282207aff3b5774371f0
Author: Stefano Karapetsas <stefano at karapetsas.com>
Date:   Tue Nov 12 16:51:47 2013 +0100

    mate-screensaver-dialog: Add GTK3 support and fix GLIB deprecations
---
 src/mate-screensaver-dialog.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mate-screensaver-dialog.c b/src/mate-screensaver-dialog.c
index 7a58e48..28e5ff8 100644
--- a/src/mate-screensaver-dialog.c
+++ b/src/mate-screensaver-dialog.c
@@ -34,6 +34,9 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gtk/gtkx.h>
+#endif
 
 #include "gs-lock-plug.h"
 
@@ -70,7 +73,11 @@ static char* get_id_string(GtkWidget* widget)
 	g_return_val_if_fail(widget != NULL, NULL);
 	g_return_val_if_fail(GTK_IS_WIDGET(widget), NULL);
 
+#if GTK_CHECK_VERSION (3, 0, 0)
+	id = g_strdup_printf("%" G_GUINT32_FORMAT, (guint32) GDK_WINDOW_XID(gtk_widget_get_window(widget)));
+#else
 	id = g_strdup_printf("%" G_GUINT32_FORMAT, (guint32) GDK_WINDOW_XID(widget->window));
+#endif
 	return id;
 }
 
@@ -553,12 +560,16 @@ int main(int argc, char** argv)
 		textdomain(GETTEXT_PACKAGE);
 	#endif
 
+#if !GLIB_CHECK_VERSION (2, 32, 0)
 	if (!g_thread_supported())
 	{
 		g_thread_init(NULL);
 	}
+#endif
 
+#if !GLIB_CHECK_VERSION (2, 36, 0)
 	g_type_init();
+#endif
 
 	gs_profile_start(NULL);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list