Hello community, here is the log from the commit of package libfm for openSUSE:Factory checked in at 2016-01-12 16:12:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libfm (Old) and /work/SRC/openSUSE:Factory/.libfm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libfm" Changes: -------- --- /work/SRC/openSUSE:Factory/libfm/libfm.changes 2014-11-11 10:00:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libfm.new/libfm.changes 2016-01-12 16:13:03.000000000 +0100 @@ -1,0 +2,66 @@ +Sat Oct 31 20:23:22 UTC 2015 - trcs@gmx.com + +- Added many fixes from Git: + * [SF#902] Handle NULL returned by fm_mime_type_from_native_file() + correctly + + libfm-1.2.3-Fix-SF902.patch + + libfm-Additional-fix-after-SF902.patch + * [SF#922] Fix handling %c in desktop entry Exec key + + libfm-1.2.3-Fix-SF922.patch + * [SF#914] Fix missing folder info update on folder attributes + + libfm-1.2.3-Fix-SF914.patch + * Use G_SPAWN_DO_NOT_REAP_CHILD on application launch, that should + fix a problem with pkexec + + libfm-1.2.3-Use-G_SPAWN_DO_NOT_REAP_CHILD-on-applicaton-launch.patch + * [SF#946] Add missing newline at end of generated shortcut + + libfm-1.2.3-Fix-SF946.patch + * [SF#925,938] Improve file type detection, it fails in some cases + such as DOCX + + libfm-1.2.3-Fix-SF925-and-SF938.patch + * Return back the workaround on thumbnailers which don't save + Thumb::MTime + + libfm-1.2.3-Return-back-the-workaround-on-thumbnailers.patch + * [SF#937] Fix wrong treating files like ".purple" as having + extension "purple" + + libfm-1.2.3-Fix-SF937.patch + * [SF#935] Fix invalid desktop entry save if 'Cancel' was pressed + in dialog + + libfm-1.2.3-Fix-SF935.patch + * [SF#915] Always do gtk_drag_finish() in FmDndDest even if drop + was failed + + libfm-1.2.3-Fix-SF915.patch + * FmDndDest: reset cached data if drag context was changed + + libfm-1.2.3-Reset-cached-data-if-drag-context-was-changed.patch + * Fix uninitialized data in drag-motion callback of FmPlacesView + + libfm-1.2.3-Fix-uninitialized-data-in-drag-motion-callback.patch + * [SF#953] Fix crash in expand_exec_macros() on missing Exec line + in desktop entry + + libfm-1.2.3-Fix-SF953.patch + * [SF#921] Rewrite broken rubberband rendering in icon view for + GTK3 + + libfm-1.2.3-Fix-SF921.patch + * [SF#932] Fix renaming of desktop entries on copy operation error + + libfm-1.2.3-Fix-SF932.patch + * Fix dropping files onto applications shortcuts on the desktop + + libfm-1.2.3-Fix-dropping-files-onto-applications.patch + * Fix desktop file name for urxvt in terminals.list + + libfm-1.2.3-Fix-desktop-file-name-for-urxvt.patch + * [SF#954] Add urxvtc data into the terminals.list file + + libfm-1.2.3-Fix-SF954.patch + * [SF#950] Fix adding user-defined MIME associations into + mimeapps.list config + + libfm-1.2.3-Fix-SF950.patch + * [SF#959] Fix autoscroll issues with GTK+ 3 + + libfm-1.2.3-Fix-SF959.patch + * [SF#965] Fix stuck tooltip on entering empty folder + + libfm-1.2.3-Fix-SF965.patch + * Fix crash on cancelling FmDirListJob while retrieving is in + progress + + libfm-1.2.3-Fix-crash-on-cancelling-FmDirListJob.patch + * [SF#919] Fix incomplete cleanup on folder reloading + + libfm-1.2.3-Fix-SF919.patch + * [SF#967] Fix timer shown in progress dialog, it should show + 01:00, not 00:60 + + libfm-1.2.3-Fix-SF967.patch + +------------------------------------------------------------------- New: ---- libfm-1.2.3-Fix-SF902.patch libfm-1.2.3-Fix-SF914.patch libfm-1.2.3-Fix-SF915.patch libfm-1.2.3-Fix-SF919.patch libfm-1.2.3-Fix-SF921.patch libfm-1.2.3-Fix-SF922.patch libfm-1.2.3-Fix-SF925-and-SF938.patch libfm-1.2.3-Fix-SF932.patch libfm-1.2.3-Fix-SF935.patch libfm-1.2.3-Fix-SF937.patch libfm-1.2.3-Fix-SF946.patch libfm-1.2.3-Fix-SF950.patch libfm-1.2.3-Fix-SF953.patch libfm-1.2.3-Fix-SF954.patch libfm-1.2.3-Fix-SF959.patch libfm-1.2.3-Fix-SF965.patch libfm-1.2.3-Fix-SF967.patch libfm-1.2.3-Fix-crash-on-cancelling-FmDirListJob.patch libfm-1.2.3-Fix-desktop-file-name-for-urxvt.patch libfm-1.2.3-Fix-dropping-files-onto-applications.patch libfm-1.2.3-Fix-uninitialized-data-in-drag-motion-callback.patch libfm-1.2.3-Reset-cached-data-if-drag-context-was-changed.patch libfm-1.2.3-Return-back-the-workaround-on-thumbnailers.patch libfm-1.2.3-Use-G_SPAWN_DO_NOT_REAP_CHILD-on-applicaton-launch.patch libfm-Additional-fix-after-SF902.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libfm.spec ++++++ --- /var/tmp/diff_new_pack.aBSLEQ/_old 2016-01-12 16:13:04.000000000 +0100 +++ /var/tmp/diff_new_pack.aBSLEQ/_new 2016-01-12 16:13:04.000000000 +0100 @@ -26,6 +26,55 @@ Source: %{name}-%{version}.tar.xz Source1: %{name}-rpmlintrc Patch0: libfm-default-config.patch +# [SF#902] Handle NULL returned by fm_mime_type_from_native_file() correctly +Patch1: libfm-1.2.3-Fix-SF902.patch +Patch2: libfm-Additional-fix-after-SF902.patch +# [SF#922] Fix handling %c in desktop entry Exec key +Patch3: libfm-1.2.3-Fix-SF922.patch +# [SF#914] Fix missing folder info update on folder attributes +Patch4: libfm-1.2.3-Fix-SF914.patch +# [PATCH] Use G_SPAWN_DO_NOT_REAP_CHILD on application launch, that should fix a problem with pkexec +Patch5: libfm-1.2.3-Use-G_SPAWN_DO_NOT_REAP_CHILD-on-applicaton-launch.patch +# [SF#946] Add missing newline at end of generated shortcut +Patch6: libfm-1.2.3-Fix-SF946.patch +# [SF#925,938] Improve file type detection, it fails in some cases such as DOCX +Patch7: libfm-1.2.3-Fix-SF925-and-SF938.patch +# Return back the workaround on thumbnailers which don't save Thumb::MTime +Patch8: libfm-1.2.3-Return-back-the-workaround-on-thumbnailers.patch +# [SF#937] Fix wrong treating files like ".purple" as having extension "purple" +Patch9: libfm-1.2.3-Fix-SF937.patch +# [SF#935] Fix invalid desktop entry save if 'Cancel' was pressed in dialog +Patch10: libfm-1.2.3-Fix-SF935.patch +# [SF#915] Always do gtk_drag_finish() in FmDndDest even if drop was failed +Patch11: libfm-1.2.3-Fix-SF915.patch +# [PATCH] FmDndDest: reset cached data if drag context was changed +Patch12: libfm-1.2.3-Reset-cached-data-if-drag-context-was-changed.patch +# [PATCH] Fix uninitialized data in drag-motion callback of FmPlacesView +Patch13: libfm-1.2.3-Fix-uninitialized-data-in-drag-motion-callback.patch +# [SF#953] Fix crash in expand_exec_macros() on missing Exec line in desktop entry +Patch14: libfm-1.2.3-Fix-SF953.patch +# [SF#921] Rewrite broken rubberband rendering in icon view for GTK3 +Patch15: libfm-1.2.3-Fix-SF921.patch +# [SF#932] Fix renaming of desktop entries on copy operation error +Patch16: libfm-1.2.3-Fix-SF932.patch +# Fix dropping files onto applications shortcuts on the desktop +Patch17: libfm-1.2.3-Fix-dropping-files-onto-applications.patch +# Fix desktop file name for urxvt in terminals.list +Patch18: libfm-1.2.3-Fix-desktop-file-name-for-urxvt.patch +# [SF#954] Add urxvtc data into the terminals.list file +Patch19: libfm-1.2.3-Fix-SF954.patch +# [SF#950] Fix adding user-defined MIME associations into mimeapps.list config +Patch20: libfm-1.2.3-Fix-SF950.patch +# [SF#959] Fix autoscroll issues with GTK+ 3 +Patch21: libfm-1.2.3-Fix-SF959.patch +# [SF#965] Fix stuck tooltip on entering empty folder +Patch22: libfm-1.2.3-Fix-SF965.patch +# Fix crash on cancelling FmDirListJob while retrieving is in progress +Patch23: libfm-1.2.3-Fix-crash-on-cancelling-FmDirListJob.patch +# [SF#919] Fix incomplete cleanup on folder reloading +Patch24: libfm-1.2.3-Fix-SF919.patch +# [SF#967] Fix timer shown in progress dialog, it should show 01:00, not 00:60 +Patch25: libfm-1.2.3-Fix-SF967.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gtk2-devel @@ -117,6 +166,31 @@ %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 %build %configure \ ++++++ libfm-1.2.3-Fix-SF902.patch ++++++
From ed02b1476ef477b9782a43b7aa2998e644ad6195 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 23 Oct 2014 19:10:42 +0300 Subject: [PATCH] [SF#902]Handle NULL returned by fm_mime_type_from_native_file() correctly.
--- NEWS | 2 ++ src/base/fm-file-info.c | 5 +++++ src/base/fm-mime-type.c | 3 ++- src/base/fm-templates.c | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6ad99f3..58ee98a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +* Fixed crash in templates on file that was deleted instantly after creation. + Changes on 1.2.3 since 1.2.2: * Changed licence for libfm-extra and libfm components from GPL-2 to diff --git a/src/base/fm-file-info.c b/src/base/fm-file-info.c index 9072a14..fc3ca28 100644 --- a/src/base/fm-file-info.c +++ b/src/base/fm-file-info.c @@ -251,7 +251,12 @@ gboolean _fm_file_info_set_from_native_file(FmFileInfo* fi, const char* path, fi->mime_type = fm_mime_type_from_file_name(fm_path_get_basename(fi->path)); } else + { fi->mime_type = fm_mime_type_from_native_file(path, fm_path_get_basename(fi->path), &st); + if (G_UNLIKELY(fi->mime_type == NULL)) + /* file might be deleted while we test it but we assume mime_type is not NULL */ + fi->mime_type = fm_mime_type_from_name("application/octet-stream"); + } if (get_fast) /* do rough estimation */ fi->accessible = ((st.st_mode & S_IRUSR) == S_IRUSR); diff --git a/src/base/fm-mime-type.c b/src/base/fm-mime-type.c index e5ff140..1b28e48 100644 --- a/src/base/fm-mime-type.c +++ b/src/base/fm-mime-type.c @@ -127,7 +127,8 @@ FmMimeType* fm_mime_type_from_file_name(const char* ufile_name) * @base_name: file basename * @pstat: (allow-none): file atrributes * - * Finds #FmMimeType descriptor for provided data. + * Finds #FmMimeType descriptor for provided data. If file does not exist + * then returns %NULL. * * Before 1.0.0 this API had name fm_mime_type_get_for_native_file. * diff --git a/src/base/fm-templates.c b/src/base/fm-templates.c index ea3526b..062b606 100644 --- a/src/base/fm-templates.c +++ b/src/base/fm-templates.c @@ -152,6 +152,10 @@ static FmMimeType *_fm_template_guess_mime_type(FmPath *path, FmMimeType *mime_t gchar *filename, *type, *url; GKeyFile *kf; + /* SF bug #902: if file was deleted instantly we get NULL here */ + if (mime_type == NULL) + return NULL; + /* if file is desktop entry then find the real template file path */ if(mime_type != _fm_mime_type_get_application_x_desktop()) { -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF914.patch ++++++
From b0d178ef0e0a5c5a064c2f8a284fbba4760023dc Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 7 May 2015 19:31:29 +0300 Subject: [PATCH] [SF#914] Fix missing folder info update on folder attributes change.
When folder itself was changed, no info update came so all it's info in 'Properties' window stayed the same. We have to update the FmFileInfo too. --- NEWS | 2 ++ src/base/fm-folder.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0356f25..60d70a1 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ * Fixed handling %c in desktop entry Exec key: launch may fail if the application name contains spaces so it needs quoting. +* Fixed missing folder info update on folder attributes change. + Changes on 1.2.3 since 1.2.2: diff --git a/src/base/fm-folder.c b/src/base/fm-folder.c index 6773cb0..cfee540 100644 --- a/src/base/fm-folder.c +++ b/src/base/fm-folder.c @@ -376,8 +376,12 @@ static void on_file_info_job_finished(FmFileInfoJob* job, FmFolder* folder) { FmFileInfo* fi = (FmFileInfo*)l->data; FmPath* path = fm_file_info_get_path(fi); - GList* l2 = _fm_folder_get_file_by_path(folder, path); - if(l2) /* the file is already in the folder, update */ + GList* l2; + if (path == fm_file_info_get_path(folder->dir_fi)) + /* update for folder itself, also see FIXME below! */ + fm_file_info_update(folder->dir_fi, fi); + else if ((l2 = _fm_folder_get_file_by_path(folder, path))) + /* the file is already in the folder, update */ { FmFileInfo* fi2 = (FmFileInfo*)l2->data; /* FIXME: will fm_file_info_update here cause problems? @@ -665,6 +669,8 @@ static void on_folder_changed(GFileMonitor* mon, GFile* gf, GFile* other, GFileM case G_FILE_MONITOR_EVENT_CHANGED: folder->pending_change_notify = TRUE; G_LOCK(lists); + folder->files_to_update = g_slist_append(folder->files_to_update, + fm_path_new_for_gfile(gf)); if(!folder->idle_handler) folder->idle_handler = g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)on_idle, folder, NULL); G_UNLOCK(lists); -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF915.patch ++++++
From e895fe76bdeeaed3865d85c6629010f95b9ce5c8 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 20:09:52 +0300 Subject: [PATCH] [SF#915] Always do gtk_drag_finish() in FmDndDest even if drop was failed.
Missing it would create ghosts if processing failed somehow.
---
src/gtk/fm-dnd-dest.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gtk/fm-dnd-dest.c b/src/gtk/fm-dnd-dest.c
index 39db3b0..9d398ef 100644
--- a/src/gtk/fm-dnd-dest.c
+++ b/src/gtk/fm-dnd-dest.c
@@ -2,7 +2,7 @@
* fm-dnd-dest.c
*
* Copyright 2009 PCMan
From e6d3530a5de8574b160638b11fa54db7e581d6c3 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 13 Jun 2015 19:54:17 +0300 Subject: [PATCH] [SF#919] Fix incomplete cleanup on folder reloading.
This should never cause any problems but it might in some rare circumstances. --- diff --git a/src/base/fm-folder.c b/src/base/fm-folder.c index c2f0b33..83af1fd 100644 --- a/src/base/fm-folder.c +++ b/src/base/fm-folder.c @@ -1107,6 +1107,31 @@ void fm_folder_reload(FmFolder* folder) folder->dir_fi = NULL; } + /* clear all update-lists now, see SF bug #919 - if update comes before + listing job is finished, a duplicate may be created in the folder */ + if (folder->idle_handler) + { + g_source_remove(folder->idle_handler); + folder->idle_handler = 0; + if (folder->files_to_add) + { + g_slist_foreach(folder->files_to_add, (GFunc)fm_path_unref, NULL); + g_slist_free(folder->files_to_add); + folder->files_to_add = NULL; + } + if (folder->files_to_update) + { + g_slist_foreach(folder->files_to_update, (GFunc)fm_path_unref, NULL); + g_slist_free(folder->files_to_update); + folder->files_to_update = NULL; + } + if (folder->files_to_del) + { + g_slist_free(folder->files_to_del); + folder->files_to_del = NULL; + } + } + /* remove all items and re-run a dir list job. */ GList* l = fm_file_info_list_peek_head_link(folder->files); -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF921.patch ++++++
From e9575e91ee7a5ec1e07bd373aa56b4ec8b2580e0 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Mon, 11 May 2015 21:50:11 +0300 Subject: [PATCH] [SF#921] Rewrite broken rubberband rendering in icon view for GTK3.
With GTK3 using GtkStyle doesn't always give correct results, therefore the GtkStyleContext with GTK_STYLE_CLASS_RUBBERBAND should be used instead. --- NEWS | 2 ++ src/gtk/exo/exo-icon-view.c | 38 +++++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index dee4a17..afbe5f4 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,8 @@ * Fixed crash in expand_exec_macros() on missing Exec line. +* Rewritten broken rubberband rendering in icon view for GTK3. + Changes on 1.2.3 since 1.2.2: diff --git a/src/gtk/exo/exo-icon-view.c b/src/gtk/exo/exo-icon-view.c index a2bf042..b01e222 100644 --- a/src/gtk/exo/exo-icon-view.c +++ b/src/gtk/exo/exo-icon-view.c @@ -1859,21 +1859,23 @@ exo_icon_view_expose_event (GtkWidget *widget, GtkTreePath *path; GdkRectangle rubber_rect; GdkRectangle rect; - GtkStyle *style; - GdkColor *fill_color_gdk; - guchar fill_color_alpha = 0; const GList *lp; gint dest_index = -1; #if !GTK_CHECK_VERSION(3, 0, 0) + GdkColor *fill_color_gdk; + guchar fill_color_alpha = 0; gboolean rtl; gint event_area_last; GdkRectangle event_area; cairo_t *cr; + GtkStyle *style; /* verify that the expose happened on the icon window */ if (G_UNLIKELY (event->window != priv->bin_window)) return FALSE; #else + GtkStyleContext *style; + if (!gtk_cairo_should_draw_window (cr, priv->bin_window)) return FALSE; #endif @@ -1976,16 +1978,16 @@ exo_icon_view_expose_event (GtkWidget *widget, #endif } - /* draw the drag indicator */ - if (G_UNLIKELY (dest_item != NULL)) - { + if (G_UNLIKELY (dest_item != NULL || priv->doing_rubberband)) #if GTK_CHECK_VERSION(3, 0, 0) - GtkStyleContext *style = gtk_widget_get_style_context (widget); + style = gtk_widget_get_style_context (widget); #else - GtkStyle *style = gtk_widget_get_style (widget); + style = gtk_widget_get_style (widget); #endif - GdkRectangle rect = { 0 }; + /* draw the drag indicator */ + if (G_UNLIKELY (dest_item != NULL)) + { switch (dest_pos) { case EXO_ICON_VIEW_DROP_INTO: @@ -2015,6 +2017,7 @@ exo_icon_view_expose_event (GtkWidget *widget, rect.width = 2; rect.height = dest_item->area.height; case EXO_ICON_VIEW_NO_DROP: + rect.x = rect.y = rect.width = rect.height = 0; break; default: @@ -2043,7 +2046,6 @@ exo_icon_view_expose_event (GtkWidget *widget, if (gdk_rectangle_intersect (&rubber_rect, &event_area, &rect)) { cr = gdk_cairo_create (event->window); -#endif gtk_widget_style_get (widget, "selection-box-color", &fill_color_gdk, "selection-box-alpha", &fill_color_alpha, @@ -2072,9 +2074,23 @@ exo_icon_view_expose_event (GtkWidget *widget, cairo_set_line_width (cr, 1); cairo_stroke (cr); gdk_color_free (fill_color_gdk); -#if !GTK_CHECK_VERSION(3, 0, 0) cairo_destroy (cr); } +#else + gtk_style_context_save (style); + gtk_style_context_add_class (style, GTK_STYLE_CLASS_RUBBERBAND); + + gdk_cairo_rectangle (cr, &rubber_rect); + cairo_clip (cr); + + gtk_render_background (style, cr, + rubber_rect.x, rubber_rect.y, + rubber_rect.width, rubber_rect.height); + gtk_render_frame (style, cr, + rubber_rect.x, rubber_rect.y, + rubber_rect.width, rubber_rect.height); + + gtk_style_context_restore (style); #endif } -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF922.patch ++++++
From 6680cbd2085659f476bb206c5180b33491d7f65d Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Mon, 29 Dec 2014 23:46:55 +0200 Subject: [PATCH] [SF#922]Fix handling %c in desktop entry Exec key.
The launch may fail if the application name contains spaces. --- NEWS | 7 ++++++- src/base/fm-app-info.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 58ee98a..0356f25 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ -* Fixed crash in templates on file that was deleted instantly after creation. +* Fixed crash in templates on file that was deleted instantly after + creation. + +* Fixed handling %c in desktop entry Exec key: launch may fail if the + application name contains spaces so it needs quoting. + Changes on 1.2.3 since 1.2.2: diff --git a/src/base/fm-app-info.c b/src/base/fm-app-info.c index 1578702..c374982 100644 --- a/src/base/fm-app-info.c +++ b/src/base/fm-app-info.c @@ -149,7 +149,11 @@ static char* expand_exec_macros(GAppInfo* app, const char* full_desktop_path, { const char* name = g_app_info_get_name(app); if(name) - g_string_append(cmd, name); + { + char *quoted = g_shell_quote(name); + g_string_append(cmd, quoted); + g_free(quoted); + } break; } case 'k': -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF925-and-SF938.patch ++++++
From 019ef925edcd6f0c0cbd4ed41e67b301bc866837 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 13:52:34 +0300 Subject: [PATCH] [SF#925,938] Improve file type detection, it fails in some cases such as DOCX.
For file types that have multiple entries in MIME database the function
g_content_type_guess() always returns "uncertain true" attribute, even if
both content and file name are passed to it. And if only content was passed
then it always returns "uncertain false" so previous logic fails for such
files.
The commit changes that logic to not rely on uncertain attribute but test
if adding content test changes type returned, and if does then return to
previous test type (content only), but if it doesn't then trust that value
ignoring uncertain attribute.
My testing shows good acceptable results on previously wrong types while
still giving right results on files with incorrect suffixes.
---
NEWS | 2 ++
src/base/fm-mime-type.c | 16 +++++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/NEWS b/NEWS
index 0402db7..9866ee9 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@
* Corrected missing newline at end of generated shortcut desktop entry.
+* Improved file type detection, it failed in some cases such as DOCX.
+
Changes on 1.2.3 since 1.2.2:
diff --git a/src/base/fm-mime-type.c b/src/base/fm-mime-type.c
index 1b28e48..f69a15f 100644
--- a/src/base/fm-mime-type.c
+++ b/src/base/fm-mime-type.c
@@ -3,7 +3,7 @@
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 30df77f34fdb8b65f09c62b2ca88536130622298 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 14 May 2015 18:46:11 +0300 Subject: [PATCH] [SF#932] Fix renaming of desktop entries on copy operation error.
From 5f99bd8abdd26b55e84f4f876db7126245806197 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 16:38:12 +0300 Subject: [PATCH] [SF#935] Fix invalid desktop entry save if 'Cancel' was
It was the file name which was set in renaming dialog but it was compared with
display name instead when decided whether "Rename" button should be active or not.
---
diff --git a/src/base/fm-thumbnail-loader.c b/src/base/fm-thumbnail-loader.c
index 01a4a75..f0292f1 100644
--- a/src/base/fm-thumbnail-loader.c
+++ b/src/base/fm-thumbnail-loader.c
@@ -351,6 +351,7 @@ static gboolean is_thumbnail_outdated(GObject* thumb_pix, const char* thumbnail_
{
/* if the thumbnail png file does not contain "tEXt::Thumb::MTime" value,
* we compare the mtime of the thumbnail with its original directly. */
+ /* FIXME: XDG specification requires to regenerate it in such case */
struct stat statbuf;
if(stat(thumbnail_path, &statbuf) == 0) /* get mtime of the thumbnail file */
{
@@ -481,6 +482,7 @@ static gpointer load_thumbnail_thread(gpointer user_data)
memcpy( large_basename, md5, 32 );
task->large_path = large_path;
}
+ /* FIXME: support fail/<PRG>/<MD5>.png to skip creation */
if(task->flags & (GENERATE_NORMAL|GENERATE_LARGE))
generate_thumbnails(task); /* second cycle */
diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
index 77a28bc..fa084b6 100644
--- a/src/gtk/fm-progress-dlg.c
+++ b/src/gtk/fm-progress-dlg.c
@@ -2,7 +2,7 @@
* fm-progress-dlg.c
*
* Copyright 2009 PCMan
From cc4782b9ae28c7aa77997662b4efa02c1cdebc44 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 16:27:32 +0300 Subject: [PATCH] [SF#937] Fix wrong treating files like ".purple" as having extension "purple".
---
NEWS | 2 ++
src/gtk/fm-folder-model.c | 20 +++++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/NEWS b/NEWS
index 822628b..a8ee441 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@
* Returned back the workaround on thumbnailers which don't save any of
Thumb::MTime or Thumb::URI in the thumbnail.
+* Fixed wrong treating files like ".purple" as having extension "purple".
+
Changes on 1.2.3 since 1.2.2:
diff --git a/src/gtk/fm-folder-model.c b/src/gtk/fm-folder-model.c
index 14ea780..b97b0a7 100644
--- a/src/gtk/fm-folder-model.c
+++ b/src/gtk/fm-folder-model.c
@@ -2,7 +2,7 @@
* fm-folder-model.c
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 90a00666c7de638301c07ade2a499370f542f8f0 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 7 May 2015 23:52:09 +0300 Subject: [PATCH] [SF#946] Add missing newline at end of generated shortcut desktop entry.
---
NEWS | 2 ++
src/base/fm-folder.c | 2 +-
src/job/fm-file-ops-job.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 964fd67..0402db7 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@
* Use G_SPAWN_DO_NOT_REAP_CHILD on application launch, that should fix
a problem with pkexec.
+* Corrected missing newline at end of generated shortcut desktop entry.
+
Changes on 1.2.3 since 1.2.2:
diff --git a/src/base/fm-folder.c b/src/base/fm-folder.c
index cfee540..8972737 100644
--- a/src/base/fm-folder.c
+++ b/src/base/fm-folder.c
@@ -2,7 +2,7 @@
* fm-folder.c
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 699810d3bd0c5d9d508fcd9aa3a65442f2afee3f Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Tue, 19 May 2015 20:18:05 +0300 Subject: [PATCH] [SF#950] Fix adding user-defined MIME associations into mimeapps.list config.
From 8df4f66621a21c45e562c36a27039e63be07f27a Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sun, 10 May 2015 18:34:34 +0300 Subject: [PATCH] [SF#953] Fix crash in expand_exec_macros() on missing Exec
Change in commit 3c629358f01914f71e2acd73c61174d91d456023 was incorrect,
workaround on GDesktopAppInfo caching should be implemented other way.
---
diff --git a/src/gtk/fm-app-chooser-dlg.c b/src/gtk/fm-app-chooser-dlg.c
index 700c3a8..2649826 100644
--- a/src/gtk/fm-app-chooser-dlg.c
+++ b/src/gtk/fm-app-chooser-dlg.c
@@ -2,7 +2,7 @@
* fm-app-chooser-dlg.c
*
* Copyright 2010 Hong Jen Yee (PCMan)
From 3de4d76ad06b665a5c158813e212f20a923d7d52 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sun, 17 May 2015 01:28:49 +0300 Subject: [PATCH] [SF#954] Add urxvtc data into the terminals.list file.
--- diff --git a/data/terminals.list b/data/terminals.list index 2064f41..aa2043f 100644 --- a/data/terminals.list +++ b/data/terminals.list @@ -61,3 +61,7 @@ desktop_id=qterminal.desktop open_arg=-e noclose_arg=--hold -e desktop_id=lilyterm.desktop + +[urxvtc] +open_arg=-e +noclose_arg=-hold -e -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF959.patch ++++++
From 38e12103912c5c324149fb2c5d8813ffe66c53d0 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sun, 24 May 2015 17:42:20 +0300 Subject: [PATCH] [SF#959] Fix autoscroll issues with GTK+ 3 (fix from Mamoru TASAKA).
The gdk_window_get_device_position() should receive another argument. --- src/gtk/fm-dnd-auto-scroll.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gtk/fm-dnd-auto-scroll.c b/src/gtk/fm-dnd-auto-scroll.c index 72d866a..f8eed6c 100644 --- a/src/gtk/fm-dnd-auto-scroll.c +++ b/src/gtk/fm-dnd-auto-scroll.c @@ -56,7 +56,10 @@ static gboolean on_auto_scroll(gpointer user_data) return FALSE; gdk_window_get_device_position (gtk_widget_get_window(widget), - gtk_get_current_event_device(), + gdk_device_manager_get_client_pointer( + gdk_display_get_device_manager( + gdk_window_get_display( + gtk_widget_get_window(widget)))), &x, &y, NULL); gtk_widget_get_allocation(widget, &allocation); -- 2.1.4 ++++++ libfm-1.2.3-Fix-SF965.patch ++++++
From c89e772f00d4c422a3ae02ff14848afc18524d0e Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 6 Jun 2015 02:10:35 +0300 Subject: [PATCH] [SF#965] Fix stuck tooltip on entering empty folder.
---
diff --git a/src/gtk/fm-standard-view.c b/src/gtk/fm-standard-view.c
index b2ea6fc..ae382bb 100644
--- a/src/gtk/fm-standard-view.c
+++ b/src/gtk/fm-standard-view.c
@@ -2,7 +2,7 @@
* fm-standard-view.c
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 7ace4a16024d05ba8464e364e03bc401ce54a7d9 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Mon, 22 Jun 2015 21:13:14 +0300 Subject: [PATCH] [SF#967] Fix timer shown in progress dialog, it should show 01:00, not 00:60.
From 96a48e25c354d0bc482857dcad7cba306db78f11 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Wed, 10 Jun 2015 14:19:03 +0300 Subject: [PATCH] Fix crash on cancelling FmDirListJob while retrieving is in
---
diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
index fa084b6..a82610f 100644
--- a/src/gtk/fm-progress-dlg.c
+++ b/src/gtk/fm-progress-dlg.c
@@ -455,11 +455,11 @@ static gboolean on_update_dlg(gpointer user_data)
guint secs = (guint)remaining;
guint mins = 0;
guint hrs = 0;
- if(secs > 60)
+ if(secs >= 60)
{
mins = secs / 60;
secs %= 60;
- if(mins > 60)
+ if(mins >= 60)
{
hrs = mins / 60;
mins %= 60;
--
2.1.4
++++++ libfm-1.2.3-Fix-crash-on-cancelling-FmDirListJob.patch ++++++
progress.
The test fm_job_is_cancelled() was missed when tried to display error
message for damaged file info.
---
diff --git a/src/job/fm-dir-list-job.c b/src/job/fm-dir-list-job.c
index f9bfc5a..410084f 100644
--- a/src/job/fm-dir-list-job.c
+++ b/src/job/fm-dir-list-job.c
@@ -2,7 +2,7 @@
* fm-dir-list-job.c
*
* Copyright 2009 PCMan
From ff2fdd921cadb87eae41ef8d86af5c5fc1f10dea Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sun, 17 May 2015 01:27:09 +0300 Subject: [PATCH] Fix desktop file name for urxvt in terminals.list.
It's not urxvt.desktop but rxvt-unicode.desktop instead. --- data/terminals.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/terminals.list b/data/terminals.list index fb4ee8b..2064f41 100644 --- a/data/terminals.list +++ b/data/terminals.list @@ -31,7 +31,7 @@ open_arg=-e [urxvt] open_arg=-e noclose_arg=-hold -e -desktop_id=urxvt.desktop +desktop_id=rxvt-unicode.desktop [eterm] open_arg=-e -- 2.1.4 ++++++ libfm-1.2.3-Fix-dropping-files-onto-applications.patch ++++++
From 819cdf17be19097a7276f15ed8eeebdf3f7a5188 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 14 May 2015 21:33:45 +0300 Subject: [PATCH] Fix dropping files onto applications shortcuts on the desktop.
Those should be not "inode/x-shortcut" but "application/x-desktop" instead
and therefore handled as any other applications, i.e. allow drop.
---
diff --git a/src/base/fm-file-info.c b/src/base/fm-file-info.c
index fc3ca28..39b417e 100644
--- a/src/base/fm-file-info.c
+++ b/src/base/fm-file-info.c
@@ -3,7 +3,7 @@
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 3f6bfa6d5857a3f8603c41cc55fec5d224e2a631 Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 20:20:31 +0300 Subject: [PATCH] Fix uninitialized data in drag-motion callback of FmPlacesView.
---
NEWS | 2 ++
src/gtk/fm-places-view.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 0c499ba..60c45ab 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@
* Fixed invalid desktop entry save if 'Cancel' was pressed in the file
properties dialog window.
+* Fixed issues on dropping folders into Places for bookmarking them.
+
Changes on 1.2.3 since 1.2.2:
diff --git a/src/gtk/fm-places-view.c b/src/gtk/fm-places-view.c
index 70b728b..b6be8a9 100644
--- a/src/gtk/fm-places-view.c
+++ b/src/gtk/fm-places-view.c
@@ -2,7 +2,7 @@
* fm-places-view.c
*
* Copyright 2009 - 2012 Hong Jen Yee (PCMan)
From 0c5b9e11ae83045acb3bdf6b08bbb101130f4ebe Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 20:17:20 +0300 Subject: [PATCH] FmDndDest: reset cached data if drag context was changed.
The context might change if motion changes something on target. Therefore we should follow the change and re-request the data. --- src/gtk/fm-dnd-dest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gtk/fm-dnd-dest.c b/src/gtk/fm-dnd-dest.c index 9d398ef..ddfda35 100644 --- a/src/gtk/fm-dnd-dest.c +++ b/src/gtk/fm-dnd-dest.c @@ -975,8 +975,9 @@ GdkDragAction fm_dnd_dest_get_default_action(FmDndDest* dd, /* we have no valid data, query it now */ if(!dd->src_files || dd->context != drag_context) { - clear_src_cache(dd); query_sources: + if (dd->context != drag_context) + clear_src_cache(dd); action = 0; if(!dd->waiting_data) /* we're still waiting for "drag-data-received" signal */ { -- 2.1.4 ++++++ libfm-1.2.3-Return-back-the-workaround-on-thumbnailers.patch ++++++
From 08f0b7cbf2b3955e4abfdcfa66c3d91c959482dd Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Sat, 9 May 2015 15:20:25 +0300 Subject: [PATCH] Return back the workaround on thumbnailers which don't save Thumb::MTime.
That workaround was added by commit 38edf958a9dee85a2648ca4cb05f61a2d361fa93
but later reverted in commit c7a4c8539cc5496d60dc2d6b75d1d136d5ca383c and
that still may lead to thumbnail regenerations.
This commit reintroduces that change with additional check, that way it will
rewrite thumbnail only if it misses Thumb::MTime in it.
---
NEWS | 3 +++
src/base/fm-thumbnail-loader.c | 22 +++++++++++++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 9866ee9..822628b 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@
* Improved file type detection, it failed in some cases such as DOCX.
+* Returned back the workaround on thumbnailers which don't save any of
+ Thumb::MTime or Thumb::URI in the thumbnail.
+
Changes on 1.2.3 since 1.2.2:
diff --git a/src/base/fm-thumbnail-loader.c b/src/base/fm-thumbnail-loader.c
index d7037ec..01a4a75 100644
--- a/src/base/fm-thumbnail-loader.c
+++ b/src/base/fm-thumbnail-loader.c
@@ -2,7 +2,7 @@
* fm-thumbnail-loader.c
*
* Copyright 2010 - 2013 Hong Jen Yee (PCMan)
From fad5a9a3e3a3148d1275b7ba048614aa4c7c0414 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lu=C3=ADs=20Pereira?=
Date: Thu, 7 May 2015 21:57:42 +0300 Subject: [PATCH] Use G_SPAWN_DO_NOT_REAP_CHILD on application launch, that should fix a problem with pkexec.
--- NEWS | 3 +++ src/base/fm-app-info.c | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 60d70a1..964fd67 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ * Fixed missing folder info update on folder attributes change. +* Use G_SPAWN_DO_NOT_REAP_CHILD on application launch, that should fix + a problem with pkexec. + Changes on 1.2.3 since 1.2.2: diff --git a/src/base/fm-app-info.c b/src/base/fm-app-info.c index c374982..5bd4433 100644 --- a/src/base/fm-app-info.c +++ b/src/base/fm-app-info.c @@ -204,6 +204,15 @@ static void child_setup(gpointer user_data) setpgid(0, data->pgid); } +static void child_watch(GPid pid, gint status, gpointer user_data) +{ + /* + * Ensure that we don't double fork and break pkexec + */ + g_spawn_close_pid(pid); +} + + static char* expand_terminal(char* cmd, gboolean keep_open, GError** error) { FmTerminal* term; @@ -246,6 +255,7 @@ static gboolean do_launch(GAppInfo* appinfo, const char* full_desktop_path, int argc; gboolean use_terminal; GAppInfoCreateFlags flags; + GPid pid; cmd = expand_exec_macros(appinfo, full_desktop_path, kf, inp, &gfiles); if(G_LIKELY(kf)) @@ -315,9 +325,12 @@ static gboolean do_launch(GAppInfo* appinfo, const char* full_desktop_path, data.pgid = getpgid(getppid()); ret = g_spawn_async(path, argv, NULL, - G_SPAWN_SEARCH_PATH, - child_setup, &data, NULL, err); - if (!ret && data.sn_id) + G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, + child_setup, &data, &pid, err); + if (ret) + /* Ensure that we don't double fork and break pkexec */ + g_child_watch_add(pid, child_watch, NULL); + else if (data.sn_id) /* Notify launch context about failure */ g_app_launch_context_launch_failed(ctx, data.sn_id); -- 2.1.4 ++++++ libfm-Additional-fix-after-SF902.patch ++++++
From eaeebfe47253844e5d5ca9e8ab6109b5ec0a9cbc Mon Sep 17 00:00:00 2001 From: Andriy Grytsenko
Date: Thu, 23 Oct 2014 20:27:58 +0300 Subject: [PATCH] Additional fix after previous commit.
--- src/base/fm-templates.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/fm-templates.c b/src/base/fm-templates.c index 062b606..cfc7b82 100644 --- a/src/base/fm-templates.c +++ b/src/base/fm-templates.c @@ -682,7 +682,8 @@ static void on_dir_changed(GFileMonitor *mon, GFile *gf, GFile *other, g_warning("could not guess type of template %s, ignoring it", basename); } - fm_mime_type_unref(mime_type); + if (G_LIKELY(mime_type)) + fm_mime_type_unref(mime_type); } else g_debug("templates monitor: duplicate file %s", basename); -- 2.1.4