Fix icon grid compilation with GTK+ < 2.20.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 21 Sep 2014 21:22:07 +0000 (00:22 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 21 Sep 2014 21:24:17 +0000 (00:24 +0300)
ChangeLog
src/icon-grid.c

index 9568c78..3b524ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@
 * Fixed incomplete resources deallocation in 'volumealsa' plugin.
 * Fixed make uninstall (it left plugins installed).
 * Fixed monitor number set from GUI.
+* Fixed hang on netstatus icon in auto-hidden panel.
+* Fixed icon grid compilation with GTK+ < 2.20.
 
 0.7.0
 -------------------------------------------------------------------------
index 589513f..4d4d780 100644 (file)
@@ -76,7 +76,11 @@ static void panel_icon_grid_size_allocate(GtkWidget *widget,
     /* Apply given allocation */
     gtk_widget_set_allocation(widget, allocation);
     border = gtk_container_get_border_width(GTK_CONTAINER(widget));
+#if GTK_CHECK_VERSION(2, 20, 0)
     if (gtk_widget_get_realized(widget))
+#else
+    if (GTK_WIDGET_REALIZED(widget))
+#endif
     {
         if (!gtk_widget_get_has_window(widget))
         {
@@ -479,7 +483,11 @@ static void panel_icon_grid_realize(GtkWidget *widget)
     gint attributes_mask;
     gboolean visible_window;
 
+#if GTK_CHECK_VERSION(2, 20, 0)
     gtk_widget_set_realized(widget, TRUE);
+#else
+    GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+#endif
 
     gtk_widget_get_allocation(widget, &allocation);
     attributes.x = allocation.x + border;