diff options
author | Chris Lord <chris@openedhand.com> | 2006-02-15 02:16:11 +0000 |
---|---|---|
committer | Chris Lord <chris@openedhand.com> | 2006-02-15 02:16:11 +0000 |
commit | 2b7e731cff12abbf2ff22c2025ccefd365bb45a7 (patch) | |
tree | 14255a3a108625d7286b0f70fa53f6d5e2e6f2e7 /openembedded/packages/pcmanfm | |
parent | deb4dd0de43dda3840d99fcc47156658938d421f (diff) | |
download | poky-2b7e731cff12abbf2ff22c2025ccefd365bb45a7.tar.gz |
- Add gtkhtml2 SRCDATE to poky.conf
- Update to glib 2.8 in poky.conf
- Add back-ported pcmanfm (this seems to segfault on the device,
backtrace needed)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@278 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/pcmanfm')
-rw-r--r-- | openembedded/packages/pcmanfm/files/no-fam-gtk2.6.patch | 362 | ||||
-rw-r--r-- | openembedded/packages/pcmanfm/pcmanfm_0.1.9.8.bb | 12 |
2 files changed, 374 insertions, 0 deletions
diff --git a/openembedded/packages/pcmanfm/files/no-fam-gtk2.6.patch b/openembedded/packages/pcmanfm/files/no-fam-gtk2.6.patch new file mode 100644 index 0000000000..1a65faead0 --- /dev/null +++ b/openembedded/packages/pcmanfm/files/no-fam-gtk2.6.patch | |||
@@ -0,0 +1,362 @@ | |||
1 | diff -urNd pcmanfm-0.1.9.8.old/configure.in pcmanfm-0.1.9.8/configure.in | ||
2 | --- pcmanfm-0.1.9.8.old/configure.in 2006-02-08 17:13:05.000000000 +0000 | ||
3 | +++ pcmanfm-0.1.9.8/configure.in 2006-02-14 22:53:22.000000000 +0000 | ||
4 | @@ -10,8 +10,12 @@ | ||
5 | AM_PROG_CC_STDC | ||
6 | AC_HEADER_STDC | ||
7 | |||
8 | -pkg_modules="gtk+-2.0 >= 2.8.0 gthread-2.0" | ||
9 | -PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) | ||
10 | +PKG_CHECK_MODULES(PACKAGE, [glib-2.0 >= 2.8.0 gtk+-2.0 >= 2.6.0 gthread-2.0], [ | ||
11 | + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.8.0], have_gtk28=yes, have_gtk28=no) | ||
12 | +]) | ||
13 | +if test x"$have_gtk28" = x"yes"; then | ||
14 | + AC_DEFINE([HAVE_GTK_2_8],,[Define if you have gtk+-2.0 >= 2.8.0]) | ||
15 | +fi | ||
16 | AC_SUBST(PACKAGE_CFLAGS) | ||
17 | AC_SUBST(PACKAGE_LIBS) | ||
18 | |||
19 | @@ -38,8 +42,8 @@ | ||
20 | LIBS="$LIBS $FAM_LIBS" | ||
21 | AC_CHECK_FUNCS([FAMNoExists]) | ||
22 | LIBS="$save_LIBS" | ||
23 | -else | ||
24 | - AC_MSG_ERROR([Fatal Error: no fam or gamin detected.]) | ||
25 | +#else | ||
26 | +# AC_MSG_ERROR([Fatal Error: no fam or gamin detected.]) | ||
27 | fi | ||
28 | |||
29 | AC_SUBST([FAM_CFLAGS]) | ||
30 | diff -urNd pcmanfm-0.1.9.8.old/src/foldercontent.c pcmanfm-0.1.9.8/src/foldercontent.c | ||
31 | --- pcmanfm-0.1.9.8.old/src/foldercontent.c 2006-02-08 18:36:52.000000000 +0000 | ||
32 | +++ pcmanfm-0.1.9.8/src/foldercontent.c 2006-02-15 02:15:10.000000000 +0000 | ||
33 | @@ -31,9 +31,11 @@ | ||
34 | }FolderContentCallback; | ||
35 | |||
36 | static GHashTable* folder_hash = NULL; | ||
37 | +#ifdef HAVE_FAM_H | ||
38 | static FAMConnection fam; | ||
39 | static GIOChannel* fam_io_channel = NULL; | ||
40 | static guint fam_io_watch = 0; | ||
41 | +#endif | ||
42 | |||
43 | typedef enum{ | ||
44 | FCM_FOLDER_VIEW = 1 << 0, | ||
45 | @@ -58,6 +60,9 @@ | ||
46 | static FolderContent* folder_content_get( const char* path, | ||
47 | FolderContentMode mode, | ||
48 | GtkTreeRowReference* tree_parent, | ||
49 | +#ifndef HAVE_GTK_2_8 | ||
50 | + GtkTreeModel* tree_model, | ||
51 | +#endif | ||
52 | FolderContentUpdateFunc cb, | ||
53 | gpointer user_data ); | ||
54 | |||
55 | @@ -72,6 +77,7 @@ | ||
56 | |||
57 | static gboolean connect_to_fam() | ||
58 | { | ||
59 | +#ifdef HAVE_FAM_H | ||
60 | if( FAMOpen( &fam ) ) | ||
61 | { | ||
62 | fam_io_channel = NULL; | ||
63 | @@ -100,10 +106,14 @@ | ||
64 | /* | ||
65 | g_print("Connected to FAM server\n"); | ||
66 | */ | ||
67 | +#else | ||
68 | + return FALSE; | ||
69 | +#endif | ||
70 | } | ||
71 | |||
72 | static void disconnect_from_fam() | ||
73 | { | ||
74 | +#ifdef HAVE_FAM_H | ||
75 | if( fam_io_channel ) | ||
76 | { | ||
77 | g_io_channel_unref(fam_io_channel); | ||
78 | @@ -115,6 +125,7 @@ | ||
79 | g_print("Disonnected from FAM server\n"); | ||
80 | */ | ||
81 | } | ||
82 | +#endif | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | @@ -336,7 +347,11 @@ | ||
87 | if( ! tree_node ) | ||
88 | return; | ||
89 | |||
90 | +#ifdef HAVE_GTK_2_8 | ||
91 | tree = gtk_tree_row_reference_get_model (tree_node); | ||
92 | +#else | ||
93 | + tree = folder_content->tree_model; | ||
94 | +#endif | ||
95 | tree_path = gtk_tree_row_reference_get_path (tree_node); | ||
96 | if( !tree || !tree_path ){ | ||
97 | return; | ||
98 | @@ -428,6 +443,9 @@ | ||
99 | FolderContent* folder_content_get( const char* path, | ||
100 | FolderContentMode mode, | ||
101 | GtkTreeRowReference* tree_node, | ||
102 | +#ifndef HAVE_GTK_2_8 | ||
103 | + GtkTreeModel* tree_model, | ||
104 | +#endif | ||
105 | FolderContentUpdateFunc callback, | ||
106 | gpointer user_data ) | ||
107 | { | ||
108 | @@ -467,6 +485,9 @@ | ||
109 | */ | ||
110 | if( ! folder_content->tree_node ) | ||
111 | { | ||
112 | +#ifndef HAVE_GTK_2_8 | ||
113 | + folder_content->tree_model = tree_model; | ||
114 | +#endif | ||
115 | folder_content->tree_node = tree_node; | ||
116 | dir_tree_sub_folders_new( folder_content ); | ||
117 | } | ||
118 | @@ -475,10 +496,12 @@ | ||
119 | |||
120 | /* First new instance */ | ||
121 | if( add_new ){ | ||
122 | +#ifdef HAVE_FAM_H | ||
123 | FAMMonitorDirectory( &fam, | ||
124 | path, | ||
125 | &folder_content->request, | ||
126 | folder_content ); | ||
127 | +#endif | ||
128 | } | ||
129 | |||
130 | if( callback ) /* Install a callback */ | ||
131 | @@ -548,7 +571,9 @@ | ||
132 | && 0 >= folder_content->n_ref_tree ) | ||
133 | { | ||
134 | /* g_print("cancel monitor!\n"); */ | ||
135 | +#ifdef HAVE_FAM_H | ||
136 | FAMCancelMonitor( &fam, &folder_content->request ); | ||
137 | +#endif | ||
138 | g_hash_table_remove( folder_hash, folder_content->path ); | ||
139 | g_free( folder_content->path ); | ||
140 | g_array_free( folder_content->callbacks, TRUE ); | ||
141 | @@ -561,6 +586,7 @@ | ||
142 | GIOCondition cond, | ||
143 | gpointer user_data ) | ||
144 | { | ||
145 | +#ifdef HAVE_FAM_H | ||
146 | FAMEvent evt; | ||
147 | FolderContent* content = NULL; | ||
148 | GdkPixbuf *folder_icon = get_folder_icon32(); | ||
149 | @@ -613,21 +639,36 @@ | ||
150 | } | ||
151 | } | ||
152 | return TRUE; | ||
153 | +#else | ||
154 | + return FALSE; | ||
155 | +#endif | ||
156 | } | ||
157 | |||
158 | FolderContent* folder_content_list_get( const char* path, | ||
159 | FolderContentUpdateFunc cb, | ||
160 | gpointer user_data ) | ||
161 | { | ||
162 | +#ifdef HAVE_GTK_2_8 | ||
163 | return folder_content_get( path, FCM_FOLDER_VIEW, NULL, cb, user_data ); | ||
164 | +#else | ||
165 | + return folder_content_get( path, FCM_FOLDER_VIEW, NULL, NULL, cb, user_data ); | ||
166 | +#endif | ||
167 | } | ||
168 | |||
169 | FolderContent* folder_content_tree_get( const char* path, | ||
170 | GtkTreeRowReference* tree_parent, | ||
171 | +#ifndef HAVE_GTK_2_8 | ||
172 | + GtkTreeModel* tree_model, | ||
173 | +#endif | ||
174 | FolderContentUpdateFunc cb, | ||
175 | gpointer user_data ) | ||
176 | { | ||
177 | +#ifdef HAVE_GTK_2_8 | ||
178 | return folder_content_get( path, FCM_DIR_TREE, tree_parent, cb, user_data ); | ||
179 | +#else | ||
180 | + return folder_content_get( path, FCM_DIR_TREE, tree_parent, tree_model, cb, | ||
181 | + user_data ); | ||
182 | +#endif | ||
183 | } | ||
184 | |||
185 | void folder_content_list_unref( FolderContent* folder_content, | ||
186 | @@ -688,7 +729,11 @@ | ||
187 | } | ||
188 | |||
189 | if( content->tree_node ) { | ||
190 | +#ifdef HAVE_GTK_2_8 | ||
191 | model = gtk_tree_row_reference_get_model( content->tree_node ); | ||
192 | +#else | ||
193 | + model = content->tree_model; | ||
194 | +#endif | ||
195 | tree_path = gtk_tree_row_reference_get_path( | ||
196 | content->tree_node ); | ||
197 | gtk_tree_model_get_iter( model, &parent_it, tree_path ); | ||
198 | @@ -724,7 +769,11 @@ | ||
199 | } | ||
200 | |||
201 | if( content->tree_node ) { | ||
202 | +#ifdef HAVE_GTK_2_8 | ||
203 | model = gtk_tree_row_reference_get_model( content->tree_node ); | ||
204 | +#else | ||
205 | + model = content->tree_model; | ||
206 | +#endif | ||
207 | tree_path = gtk_tree_row_reference_get_path( | ||
208 | content->tree_node ); | ||
209 | gtk_tree_model_get_iter( model, &parent_it, tree_path ); | ||
210 | diff -urNd pcmanfm-0.1.9.8.old/src/foldercontent.h pcmanfm-0.1.9.8/src/foldercontent.h | ||
211 | --- pcmanfm-0.1.9.8.old/src/foldercontent.h 2006-02-07 10:26:03.000000000 +0000 | ||
212 | +++ pcmanfm-0.1.9.8/src/foldercontent.h 2006-02-15 02:13:40.000000000 +0000 | ||
213 | @@ -15,7 +15,12 @@ | ||
214 | |||
215 | #include <gtk/gtk.h> | ||
216 | #include <glib.h> | ||
217 | +#ifdef HAVE_CONFIG_H | ||
218 | +#include "config.h" | ||
219 | +#endif | ||
220 | +#ifdef HAVE_FAM_H | ||
221 | #include <fam.h> | ||
222 | +#endif | ||
223 | |||
224 | /* Columns of folderView */ | ||
225 | enum{ | ||
226 | @@ -42,10 +47,20 @@ | ||
227 | typedef struct{ | ||
228 | GtkListStore* list; /* for Folder View */ | ||
229 | int n_ref_list; /* reference counting */ | ||
230 | +#ifndef HAVE_GTK_2_8 | ||
231 | + GtkTreeModel* tree_model; | ||
232 | +#endif | ||
233 | GtkTreeRowReference* tree_node; /* for Dir Tree */ | ||
234 | int n_ref_tree; | ||
235 | |||
236 | +#ifdef HAVE_FAM_H | ||
237 | FAMRequest request; | ||
238 | +#else | ||
239 | + /* A structure the same size as FAMRequest */ | ||
240 | + struct unused { | ||
241 | + int unused; | ||
242 | + }; | ||
243 | +#endif | ||
244 | gchar* path; | ||
245 | int n_files; | ||
246 | |||
247 | @@ -82,6 +97,9 @@ | ||
248 | |||
249 | FolderContent* folder_content_tree_get( const char* path, | ||
250 | GtkTreeRowReference* tree_node, | ||
251 | +#ifndef HAVE_GTK_2_8 | ||
252 | + GtkTreeModel* tree_model, | ||
253 | +#endif | ||
254 | FolderContentUpdateFunc callback, | ||
255 | gpointer user_data ); | ||
256 | |||
257 | diff -urNd pcmanfm-0.1.9.8.old/src/ptk/ptkfilebrowser.c pcmanfm-0.1.9.8/src/ptk/ptkfilebrowser.c | ||
258 | --- pcmanfm-0.1.9.8.old/src/ptk/ptkfilebrowser.c 2006-02-09 04:29:32.000000000 +0000 | ||
259 | +++ pcmanfm-0.1.9.8/src/ptk/ptkfilebrowser.c 2006-02-15 02:07:16.000000000 +0000 | ||
260 | @@ -31,6 +31,9 @@ | ||
261 | #include "ptkutils.h" | ||
262 | |||
263 | #include "settings.h" | ||
264 | +#ifdef HAVE_CONFIG_H | ||
265 | +#include "config.h" | ||
266 | +#endif | ||
267 | |||
268 | |||
269 | /* If set to FALSE, all selection changes in folder_view are prevented. */ | ||
270 | @@ -1127,7 +1130,11 @@ | ||
271 | } | ||
272 | |||
273 | row_ref = gtk_tree_row_reference_new( store, real_path ); | ||
274 | +#ifdef HAVE_GTK_2_8 | ||
275 | content = folder_content_tree_get( dir_path, row_ref, NULL, NULL ); | ||
276 | +#else | ||
277 | + content = folder_content_tree_get( dir_path, row_ref, model, NULL, NULL ); | ||
278 | +#endif | ||
279 | |||
280 | gtk_tree_model_get_iter( model, &it, tree_path ); | ||
281 | if( gtk_tree_model_iter_children( model, &child, &it ) ) { | ||
282 | @@ -1231,12 +1238,15 @@ | ||
283 | model = ptk_icon_view_get_model( PTK_ICON_VIEW(folder_view) ); | ||
284 | } | ||
285 | else if( file_browser->view_mode == FBVM_LIST_VIEW ) { | ||
286 | +#ifdef HAVE_GTK_2_8 | ||
287 | if( !gtk_tree_view_get_visible_range ( GTK_TREE_VIEW(folder_view), | ||
288 | &start_path, &end_path ) ) | ||
289 | return; | ||
290 | +#endif | ||
291 | model = gtk_tree_view_get_model( GTK_TREE_VIEW(folder_view) ); | ||
292 | } | ||
293 | |||
294 | +#ifdef HAVE_GTK_2_8 | ||
295 | /* | ||
296 | NOTE:It seems that this is a bug of gtk+ 2.8. | ||
297 | gtk_tree_view_get_visible_range sometimes returns invalid paths. | ||
298 | @@ -1252,6 +1262,7 @@ | ||
299 | gtk_tree_path_free( end_path ); | ||
300 | return; | ||
301 | } | ||
302 | +#endif | ||
303 | |||
304 | model_sorter = PTK_TREE_MODEL_SORT( gtk_tree_model_filter_get_model( | ||
305 | GTK_TREE_MODEL_FILTER(model) ) ); | ||
306 | diff -urNd pcmanfm-0.1.9.8.old/src/ptk/ptkfileiconrenderer.c pcmanfm-0.1.9.8/src/ptk/ptkfileiconrenderer.c | ||
307 | --- pcmanfm-0.1.9.8.old/src/ptk/ptkfileiconrenderer.c 2006-02-03 04:24:09.000000000 +0000 | ||
308 | +++ pcmanfm-0.1.9.8/src/ptk/ptkfileiconrenderer.c 2006-02-15 02:09:00.000000000 +0000 | ||
309 | @@ -346,7 +346,9 @@ | ||
310 | GdkPixbuf *colorized = NULL; | ||
311 | GdkRectangle pix_rect; | ||
312 | GdkRectangle draw_rect; | ||
313 | +#ifdef HAVE_GTK_2_8 | ||
314 | cairo_t *cr; | ||
315 | +#endif | ||
316 | |||
317 | GtkCellRendererClass* parent_renderer_class; | ||
318 | |||
319 | @@ -432,16 +434,23 @@ | ||
320 | pixbuf = colorized; | ||
321 | } | ||
322 | } | ||
323 | +#ifdef HAVE_GTK_2_8 | ||
324 | cr = gdk_cairo_create (window); | ||
325 | |||
326 | gdk_cairo_set_source_pixbuf (cr, pixbuf, pix_rect.x, pix_rect.y); | ||
327 | gdk_cairo_rectangle (cr, &draw_rect); | ||
328 | cairo_fill (cr); | ||
329 | +#else | ||
330 | + gdk_draw_pixbuf (GDK_DRAWABLE (window), NULL, pixbuf, 0, 0, | ||
331 | + pix_rect.x, pix_rect.y, pix_rect.width, pix_rect.height, | ||
332 | + GDK_RGB_DITHER_NORMAL, 0, 0); | ||
333 | +#endif | ||
334 | |||
335 | if( PTK_FILE_ICON_RENDERER(cell)->file_stat ) | ||
336 | { | ||
337 | if( S_ISLNK(PTK_FILE_ICON_RENDERER(cell)->file_stat->st_mode) ) | ||
338 | { | ||
339 | +#ifdef HAVE_GTK_2_8 | ||
340 | gdk_cairo_set_source_pixbuf (cr, link_icon_large, | ||
341 | pix_rect.x - 2, | ||
342 | pix_rect.y - 2 ); | ||
343 | @@ -449,10 +458,18 @@ | ||
344 | draw_rect.y -= 2; | ||
345 | gdk_cairo_rectangle (cr, &draw_rect); | ||
346 | cairo_fill (cr); | ||
347 | +#else | ||
348 | + gdk_draw_pixbuf (GDK_DRAWABLE (window), NULL, link_icon_large, 0, 0, | ||
349 | + pix_rect.x - 2, pix_rect.y - 2, | ||
350 | + -1, -1, GDK_RGB_DITHER_NORMAL, | ||
351 | + 0, 0); | ||
352 | +#endif | ||
353 | } | ||
354 | } | ||
355 | - | ||
356 | + | ||
357 | +#ifdef HAVE_GTK_2_8 | ||
358 | cairo_destroy (cr); | ||
359 | +#endif | ||
360 | |||
361 | if (invisible) | ||
362 | g_object_unref (invisible); | ||
diff --git a/openembedded/packages/pcmanfm/pcmanfm_0.1.9.8.bb b/openembedded/packages/pcmanfm/pcmanfm_0.1.9.8.bb new file mode 100644 index 0000000000..7a1092bfeb --- /dev/null +++ b/openembedded/packages/pcmanfm/pcmanfm_0.1.9.8.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | LICENSE = "GPL" | ||
2 | DESCRIPTION = "procfs tools" | ||
3 | SECTION = "x11" | ||
4 | PRIORITY = "optional" | ||
5 | MAINTAINER = "Chris Lord <chris@openedhand.com>" | ||
6 | DEPENDS = "gtk+" | ||
7 | |||
8 | SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.gz \ | ||
9 | file://no-fam-gtk2.6.patch;patch=1;pnum=1" | ||
10 | |||
11 | inherit autotools pkgconfig | ||
12 | |||