Include <gtk/gtkx.h> header where GtkSocket is handled if compiled for GTK3.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 30 Nov 2014 21:31:46 +0000 (23:31 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 30 Nov 2014 21:38:11 +0000 (23:38 +0200)
plugins/pager.c
plugins/tray.c
src/icon-grid-old.c
src/plugin.c

index c5e9ed3..1bb473b 100644 (file)
@@ -64,7 +64,11 @@ static GtkWidget *pager_constructor(LXPanel *panel, config_setting_t *settings)
     int border = 1; /* NOTE: old 'pager' used 2, WnckPager has 1, need 1 more */
 
     /* FIXME: use some global setting for border */
+#if GTK_CHECK_VERSION(3, 0, 0)
+    w = wnck_pager_new();
+#else
     w = wnck_pager_new(NULL);
+#endif
     g_return_val_if_fail(w != NULL, 0);
     p = gtk_alignment_new(0, 0, 1.0, 1.0);
 
index 941ec37..47e148e 100644 (file)
 #include "misc.h"
 #include "icon-grid.h"
 
+#if GTK_CHECK_VERSION(3, 0, 0)
+#include <gtk/gtkx.h>
+#endif
+
 /* Standards reference:  http://standards.freedesktop.org/systemtray-spec/ */
 
 /* Protocol constants. */
index 2e3d7b4..7ca066f 100644 (file)
 #include "icon-grid-old.h"
 #include "private.h"
 
+#if GTK_CHECK_VERSION(3, 0, 0)
+#include <gtk/gtkx.h>
+#endif
+
 static gboolean icon_grid_placement(IconGrid * ig);
 static void icon_grid_geometry(IconGrid * ig, gboolean layout);
 static void icon_grid_element_size_request(GtkWidget * widget, GtkRequisition * requisition, IconGridElement * ige);
index 906dd94..d38a5d9 100644 (file)
 #include "dbg.h"
 #include "gtk-compat.h"
 
+#if GTK_CHECK_VERSION(3, 0, 0)
+#include <gtk/gtkx.h>
+#endif
+
 static void plugin_class_unref(PluginClass * pc);
 
 GQuark lxpanel_plugin_qinit;
@@ -196,7 +200,11 @@ void plugin_widget_set_background(GtkWidget * w, LXPanel * panel)
                 gtk_widget_set_app_paintable(w, FALSE);
                 if (gtk_widget_get_realized(w))
                 {
+#if GTK_CHECK_VERSION(3, 0, 0)
+                    gdk_window_set_background_pattern(gtk_widget_get_window(w), NULL);
+#else
                     gdk_window_set_back_pixmap(gtk_widget_get_window(w), NULL, TRUE);
+#endif
                     gtk_style_set_background(gtk_widget_get_style(w),
                                              gtk_widget_get_window(w),
                                              GTK_STATE_NORMAL);