Package: lxlauncher / 0.2.2-3

01-empty-icon.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Author: Julien Lavergne <julien.lavergne@gmail.com>
Description: Fix GtkAllocation to fix empty lxlauncher.

diff -Naurp lxlauncher.orig/src/exo-wrap-table.c lxlauncher/src/exo-wrap-table.c
--- lxlauncher.orig/src/exo-wrap-table.c	2012-04-20 12:15:48.599075583 +0200
+++ lxlauncher/src/exo-wrap-table.c	2012-04-20 12:24:31.642538381 +0200
@@ -326,14 +326,14 @@ exo_wrap_table_size_request (GtkWidget
   if (G_LIKELY (num_children > 0))
     {
 #if GTK_CHECK_VERSION(2,18,0)
-      GtkAllocation allocation;
-      gtk_widget_set_allocation(widget, &allocation);
-      num_cols = exo_wrap_table_get_num_fitting (allocation.width
+      GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+      gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
+      num_cols = exo_wrap_table_get_num_fitting (allocation->width
                                                  - gtk_container_get_border_width(GTK_CONTAINER (widget)) * 2,
                                                  table->priv->col_spacing, max_width);
 #else
       num_cols = exo_wrap_table_get_num_fitting (widget->allocation.width
-                                                 - gtk_container_get_border_width(GTK_CONTAINER (widget)) * 2,
+                                                 - GTK_CONTAINER (widget)->border_width * 2,
                                                  table->priv->col_spacing, max_width);
 #endif
       num_rows = num_children / num_cols;
@@ -345,7 +345,12 @@ exo_wrap_table_size_request (GtkWidget
       requisition->width = -1;
       requisition->height = (num_rows * max_height)
                          + (num_rows - 1) * table->priv->col_spacing
+#if GTK_CHECK_VERSION(2,18,0)
                          + gtk_container_get_border_width(GTK_CONTAINER (widget)) * 2;
+      g_free (allocation);
+#else
+                         + GTK_CONTAINER (widget)->border_width * 2;
+#endif
     }
   else
     {
@@ -479,8 +484,8 @@ exo_wrap_table_layout (ExoWrapTable *tab
   gint           max_height;
   gint           max_width;
 #if GTK_CHECK_VERSION(2,18,0)
-  GtkAllocation allocation;
-  gtk_widget_set_allocation(GTK_WIDGET(table), &allocation);
+  GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+  gtk_widget_get_allocation(GTK_WIDGET(table), allocation);
 #endif
 
   /* determine the number of visible children and the max size */
@@ -490,7 +495,7 @@ exo_wrap_table_layout (ExoWrapTable *tab
 
   /* determine the number of columns */
 #if GTK_CHECK_VERSION(2,18,0)
-  num_cols = exo_wrap_table_get_num_fitting (allocation.width
+  num_cols = exo_wrap_table_get_num_fitting (allocation->width
                                              - gtk_container_get_border_width(GTK_CONTAINER (table)) * 2,
                                              table->priv->col_spacing, max_width);
 #else
@@ -509,8 +514,8 @@ exo_wrap_table_layout (ExoWrapTable *tab
 
   /* determine the horizontal bounds */
 #if GTK_CHECK_VERSION(2,18,0)
-  x0 = allocation.x + gtk_container_get_border_width(GTK_CONTAINER (table));
-  x1 = x0 + allocation.width - gtk_container_get_border_width(GTK_CONTAINER (table));
+  x0 = allocation->x + gtk_container_get_border_width(GTK_CONTAINER (table));
+  x1 = x0 + allocation->width - gtk_container_get_border_width(GTK_CONTAINER (table));
 #else
   x0 = GTK_WIDGET (table)->allocation.x + GTK_CONTAINER (table)->border_width;
   x1 = x0 + GTK_WIDGET (table)->allocation.width - GTK_CONTAINER (table)->border_width;
@@ -519,7 +524,8 @@ exo_wrap_table_layout (ExoWrapTable *tab
   /* initialize the position */
   x = x0;
 #if GTK_CHECK_VERSION(2,18,0)
-  y = allocation.y + gtk_container_get_border_width(GTK_CONTAINER (table));
+  y = allocation->y + gtk_container_get_border_width(GTK_CONTAINER (table));
+  g_free (allocation);
 #else
   y = GTK_WIDGET (table)->allocation.y + GTK_CONTAINER (table)->border_width;
 #endif