~matttbe/ubuntu/quantal/lxpanel/lp1013171

« back to all changes in this revision

Viewing changes to debian/patches/fix_position.patch

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2012-02-13 23:40:40 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120213234040-w24ouhodotl76yav
Tags: 0.5.8+git20120212-0ubuntu1
* New upstream snapshot
 - Run dialog opens up in the background (LP: #889414)
 - Abiliy to configure task Bar Font (LP: #690662)
 - Volume applet uses wrong icon (LP: #878117)
 - Add ability for lxpanel sound applet to launch a GUI for sound management
   (LP: #692276)
 - lxpanel indicator support can't be configured (LP: #692260)
 - Task Bar (Window List) - Options on 64bit version are different than 32bit
   version (LP: #909127)
* debian/patches
 - indicator-support.patch: Remove, merged upstream.
 - fix_indicator_dir.patch: Remove, merged upstream.
 - fix_position.patch: Remove, merged upstream.
 - missing_glades.patch: Remove, fixed upstream.
 - default-config.patch: Refresh.
 - configure_desktop_number.patch: Refresh.
 - 99_refresh_autotools.patch: Refresh.
* debian/control:
 - Build-depends on libwnck-dev.
* debian/lxpanel.install:
 - Add new plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: lxpanel-0.5.8/src/plugins/menu.c
2
 
===================================================================
3
 
--- lxpanel-0.5.8.orig/src/plugins/menu.c       2011-10-05 23:55:47.000000000 +0200
4
 
+++ lxpanel-0.5.8/src/plugins/menu.c    2011-10-05 23:55:49.000000000 +0200
5
 
@@ -131,8 +131,8 @@
6
 
     int ox, oy, w, h;
7
 
     Plugin *p;
8
 
 #if GTK_CHECK_VERSION(2,18,0)
9
 
-    GtkAllocation allocation;
10
 
-    gtk_widget_set_allocation(widget, &allocation);
11
 
+    GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
12
 
+    gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
13
 
 #endif
14
 
     ENTER;
15
 
     p = g_object_get_data(G_OBJECT(widget), "plugin");
16
 
@@ -155,20 +155,20 @@
17
 
         *x = ox;
18
 
         if (*x + w > gdk_screen_width())
19
 
 #if GTK_CHECK_VERSION(2,18,0)
20
 
-            *x = ox + allocation.width - w;
21
 
+            *x = ox + allocation->width - w;
22
 
 #else
23
 
             *x = ox + widget->allocation.width - w;
24
 
 #endif
25
 
         *y = oy - h;
26
 
         if (*y < 0)
27
 
 #if GTK_CHECK_VERSION(2,18,0)
28
 
-            *y = oy + allocation.height;
29
 
+            *y = oy + allocation->height;
30
 
 #else
31
 
             *y = oy + widget->allocation.height;
32
 
 #endif
33
 
     } else {
34
 
 #if GTK_CHECK_VERSION(2,18,0)
35
 
-        *x = ox + allocation.width;
36
 
+        *x = ox + allocation->width;
37
 
 #else
38
 
         *x = ox + widget->allocation.width;
39
 
 #endif
40
 
@@ -177,19 +177,22 @@
41
 
         *y = oy;
42
 
         if (*y + h >  gdk_screen_height())
43
 
 #if GTK_CHECK_VERSION(2,18,0)
44
 
-            *y = oy + allocation.height - h;
45
 
+            *y = oy + allocation->height - h;
46
 
 #else
47
 
             *y = oy + widget->allocation.height - h;
48
 
 #endif
49
 
     }
50
 
     DBG("widget: x,y=%d,%d  w,h=%d,%d\n", ox, oy,
51
 
 #if GTK_CHECK_VERSION(2,18,0)
52
 
-          allocation.width, allocation.height );
53
 
+          allocation->width, allocation->height );
54
 
 #else
55
 
           widget->allocation.width, widget->allocation.height );
56
 
 #endif
57
 
     DBG("w-h %d %d\n", w, h);
58
 
     *push_in = TRUE;
59
 
+#if GTK_CHECK_VERSION(2,18,0)
60
 
+    g_free (allocation);
61
 
+#endif
62
 
     RET();
63
 
 }
64
 
 
65
 
@@ -634,8 +637,8 @@
66
 
 {
67
 
     ENTER;
68
 
 #if GTK_CHECK_VERSION(2,18,0)
69
 
-    GtkAllocation allocation;
70
 
-    gtk_widget_get_allocation(widget, &allocation);
71
 
+    GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
72
 
+    gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
73
 
 #endif
74
 
 
75
 
     /* Standard right-click handling. */
76
 
@@ -644,14 +647,17 @@
77
 
 
78
 
     if ((event->type == GDK_BUTTON_PRESS)
79
 
 #if GTK_CHECK_VERSION(2,18,0)
80
 
-          && (event->x >=0 && event->x < allocation.width)
81
 
-          && (event->y >=0 && event->y < allocation.height)) {
82
 
+          && (event->x >=0 && event->x < allocation->width)
83
 
+          && (event->y >=0 && event->y < allocation->height)) {
84
 
 #else
85
 
           && (event->x >=0 && event->x < widget->allocation.width)
86
 
           && (event->y >=0 && event->y < widget->allocation.height)) {
87
 
 #endif
88
 
         show_menu( widget, plugin, event->button, event->time );
89
 
     }
90
 
+#if GTK_CHECK_VERSION(2,18,0)
91
 
+    g_free (allocation);
92
 
+#endif
93
 
     RET(TRUE);
94
 
 }
95
 
 
96
 
Index: lxpanel-0.5.8/src/plugins/pager.c
97
 
===================================================================
98
 
--- lxpanel-0.5.8.orig/src/plugins/pager.c      2011-10-05 23:55:47.000000000 +0200
99
 
+++ lxpanel-0.5.8/src/plugins/pager.c   2011-10-05 23:56:29.000000000 +0200
100
 
@@ -271,10 +271,10 @@
101
 
 {
102
 
     /* Allocate pixmap and statistics buffer without border pixels. */
103
 
 #if GTK_CHECK_VERSION(2,18,0)
104
 
-    GtkAllocation allocation;
105
 
-    gtk_widget_get_allocation(widget, &allocation);
106
 
-    int new_pixmap_width = allocation.width;
107
 
-    int new_pixmap_height = allocation.height;
108
 
+    GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
109
 
+    gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
110
 
+    int new_pixmap_width = allocation->width;
111
 
+    int new_pixmap_height = allocation->height;
112
 
 #else
113
 
     int new_pixmap_width = widget->allocation.width;
114
 
     int new_pixmap_height = widget->allocation.height;
115
 
@@ -292,8 +292,8 @@
116
 
 
117
 
         /* Compute the horizontal and vertical scale factors, and mark the desktop for redraw. */
118
 
 #if GTK_CHECK_VERSION(2,18,0)
119
 
-        d->scale_y = (gfloat) allocation.height / (gfloat) gdk_screen_height();
120
 
-        d->scale_x = (gfloat) allocation.width  / (gfloat) gdk_screen_width();
121
 
+        d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height();
122
 
+        d->scale_x = (gfloat) allocation->width  / (gfloat) gdk_screen_width();
123
 
 #else
124
 
         d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height();
125
 
         d->scale_x = (gfloat) allocation->width  / (gfloat) gdk_screen_width();
126
 
@@ -305,6 +305,9 @@
127
 
     gtk_widget_set_size_request(widget,
128
 
         (d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2) * d->pg->aspect_ratio,
129
 
         d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2);
130
 
+#if GTK_CHECK_VERSION(2,18,0)
131
 
+    g_free (allocation);
132
 
+#endif
133
 
     return FALSE;
134
 
 }
135
 
 
136
 
@@ -326,8 +329,8 @@
137
 
             {
138
 
                 GtkWidget * widget = GTK_WIDGET(d->da);
139
 
 #if GTK_CHECK_VERSION(2,18,0)
140
 
-                GtkAllocation allocation;
141
 
-                gtk_widget_get_allocation(widget, &allocation);
142
 
+                GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
143
 
+                gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
144
 
 #endif
145
 
                 gdk_draw_rectangle(
146
 
                     d->pixmap,
147
 
@@ -336,7 +339,8 @@
148
 
                         : style->dark_gc[GTK_STATE_NORMAL]),
149
 
                     TRUE,
150
 
 #if GTK_CHECK_VERSION(2,18,0)
151
 
-                    0, 0, allocation.width, allocation.height);
152
 
+                    0, 0, allocation->width, allocation->height);
153
 
+                    g_free (allocation);
154
 
 #else
155
 
                     0, 0, widget->allocation.width, widget->allocation.height);
156
 
 #endif