Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/geeqie/files: geeqie-1.0-vflist-refresh.patch geeqie-1.0-filedata_compare.patch geeqie-1.0-fix_fullscreen.patch geeqie-1.0-copy_chown.patch geeqie-1.0-ui_pathsel.patch
Date: Thu, 07 Jun 2012 23:08:41
Message-Id: 20120607230829.EF7FF2004B@flycatcher.gentoo.org
1 voyageur 12/06/07 23:08:29
2
3 Added: geeqie-1.0-vflist-refresh.patch
4 geeqie-1.0-filedata_compare.patch
5 geeqie-1.0-fix_fullscreen.patch
6 geeqie-1.0-copy_chown.patch
7 geeqie-1.0-ui_pathsel.patch
8 Log:
9 Add some patches from Debian and Fedora (better full screen support, file listing, ...). Also remove double fix for install directory
10
11 (Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.1 media-gfx/geeqie/files/geeqie-1.0-vflist-refresh.patch
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-vflist-refresh.patch?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-vflist-refresh.patch?rev=1.1&content-type=text/plain
18
19 Index: geeqie-1.0-vflist-refresh.patch
20 ===================================================================
21 diff -Nur geeqie-1.0-orig/src/view_file_list.c geeqie-1.0/src/view_file_list.c
22 --- geeqie-1.0-orig/src/view_file_list.c 2010-02-17 22:21:19.000000000 +0100
23 +++ geeqie-1.0/src/view_file_list.c 2011-04-15 13:47:10.727936556 +0200
24 @@ -943,8 +943,6 @@
25 GList *work;
26 GtkTreeIter iter;
27 gboolean valid;
28 - gint num_ordered = 0;
29 - gint num_prepended = 0;
30
31 valid = gtk_tree_model_iter_children(GTK_TREE_MODEL(store), &iter, parent_iter);
32
33 @@ -993,17 +991,11 @@
34
35 if (valid)
36 {
37 - num_ordered++;
38 gtk_tree_store_insert_before(store, &new, parent_iter, &iter);
39 }
40 else
41 {
42 - /*
43 - here should be used gtk_tree_store_append, but this function seems to be O(n)
44 - and it seems to be much faster to add new entries to the beginning and reorder later
45 - */
46 - num_prepended++;
47 - gtk_tree_store_prepend(store, &new, parent_iter);
48 + gtk_tree_store_append(store, &new, parent_iter);
49 }
50
51 vflist_setup_iter(vf, store, &new, file_data_ref(fd));
52 @@ -1026,7 +1018,6 @@
53 }
54 else
55 {
56 - num_ordered++;
57 if (fd->version != old_version || force)
58 {
59 vflist_setup_iter(vf, store, &iter, fd);
60 @@ -1043,31 +1034,12 @@
61
62 while (valid)
63 {
64 - FileData *old_fd;
65 + FileData *old_fd = NULL;
66 gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &old_fd, -1);
67 file_data_unref(old_fd);
68
69 valid = gtk_tree_store_remove(store, &iter);
70 }
71 -
72 - /* move the prepended entries to the correct position */
73 - if (num_prepended)
74 - {
75 - gint i;
76 - gint num_total = num_prepended + num_ordered;
77 - gint *new_order = g_malloc(num_total * sizeof(gint));
78 -
79 - for (i = 0; i < num_total; i++)
80 - {
81 - if (i < num_ordered)
82 - new_order[i] = num_prepended + i;
83 - else
84 - new_order[i] = num_total - 1 - i;
85 - }
86 - gtk_tree_store_reorder(store, parent_iter, new_order);
87 -
88 - g_free(new_order);
89 - }
90 }
91
92 void vflist_sort_set(ViewFile *vf, SortType type, gboolean ascend)
93
94
95
96 1.1 media-gfx/geeqie/files/geeqie-1.0-filedata_compare.patch
97
98 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-filedata_compare.patch?rev=1.1&view=markup
99 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-filedata_compare.patch?rev=1.1&content-type=text/plain
100
101 Index: geeqie-1.0-filedata_compare.patch
102 ===================================================================
103 From 18d80ca385e38b3bf9bc4ef36264bb4d430aa1f6 Mon Sep 17 00:00:00 2001
104 From: Vladimir Nadvornik <nadvornik@××××.cz>
105 Date: Fri, 30 Sep 2011 23:57:31 +0200
106 Subject: [PATCH] fixed filelist_sort_compare_filedata to not return 0 no different files
107
108 ---
109 src/filedata.c | 15 ++++++++++++---
110 1 files changed, 12 insertions(+), 3 deletions(-)
111
112 diff --git a/src/filedata.c b/src/filedata.c
113 index f6e3896..78fd74e 100644
114 --- a/src/filedata.c
115 +++ b/src/filedata.c
116 @@ -852,6 +852,7 @@ static gboolean filelist_sort_ascend = TRUE;
117
118 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb)
119 {
120 + gint ret;
121 if (!filelist_sort_ascend)
122 {
123 FileData *tmp = fa;
124 @@ -875,7 +876,8 @@ gint filelist_sort_compare_filedata(FileData *fa, FileData *fb)
125 break;
126 #ifdef HAVE_STRVERSCMP
127 case SORT_NUMBER:
128 - return strverscmp(fa->name, fb->name);
129 + ret = strverscmp(fa->name, fb->name);
130 + if (ret != 0) return ret;
131 break;
132 #endif
133 default:
134 @@ -883,9 +885,16 @@ gint filelist_sort_compare_filedata(FileData *fa, FileData *fb)
135 }
136
137 if (options->file_sort.case_sensitive)
138 - return strcmp(fa->collate_key_name, fb->collate_key_name);
139 + ret = strcmp(fa->collate_key_name, fb->collate_key_name);
140 else
141 - return strcmp(fa->collate_key_name_nocase, fb->collate_key_name_nocase);
142 + ret = strcmp(fa->collate_key_name_nocase, fb->collate_key_name_nocase);
143 +
144 + if (ret != 0) return ret;
145 +
146 + /* do not return 0 unless the files are really the same
147 + file_data_pool ensures that original_path is unique
148 + */
149 + return strcmp(fa->original_path, fb->original_path);
150 }
151
152 gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType method, gboolean ascend)
153 --
154 1.6.1
155
156
157
158
159 1.1 media-gfx/geeqie/files/geeqie-1.0-fix_fullscreen.patch
160
161 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-fix_fullscreen.patch?rev=1.1&view=markup
162 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-fix_fullscreen.patch?rev=1.1&content-type=text/plain
163
164 Index: geeqie-1.0-fix_fullscreen.patch
165 ===================================================================
166 Description: Make fullscreen modes actually use the full screen.
167 The default fullscreen mode now leaves everything up to the window manager,
168 which usually produces the best result. Custom fullscreen modes now use
169 override-redirect to ensure docks and panels never obscure the image.
170 Author: Daniel van Vugt <vanvugt@×××××.com>
171 Bug: http://sourceforge.net/support/tracker.php?aid=2925034
172 Bug-Ubuntu: https://launchpad.net/bugs/788321
173 Forwarded: yes
174
175 === modified file 'src/fullscreen.c'
176 --- old/src/fullscreen.c 2010-02-26 10:41:38 +0000
177 +++ new/src/fullscreen.c 2011-08-16 03:55:04 +0000
178 @@ -218,75 +218,65 @@
179 void (*stop_func)(FullScreenData *, gpointer), gpointer stop_data)
180 {
181 FullScreenData *fs;
182 - GdkScreen *screen;
183 - gboolean same;
184 - gint x, y;
185 - gint w, h;
186 - GdkGeometry geometry;
187
188 if (!window || !imd) return NULL;
189
190 + DEBUG_1("full screen requests screen %d", options->fullscreen.screen);
191 +
192 fs = g_new0(FullScreenData, 1);
193 -
194 fs->cursor_state = FULLSCREEN_CURSOR_HIDDEN;
195 -
196 fs->normal_window = window;
197 fs->normal_imd = imd;
198 -
199 fs->stop_func = stop_func;
200 fs->stop_data = stop_data;
201 -
202 - DEBUG_1("full screen requests screen %d", options->fullscreen.screen);
203 - fullscreen_prefs_get_geometry(options->fullscreen.screen, window, &x, &y, &w, &h,
204 - &screen, &same);
205 -
206 - fs->window = window_new(GTK_WINDOW_TOPLEVEL, "fullscreen", NULL, NULL, _("Full screen"));
207 -
208 - /* this requests no decorations, if you still have them complain to the window manager author(s) */
209 - gtk_window_set_decorated(GTK_WINDOW(fs->window), FALSE);
210 + fs->window = window_new(GTK_WINDOW_TOPLEVEL, "fullscreen", NULL, NULL,
211 + _("Full screen"));
212
213 if (options->fullscreen.screen < 0)
214 - {
215 - /* If we want control of the window size and position this is not what we want.
216 - * Geeqie needs control of which monitor(s) to use for full screen.
217 - */
218 + { /* Fullscreen as determined by the window manager... */
219 gtk_window_fullscreen(GTK_WINDOW(fs->window));
220 }
221 - else if (options->fullscreen.above)
222 - {
223 - /* request to be above other windows */
224 - gtk_window_set_keep_above(GTK_WINDOW(fs->window), TRUE);
225 + else
226 + { /* Custom fullscreen modes. Done by hand, the hard way... */
227 + GdkScreen *screen;
228 + gint x, y, w, h;
229 + GdkGeometry geometry;
230 + GtkWindow *gtkwin = GTK_WINDOW(fs->window);
231 + GdkWindow *gdkwin;
232 +
233 + fullscreen_prefs_get_geometry(options->fullscreen.screen,
234 + window, &x, &y, &w, &h, &screen, NULL);
235 +
236 + if (options->fullscreen.above)
237 + gtk_window_set_keep_above(gtkwin, TRUE);
238 +
239 + gtk_window_set_screen(gtkwin, screen);
240 + gtk_window_set_decorated(gtkwin, FALSE);
241 + gtk_window_set_resizable(gtkwin, FALSE);
242 + gtk_container_set_border_width(GTK_CONTAINER(fs->window), 0);
243 +
244 + geometry.min_width = w;
245 + geometry.min_height = h;
246 + geometry.max_width = w;
247 + geometry.max_height = h;
248 + geometry.base_width = w;
249 + geometry.base_height = h;
250 + gtk_window_set_geometry_hints(gtkwin, fs->window, &geometry,
251 + GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE |
252 + GDK_HINT_BASE_SIZE);
253 +
254 + gtk_window_set_default_size(gtkwin, w, h);
255 + gtk_window_move(gtkwin, x, y);
256 +
257 + gtk_widget_realize(fs->window);
258 + gdkwin = gtk_widget_get_window(fs->window);
259 + if (gdkwin != NULL)
260 + gdk_window_set_override_redirect(gdkwin, TRUE);
261 }
262
263 - gtk_window_set_resizable(GTK_WINDOW(fs->window), FALSE);
264 -
265 - gtk_window_set_screen(GTK_WINDOW(fs->window), screen);
266 - gtk_container_set_border_width(GTK_CONTAINER(fs->window), 0);
267 g_signal_connect(G_OBJECT(fs->window), "delete_event",
268 G_CALLBACK(fullscreen_delete_cb), fs);
269
270 - geometry.min_width = w;
271 - geometry.min_height = h;
272 - geometry.max_width = w;
273 - geometry.max_height = h;
274 - geometry.base_width = w;
275 - geometry.base_height = h;
276 - geometry.win_gravity = GDK_GRAVITY_STATIC;
277 - /* By setting USER_POS and USER_SIZE, most window managers will
278 - * not request positioning of the full screen window (for example twm).
279 - *
280 - * In addition, setting gravity to STATIC will result in the
281 - * decorations of twm to not effect the requested window position,
282 - * the decorations will simply be off screen, except in multi monitor setups :-/
283 - */
284 - gtk_window_set_geometry_hints(GTK_WINDOW(fs->window), fs->window, &geometry,
285 - GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE |
286 - GDK_HINT_WIN_GRAVITY |
287 - GDK_HINT_USER_POS);
288 -
289 - gtk_window_set_default_size(GTK_WINDOW(fs->window), w, h);
290 - gtk_window_move(GTK_WINDOW(fs->window), x, y);
291 -
292 fs->imd = image_new(FALSE);
293
294 gtk_container_add(GTK_CONTAINER(fs->window), fs->imd->widget);
295 @@ -393,7 +383,11 @@
296 else
297 {
298 gdk_screen_get_monitor_geometry(screen, j, &rect);
299 - subname = g_strdup_printf("%s %d", _("Monitor"), j + 1);
300 + subname = gdk_screen_get_monitor_plug_name(screen, j);
301 + if (subname == NULL)
302 + {
303 + subname = g_strdup_printf("%s %d", _("Monitor"), j + 1);
304 + }
305 }
306
307 sd = g_new0(ScreenData, 1);
308
309
310
311
312 1.1 media-gfx/geeqie/files/geeqie-1.0-copy_chown.patch
313
314 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-copy_chown.patch?rev=1.1&view=markup
315 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-copy_chown.patch?rev=1.1&content-type=text/plain
316
317 Index: geeqie-1.0-copy_chown.patch
318 ===================================================================
319 From dc8933e3c0ae3e0021d13beb666d6729267c7624 Mon Sep 17 00:00:00 2001
320 From: Vladislav Naumov <vnaum@×××××.com>
321 Date: Thu, 16 Dec 2010 21:55:03 +0100
322 Subject: [PATCH] Fix bug 2999830: do not report failed chown() on copy.
323
324 Debian bug 574853 reported by Ian Zimmerman <itz@××××.org>
325
326 I was trying to copy images from my camera which is mounted as a USB
327 mass storage device. The files on the mount are owned by root, and
328 geeqie tries to chown (and chgrp) the copy, fails, and displays an
329 error message. This is only mildly annoying when copying a single
330 file, but when I want to copy multiple files the failure stops the
331 operation after the first file.
332
333 Patch by Vladislav Naumov <vnaum@×××××.com>
334
335 This patch ignores chown errors, while still doing chown
336 (so root still can copy files preserving ownership).
337
338 http://sourceforge.net/tracker/?func=detail&aid=2999830&group_id=222125&atid=1054680
339 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574853 (original report)
340 ---
341 src/ui_fileops.c | 10 ++++++++--
342 1 files changed, 8 insertions(+), 2 deletions(-)
343
344 diff --git a/src/ui_fileops.c b/src/ui_fileops.c
345 index aa3cc8d..33c6560 100644
346 --- a/src/ui_fileops.c
347 +++ b/src/ui_fileops.c
348 @@ -490,8 +490,14 @@ gboolean copy_file_attributes(const gchar *s, const gchar *t, gint perms, gint m
349
350 /* set the dest file attributes to that of source (ignoring errors) */
351
352 - if (perms && chown(tl, st.st_uid, st.st_gid) < 0) ret = FALSE;
353 - if (perms && chmod(tl, st.st_mode) < 0) ret = FALSE;
354 + if (perms)
355 + {
356 + ret = chown(tl, st.st_uid, st.st_gid);
357 + /* Ignores chown errors, while still doing chown
358 + (so root still can copy files preserving ownership) */
359 + ret = TRUE;
360 + if (chmod(tl, st.st_mode) < 0) ret = FALSE;
361 + }
362
363 tb.actime = st.st_atime;
364 tb.modtime = st.st_mtime;
365 --
366 1.6.1
367
368
369
370
371 1.1 media-gfx/geeqie/files/geeqie-1.0-ui_pathsel.patch
372
373 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-ui_pathsel.patch?rev=1.1&view=markup
374 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/geeqie/files/geeqie-1.0-ui_pathsel.patch?rev=1.1&content-type=text/plain
375
376 Index: geeqie-1.0-ui_pathsel.patch
377 ===================================================================
378 From 738ed337ffaa80276901451847fa83f865b1c439 Mon Sep 17 00:00:00 2001
379 From: Klaus Ethgen <Klaus@××××××.de>
380 Date: Sat, 9 Apr 2011 19:47:30 +0100
381 Subject: [PATCH] Do not delete path settings when adding new directory
382
383 This patch will change the way, geeqie is mangling the path name in the
384 rename (copy) dialog when creating new directory. Will fix the bugs
385 Debian:529531 and SF:2795791.
386 ---
387 src/ui_pathsel.c | 11 +++++++++--
388 1 files changed, 9 insertions(+), 2 deletions(-)
389
390 diff --git a/src/ui_pathsel.c b/src/ui_pathsel.c
391 index 6b69c05..d58c5ac 100644
392 --- a/src/ui_pathsel.c
393 +++ b/src/ui_pathsel.c
394 @@ -740,7 +740,10 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
395 tmp = gtk_entry_get_text(GTK_ENTRY(dd->entry));
396 if (!isname(tmp))
397 {
398 - path = g_strdup(tmp);
399 + buf = remove_trailing_slash(tmp);
400 + path = g_strdup(buf);
401 + g_free(buf);
402 + buf = remove_level_from_path(path);
403 from_text = TRUE;
404 }
405 else
406 @@ -765,7 +768,11 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
407 GtkListStore *store;
408 const gchar *text;
409
410 - if (from_text) gtk_entry_set_text(GTK_ENTRY(dd->entry), dd->path);
411 + if (from_text)
412 + {
413 + dest_populate(dd, buf);
414 + g_free(buf);
415 + }
416
417 store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(dd->d_view)));
418
419 --
420 1.6.1