diff options
author | Andreas Müller <schnitzeltony@gmx.de> | 2011-10-24 19:26:57 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-25 07:02:07 +0200 |
commit | c60bf558fa16034f7b010dc3e5862a1d3eb6c6d4 (patch) | |
tree | b5ec73b4ceae5ca8119c4140e87e97e5441ddde5 /meta-xfce/recipes-panel-plugins | |
parent | b795bbb81cc536286ae97d2f11e73e349d1a38b3 (diff) | |
download | meta-openembedded-c60bf558fa16034f7b010dc3e5862a1d3eb6c6d4.tar.gz |
xfce4-datetime-plugin: Initial add git (0.6.1)
Version 0.6.1 was release about 3 years ago. The patch to migrate from
libxfcegui4->libxfce4ui hopefully shall be applied mainline [1]. It would have
caused extra efforts to base the patch on 0.6.1 release.
[1] https://bugzilla.xfce.org/show_bug.cgi?id=8064
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-xfce/recipes-panel-plugins')
-rw-r--r-- | meta-xfce/recipes-panel-plugins/datetime/files/port-to-libxfce4ui.patch | 360 | ||||
-rw-r--r-- | meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_git.bb | 20 |
2 files changed, 380 insertions, 0 deletions
diff --git a/meta-xfce/recipes-panel-plugins/datetime/files/port-to-libxfce4ui.patch b/meta-xfce/recipes-panel-plugins/datetime/files/port-to-libxfce4ui.patch new file mode 100644 index 000000000..aab20caab --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/datetime/files/port-to-libxfce4ui.patch | |||
@@ -0,0 +1,360 @@ | |||
1 | From 2041c011c62e13c5bc1f0824733bc34ebb8a8bfe Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmx.de> | ||
3 | Date: Sun, 23 Oct 2011 20:14:42 +0200 | ||
4 | Subject: [PATCH] port to libxfce4ui | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | |||
10 | Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> | ||
11 | --- | ||
12 | configure.ac.in | 9 +-- | ||
13 | panel-plugin/Makefile.am | 8 +- | ||
14 | panel-plugin/datetime-dialog.c | 8 +- | ||
15 | panel-plugin/datetime.c | 4 +- | ||
16 | panel-plugin/xfce46-compat.c | 193 ---------------------------------------- | ||
17 | panel-plugin/xfce46-compat.h | 20 ---- | ||
18 | 6 files changed, 11 insertions(+), 231 deletions(-) | ||
19 | delete mode 100644 panel-plugin/xfce46-compat.c | ||
20 | delete mode 100644 panel-plugin/xfce46-compat.h | ||
21 | |||
22 | diff --git a/configure.ac.in b/configure.ac.in | ||
23 | index 4d58211..5200268 100644 | ||
24 | --- a/configure.ac.in | ||
25 | +++ b/configure.ac.in | ||
26 | @@ -31,12 +31,9 @@ XDT_I18N([@LINGUAS@]) | ||
27 | |||
28 | dnl Check for required packages | ||
29 | XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0]) | ||
30 | -XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.99.2]) | ||
31 | -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.99.2]) | ||
32 | -XDT_CHECK_PACKAGE([LIBXFCE4PANEL],[libxfce4panel-1.0],[4.3.99.2]) | ||
33 | - | ||
34 | -dnl check for optional packages/versions | ||
35 | -XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4PANEL_46], [libxfce4panel-1.0], [4.5.92], [libxfce4panel46], [Take advantage of Xfce 4.6 panel changes]) | ||
36 | +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) | ||
37 | +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) | ||
38 | +XDT_CHECK_PACKAGE([LIBXFCE4PANEL],[libxfce4panel-1.0],[4.8.0]) | ||
39 | |||
40 | #CFLAGS="$CFLAGS -Wall -Werror" | ||
41 | |||
42 | diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am | ||
43 | index 4005f85..18bbc7e 100644 | ||
44 | --- a/panel-plugin/Makefile.am | ||
45 | +++ b/panel-plugin/Makefile.am | ||
46 | @@ -7,16 +7,14 @@ libdatetime_la_SOURCES = \ | ||
47 | datetime.h \ | ||
48 | datetime.c \ | ||
49 | datetime-dialog.h \ | ||
50 | - datetime-dialog.c \ | ||
51 | - xfce46-compat.h \ | ||
52 | - xfce46-compat.c | ||
53 | + datetime-dialog.c | ||
54 | |||
55 | libdatetime_la_CFLAGS = \ | ||
56 | -I$(top_srcdir) \ | ||
57 | -DLOCALEDIR=\"$(localedir)\" \ | ||
58 | $(GTK_CFLAGS) \ | ||
59 | $(LIBXFCE4PANEL_CFLAGS) \ | ||
60 | - $(LIBXFCEGUI4_CFLAGS) \ | ||
61 | + $(LIBXFCE4UI_CFLAGS) \ | ||
62 | $(LIBXFCE4UTIL_CFLAGS) | ||
63 | |||
64 | libdatetime_la_LDFLAGS = \ | ||
65 | @@ -31,7 +29,7 @@ endif | ||
66 | libdatetime_la_LIBADD = \ | ||
67 | $(GTK_LIBS) \ | ||
68 | $(LIBXFCE4PANEL_LIBS) \ | ||
69 | - $(LIBXFCEGUI4_LIBS) \ | ||
70 | + $(LIBXFCE4UI_LIBS) \ | ||
71 | $(LIBXFCE4UTIL_LIBS) | ||
72 | |||
73 | desktopdir = $(datadir)/xfce4/panel-plugins | ||
74 | diff --git a/panel-plugin/datetime-dialog.c b/panel-plugin/datetime-dialog.c | ||
75 | index 193587e..4ef3ab8 100644 | ||
76 | --- a/panel-plugin/datetime-dialog.c | ||
77 | +++ b/panel-plugin/datetime-dialog.c | ||
78 | @@ -28,7 +28,7 @@ | ||
79 | #include <string.h> | ||
80 | |||
81 | /* xfce includes */ | ||
82 | -#include <libxfcegui4/libxfcegui4.h> | ||
83 | +#include <libxfce4ui/libxfce4ui.h> | ||
84 | #include <libxfce4util/libxfce4util.h> | ||
85 | #include <libxfce4panel/xfce-panel-plugin.h> | ||
86 | |||
87 | @@ -388,7 +388,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime) | ||
88 | /* | ||
89 | * layout frame | ||
90 | */ | ||
91 | - frame = xfce_create_framebox(_("Layout"), &bin); | ||
92 | + frame = xfce_gtk_frame_box_new(_("Layout"), &bin); | ||
93 | gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame, | ||
94 | FALSE, FALSE, 0); | ||
95 | gtk_container_set_border_width(GTK_CONTAINER(frame), 6); | ||
96 | @@ -422,7 +422,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime) | ||
97 | /* | ||
98 | * Date frame | ||
99 | */ | ||
100 | - datetime->date_frame = xfce_create_framebox(_("Date"), &bin); | ||
101 | + datetime->date_frame = xfce_gtk_frame_box_new(_("Date"), &bin); | ||
102 | gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), datetime->date_frame, | ||
103 | FALSE, FALSE, 0); | ||
104 | gtk_container_set_border_width(GTK_CONTAINER(datetime->date_frame), 6); | ||
105 | @@ -525,7 +525,7 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime) | ||
106 | /* | ||
107 | * time frame | ||
108 | */ | ||
109 | - datetime->time_frame = xfce_create_framebox(_("Time"), &bin); | ||
110 | + datetime->time_frame = xfce_gtk_frame_box_new(_("Time"), &bin); | ||
111 | gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), datetime->time_frame, | ||
112 | FALSE, FALSE, 0); | ||
113 | gtk_container_set_border_width(GTK_CONTAINER(datetime->time_frame), 6); | ||
114 | diff --git a/panel-plugin/datetime.c b/panel-plugin/datetime.c | ||
115 | index 30ee04a..0738889 100644 | ||
116 | --- a/panel-plugin/datetime.c | ||
117 | +++ b/panel-plugin/datetime.c | ||
118 | @@ -28,13 +28,11 @@ | ||
119 | #include <string.h> | ||
120 | |||
121 | /* xfce includes */ | ||
122 | -#include <libxfcegui4/libxfcegui4.h> | ||
123 | +#include <libxfce4ui/libxfce4ui.h> | ||
124 | #include <libxfce4util/libxfce4util.h> | ||
125 | #include <libxfce4panel/xfce-panel-plugin.h> | ||
126 | #include <libxfce4panel/xfce-panel-convenience.h> | ||
127 | |||
128 | -#include "xfce46-compat.h" | ||
129 | - | ||
130 | #include "datetime.h" | ||
131 | #include "datetime-dialog.h" | ||
132 | |||
133 | diff --git a/panel-plugin/xfce46-compat.c b/panel-plugin/xfce46-compat.c | ||
134 | deleted file mode 100644 | ||
135 | index 97f10b1..0000000 | ||
136 | --- a/panel-plugin/xfce46-compat.c | ||
137 | +++ /dev/null | ||
138 | @@ -1,193 +0,0 @@ | ||
139 | -/* | ||
140 | - * Code was taken from libxfce4panel (LGPL2 or any later version), | ||
141 | - * distributed here under the GPL. | ||
142 | - * | ||
143 | - * Copyright (c) 2005-2007 Jasper Huijsmans <jasper@xfce.org> | ||
144 | - * | ||
145 | - * This program is free software; you can redistribute it and/or modify | ||
146 | - * it under the terms of the GNU General Public License as published by | ||
147 | - * the Free Software Foundation; either version 2 of the License, or | ||
148 | - * (at your option) any later version. | ||
149 | - * | ||
150 | - * This program is distributed in the hope that it will be useful, | ||
151 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
152 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
153 | - * GNU Library General Public License for more details. | ||
154 | - * | ||
155 | - * You should have received a copy of the GNU General Public License | ||
156 | - * along with this program; if not, write to the Free Software | ||
157 | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
158 | - */ | ||
159 | - | ||
160 | -#ifdef HAVE_CONFIG_H | ||
161 | -# include <config.h> | ||
162 | -#endif | ||
163 | - | ||
164 | -#ifndef HAVE_LIBXFCE4PANEL_46 | ||
165 | - | ||
166 | -#include "xfce46-compat.h" | ||
167 | - | ||
168 | -#include <libxfce4panel/xfce-panel-plugin.h> | ||
169 | -#include <libxfce4panel/xfce-panel-macros.h> | ||
170 | - | ||
171 | -/* support macros for debugging */ | ||
172 | -#ifndef NDEBUG | ||
173 | -#define _panel_assert(expr) g_assert (expr) | ||
174 | -#define _panel_assert_not_reached() g_assert_not_reached () | ||
175 | -#define _panel_return_if_fail(expr) g_return_if_fail (expr) | ||
176 | -#define _panel_return_val_if_fail(expr, val) g_return_val_if_fail (expr, (val)) | ||
177 | -#else | ||
178 | -#define _panel_assert(expr) G_STMT_START{ (void)0; }G_STMT_END | ||
179 | -#define _panel_assert_not_reached() G_STMT_START{ (void)0; }G_STMT_END | ||
180 | -#define _panel_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END | ||
181 | -#define _panel_return_val_if_fail(expr, val) G_STMT_START{ (void)0; }G_STMT_END | ||
182 | -#endif | ||
183 | - | ||
184 | -/** | ||
185 | - * xfce_panel_plugin_arrow_type: | ||
186 | - * @plugin : an #XfcePanelPlugin | ||
187 | - * | ||
188 | - * Determine the #GtkArrowType for a widget that opens a menu and uses | ||
189 | - * xfce_panel_plugin_position_menu() to position the menu. | ||
190 | - * | ||
191 | - * Returns: The #GtkArrowType to use. | ||
192 | - **/ | ||
193 | -GtkArrowType | ||
194 | -xfce_panel_plugin_arrow_type (XfcePanelPlugin *plugin) | ||
195 | -{ | ||
196 | - XfceScreenPosition position; | ||
197 | - GdkScreen *screen; | ||
198 | - GdkRectangle geom; | ||
199 | - gint mon, x, y; | ||
200 | - | ||
201 | - if (!GTK_WIDGET_REALIZED (plugin)) | ||
202 | - return GTK_ARROW_UP; | ||
203 | - | ||
204 | - position = xfce_panel_plugin_get_screen_position (plugin); | ||
205 | - switch (position) | ||
206 | - { | ||
207 | - /* top */ | ||
208 | - case XFCE_SCREEN_POSITION_NW_H: | ||
209 | - case XFCE_SCREEN_POSITION_N: | ||
210 | - case XFCE_SCREEN_POSITION_NE_H: | ||
211 | - return GTK_ARROW_DOWN; | ||
212 | - | ||
213 | - /* left */ | ||
214 | - case XFCE_SCREEN_POSITION_NW_V: | ||
215 | - case XFCE_SCREEN_POSITION_W: | ||
216 | - case XFCE_SCREEN_POSITION_SW_V: | ||
217 | - return GTK_ARROW_RIGHT; | ||
218 | - | ||
219 | - /* right */ | ||
220 | - case XFCE_SCREEN_POSITION_NE_V: | ||
221 | - case XFCE_SCREEN_POSITION_E: | ||
222 | - case XFCE_SCREEN_POSITION_SE_V: | ||
223 | - return GTK_ARROW_LEFT; | ||
224 | - | ||
225 | - /* bottom */ | ||
226 | - case XFCE_SCREEN_POSITION_SW_H: | ||
227 | - case XFCE_SCREEN_POSITION_S: | ||
228 | - case XFCE_SCREEN_POSITION_SE_H: | ||
229 | - return GTK_ARROW_UP; | ||
230 | - | ||
231 | - /* floating */ | ||
232 | - default: | ||
233 | - /* get the screen information */ | ||
234 | - screen = gtk_widget_get_screen (GTK_WIDGET (plugin)); | ||
235 | - mon = gdk_screen_get_monitor_at_window (screen, GTK_WIDGET (plugin)->window); | ||
236 | - gdk_screen_get_monitor_geometry (screen, mon, &geom); | ||
237 | - gdk_window_get_root_origin (GTK_WIDGET (plugin)->window, &x, &y); | ||
238 | - | ||
239 | - /* get the position based on the screen position */ | ||
240 | - if (position == XFCE_SCREEN_POSITION_FLOATING_H) | ||
241 | - return ((y < (geom.y + geom.height / 2)) ? GTK_ARROW_DOWN : GTK_ARROW_UP); | ||
242 | - else | ||
243 | - return ((x < (geom.x + geom.width / 2)) ? GTK_ARROW_RIGHT : GTK_ARROW_LEFT); | ||
244 | - } | ||
245 | -} | ||
246 | - | ||
247 | - | ||
248 | - | ||
249 | -/** | ||
250 | - * xfce_panel_plugin_position_widget: | ||
251 | - * @plugin : an #XfcePanelPlugin | ||
252 | - * @menu_widget : a #GtkWidget that will be used as popup menu | ||
253 | - * @attach_widget : a #GtkWidget relative to which the menu should be positioned | ||
254 | - * @x : return location for the x coordinate | ||
255 | - * @y : return location for the y coordinate | ||
256 | - * | ||
257 | - * The menu widget is positioned relative to @attach_widget. | ||
258 | - * If @attach_widget is NULL, the menu widget is instead positioned | ||
259 | - * relative to @panel_plugin. | ||
260 | - * | ||
261 | - * This function is intended for custom menu widgets. | ||
262 | - * For a regular #GtkMenu you should use xfce_panel_plugin_position_menu() | ||
263 | - * instead (as callback argument to gtk_menu_popup()). | ||
264 | - * | ||
265 | - * See also: xfce_panel_plugin_position_menu(). | ||
266 | - **/ | ||
267 | -void | ||
268 | -xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin, | ||
269 | - GtkWidget *menu_widget, | ||
270 | - GtkWidget *attach_widget, | ||
271 | - gint *x, | ||
272 | - gint *y) | ||
273 | -{ | ||
274 | - GtkRequisition req; | ||
275 | - GdkScreen *screen; | ||
276 | - GdkRectangle geom; | ||
277 | - gint mon; | ||
278 | - | ||
279 | - _panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin)); | ||
280 | - _panel_return_if_fail (GTK_IS_WIDGET (menu_widget)); | ||
281 | - _panel_return_if_fail (attach_widget == NULL || GTK_IS_WIDGET (attach_widget)); | ||
282 | - | ||
283 | - if (attach_widget == NULL) | ||
284 | - attach_widget = GTK_WIDGET (plugin); | ||
285 | - | ||
286 | - if (!GTK_WIDGET_REALIZED (menu_widget)) | ||
287 | - gtk_widget_realize (menu_widget); | ||
288 | - | ||
289 | - gtk_widget_size_request (menu_widget, &req); | ||
290 | - gdk_window_get_origin (attach_widget->window, x, y); | ||
291 | - | ||
292 | - switch (xfce_panel_plugin_arrow_type (plugin)) | ||
293 | - { | ||
294 | - case GTK_ARROW_UP: | ||
295 | - *y -= req.height; | ||
296 | - break; | ||
297 | - | ||
298 | - case GTK_ARROW_DOWN: | ||
299 | - *y += attach_widget->allocation.height; | ||
300 | - break; | ||
301 | - | ||
302 | - case GTK_ARROW_LEFT: | ||
303 | - *x -= req.width; | ||
304 | - break; | ||
305 | - | ||
306 | - default: /* GTK_ARROW_RIGHT and GTK_ARROW_NONE */ | ||
307 | - *x += attach_widget->allocation.width; | ||
308 | - break; | ||
309 | - } | ||
310 | - | ||
311 | - screen = gtk_widget_get_screen (attach_widget); | ||
312 | - mon = gdk_screen_get_monitor_at_window (screen, attach_widget->window); | ||
313 | - gdk_screen_get_monitor_geometry (screen, mon, &geom); | ||
314 | - | ||
315 | - /* keep inside the screen */ | ||
316 | - if (*x > geom.x + geom.width - req.width) | ||
317 | - *x = geom.x + geom.width - req.width; | ||
318 | - if (*x < geom.x) | ||
319 | - *x = geom.x; | ||
320 | - if (*y > geom.y + geom.height - req.height) | ||
321 | - *y = geom.y + geom.height - req.height; | ||
322 | - if (*y < geom.y) | ||
323 | - *y = geom.y; | ||
324 | - | ||
325 | - if (G_LIKELY (GTK_IS_MENU (menu_widget))) | ||
326 | - gtk_menu_set_screen (GTK_MENU (menu_widget), screen); | ||
327 | - else if (GTK_IS_WINDOW (menu_widget)) | ||
328 | - gtk_window_set_screen (GTK_WINDOW (menu_widget), screen); | ||
329 | -} | ||
330 | - | ||
331 | -#endif | ||
332 | diff --git a/panel-plugin/xfce46-compat.h b/panel-plugin/xfce46-compat.h | ||
333 | deleted file mode 100644 | ||
334 | index d385ec4..0000000 | ||
335 | --- a/panel-plugin/xfce46-compat.h | ||
336 | +++ /dev/null | ||
337 | @@ -1,20 +0,0 @@ | ||
338 | -#ifndef _XFCE46_COMPAT | ||
339 | -#define _XFCE46_COMPAT | ||
340 | - | ||
341 | -#ifdef HAVE_CONFIG_H | ||
342 | -# include <config.h> | ||
343 | -#endif | ||
344 | - | ||
345 | -#ifndef HAVE_LIBXFCE4PANEL_46 | ||
346 | - | ||
347 | -#include <gtk/gtk.h> | ||
348 | -#include <libxfce4panel/xfce-panel-plugin.h> | ||
349 | - | ||
350 | -void xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin, | ||
351 | - GtkWidget *menu_widget, | ||
352 | - GtkWidget *attach_widget, | ||
353 | - gint *x, | ||
354 | - gint *y); | ||
355 | - | ||
356 | -#endif | ||
357 | -#endif | ||
358 | -- | ||
359 | 1.7.4.4 | ||
360 | |||
diff --git a/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_git.bb b/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_git.bb new file mode 100644 index 000000000..18dec9469 --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_git.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "Panel plugin displaying date and time and a calendar when left-clicked" | ||
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
5 | |||
6 | inherit xfce-panel-plugin | ||
7 | |||
8 | SRCREV = "e268210db6a32b2a47c03c63e5908ee3ba9461cc" | ||
9 | PV = "0.6.1+gitr${SRCPV}" | ||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | SRC_URI = "git://git.xfce.org/panel-plugins/xfce4-datetime-plugin;protocol=git;branch=master \ | ||
13 | file://port-to-libxfce4ui.patch \ | ||
14 | " | ||
15 | SRC_URI[md5sum] = "e82f51ff0e75a63e5cbd139e43e094f9" | ||
16 | SRC_URI[sha256sum] = "fb340c1c2170d4f33c7f278772966f3c01caaedcd4a7f58f670bf8e28580bb1b" | ||
17 | |||
18 | do_configure_prepend() { | ||
19 | NOCONFIGURE=yes ./autogen.sh | ||
20 | } | ||