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