From bf764dbdddfb6e88d0eb76df7c1ad035eec9224d Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 5 Dec 2016 22:03:37 +0900 Subject: [PATCH] Update to the lastest master branch, with cherry-picking patches from 1.2 branch to revert some enhancement change on master --- .gitignore | 1 + ...m-support-by-reading-the-metadata-em.patch | 127 ++++++++++++++++++ ...ert-Fix-typo-14-not-suitable-for-1.2.patch | 26 ++++ libfm.spec | 19 ++- sources | 2 +- 5 files changed, 170 insertions(+), 5 deletions(-) create mode 100644 0001-Revert-Add-emblem-support-by-reading-the-metadata-em.patch create mode 100644 0002-Revert-Fix-typo-14-not-suitable-for-1.2.patch diff --git a/.gitignore b/.gitignore index 796e4e5..fde334f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ libfm-0.1.12.tar.gz /libfm-1.2.4-D20160627git2a537414def87ebd75024a74030e60582cd78c45.tar.gz /libfm-1.2.4-D20161017git82b3a1a201aae22860f501e3f7e75b46f8bcacd7.tar.gz /libfm-1.2.4-D20161105gitc2989af0154256c35c5def4b9f5a758c8a3878ca.tar.gz +/libfm-1.2.4-D20161204git275559f196db6340d4ae6119a10d9b0efedaf84f.tar.gz diff --git a/0001-Revert-Add-emblem-support-by-reading-the-metadata-em.patch b/0001-Revert-Add-emblem-support-by-reading-the-metadata-em.patch new file mode 100644 index 0000000..4042ada --- /dev/null +++ b/0001-Revert-Add-emblem-support-by-reading-the-metadata-em.patch @@ -0,0 +1,127 @@ +From cfd0421c1e38c2a73afc37a1c5ec845acbc369d4 Mon Sep 17 00:00:00 2001 +From: Andriy Grytsenko +Date: Sat, 26 Nov 2016 03:34:17 +0200 +Subject: [PATCH 1/2] Revert "Add emblem support by reading the + "metadata::emblems" attribute provided by GFileInfo." - not suitable for 1.2. + +This reverts commit bfbd8820fd8d45dd744bde87a821514a4e46d64f. +--- + src/base/fm-file-info.c | 53 ++++------------------------------------------ + src/job/fm-file-info-job.c | 2 +- + 2 files changed, 5 insertions(+), 50 deletions(-) + +diff --git a/src/base/fm-file-info.c b/src/base/fm-file-info.c +index a319aee..bd0b185 100644 +--- a/src/base/fm-file-info.c ++++ b/src/base/fm-file-info.c +@@ -189,37 +189,6 @@ FmFileInfo* fm_file_info_new () + } + + /** +- * _fm_file_info_set_emblems: +- * @fi: A FmFileInfo struct +- * @inf: A GFileInfo object +- * +- * Read icon emblems metadata from the "metadata::emblems" attribute of +- * a GFileInfo object and make the GIcon store in the FmFileInfo a +- * GEmblemedIcon object if the file has emblems. +- */ +-static void _fm_file_info_set_emblems(FmFileInfo* fi, GFileInfo* inf) +-{ +- char** emblem_names = g_file_info_get_attribute_stringv(inf, "metadata::emblems"); +- if(emblem_names) +- { +- GIcon* gicon = g_emblemed_icon_new(G_ICON(fi->icon), NULL); +- char** emblem_name; +- for(emblem_name = emblem_names; *emblem_name; ++emblem_name) +- { +- GIcon* emblem_icon = g_themed_icon_new(*emblem_name); +- GEmblem* emblem = g_emblem_new(emblem_icon); +- g_object_unref(emblem_icon); +- g_emblemed_icon_add_emblem(G_EMBLEMED_ICON(gicon), emblem); +- g_object_unref(emblem); +- } +- /* replace the original GIcon with an GEmblemedIcon */ +- g_object_unref(fi->icon); +- fi->icon = fm_icon_from_gicon(gicon); +- g_object_unref(gicon); +- } +-} +- +-/** + * fm_file_info_set_from_native_file: + * @fi: A FmFileInfo struct + * @path: full path of the file +@@ -244,9 +213,6 @@ gboolean _fm_file_info_set_from_native_file(FmFileInfo* fi, const char* path, + g_return_val_if_fail(fi && fi->path, FALSE); + if(lstat(path, &st) == 0) + { +- GFile* gfile; +- GFileInfo* inf; +- + fi->mode = st.st_mode; + fi->mtime = st.st_mtime; + fi->atime = st.st_atime; +@@ -444,16 +410,6 @@ _not_desktop_entry: + if(!fi->icon) + fi->icon = g_object_ref(fm_mime_type_get_icon(fi->mime_type)); + +- gfile = g_file_new_for_path(path); +- +- /* get emblems using gio/gvfs-metadata */ +- inf = g_file_query_info(gfile, "metadata::emblems,standard::icon", G_FILE_QUERY_INFO_NONE, NULL, NULL); +- if(inf) +- { +- _fm_file_info_set_emblems(fi, inf); +- g_object_unref(inf); +- } +- + if (!dname) + dname = g_filename_display_basename(path); + _fm_path_set_display_name(fi->path, dname); +@@ -463,15 +419,17 @@ _not_desktop_entry: + fi->fs_is_ro = FALSE; + if (S_ISDIR(st.st_mode)) + { +- inf = g_file_query_filesystem_info(gfile, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, ++ GFile *gf = g_file_new_for_path(path); ++ GFileInfo *inf; ++ inf = g_file_query_filesystem_info(gf, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, + NULL, NULL); + if (inf) + { + fi->fs_is_ro = g_file_info_get_attribute_boolean(inf, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY); + g_object_unref(inf); + } ++ g_object_unref(gf); + } +- g_object_unref(gfile); + } + else + { +@@ -695,9 +653,6 @@ _file_is_symlink: + else + fi->icon = g_object_ref(fm_mime_type_get_icon(fi->mime_type)); + +- /* if the file has emblems, add them to the icon */ +- _fm_file_info_set_emblems(fi, inf); +- + if(fm_path_is_native(fi->path)) + { + fi->dev = g_file_info_get_attribute_uint32(inf, G_FILE_ATTRIBUTE_UNIX_DEVICE); +diff --git a/src/job/fm-file-info-job.c b/src/job/fm-file-info-job.c +index 8560d2c..340b673 100644 +--- a/src/job/fm-file-info-job.c ++++ b/src/job/fm-file-info-job.c +@@ -44,7 +44,7 @@ + static void fm_file_info_job_dispose (GObject *object); + static gboolean fm_file_info_job_run(FmJob* fmjob); + +-const char gfile_info_query_attribs[]="standard::*,unix::*,time::*,access::*,id::filesystem,metadata::emblems"; ++const char gfile_info_query_attribs[]="standard::*,unix::*,time::*,access::*,id::filesystem"; + + enum { + GOT_INFO, +-- +2.9.3 + diff --git a/0002-Revert-Fix-typo-14-not-suitable-for-1.2.patch b/0002-Revert-Fix-typo-14-not-suitable-for-1.2.patch new file mode 100644 index 0000000..a12160c --- /dev/null +++ b/0002-Revert-Fix-typo-14-not-suitable-for-1.2.patch @@ -0,0 +1,26 @@ +From c0015ff7f09eb92afedd593a49a01cc3f92a0f4c Mon Sep 17 00:00:00 2001 +From: Andriy Grytsenko +Date: Sat, 26 Nov 2016 03:35:10 +0200 +Subject: [PATCH 2/2] Revert "Fix typo (#14)" - not suitable for 1.2. + +This reverts commit e62e27b2ca05e80e8f6d8c7f21ad98772f3ee699. +--- + src/gtk/fm-progress-dlg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c +index ec5d7aa..a82610f 100644 +--- a/src/gtk/fm-progress-dlg.c ++++ b/src/gtk/fm-progress-dlg.c +@@ -333,7 +333,7 @@ static void on_finished(FmFileOpsJob* job, FmProgressDisplay* data) + gtk_widget_show(GTK_WIDGET(data->msg)); + if(fm_job_is_cancelled(FM_JOB(job))) + { +- gtk_label_set_markup(data->msg, _("Errors occurred before file operation was stopped.")); ++ gtk_label_set_markup(data->msg, _("Errors occured before file operation was stopped.")); + gtk_window_set_title(GTK_WINDOW(data->dlg), + _("Cancelled")); + } +-- +2.9.3 + diff --git a/libfm.spec b/libfm.spec index 890b3ee..57f1e36 100644 --- a/libfm.spec +++ b/libfm.spec @@ -9,12 +9,12 @@ %global prerpmver %(echo "%{?prever}" | sed -e 's|-||g') %global usegit 1 -%global mainrel 10 +%global mainrel 11 -%global githash c2989af0154256c35c5def4b9f5a758c8a3878ca +%global githash 275559f196db6340d4ae6119a10d9b0efedaf84f %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) -%global gitdate Sat, 5 Nov 2016 00:59:57 +0200 -%global gitdate_num 20161105 +%global gitdate Sun, 4 Dec 2016 22:55:33 +0200 +%global gitdate_num 20161204 %if 0%{?usegit} >= 1 %global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash} @@ -38,12 +38,17 @@ Source0: https://github.com/lxde/libfm/archive/%{githash}/%{name}-%{versi Source0: http://downloads.sourceforge.net/pcmanfm/%{name}-%{mainver}%{?prever}.tar.xz Source1: https://raw.githubusercontent.com/lxde/libfm/master/autogen.sh %endif + +# Source is from master branch, patch to revert to 1.2 branch +Patch11: 0001-Revert-Add-emblem-support-by-reading-the-metadata-em.patch +Patch12: 0002-Revert-Fix-typo-14-not-suitable-for-1.2.patch # # https://github.com/lxde/libfm/pull/11 Patch102: libfm-1.2.4-fix-use-after-free-cfgfile.patch # Fedora specific patches # Firefox uses firefox.desktop for desktop name, drop #Patch0: libfm-0.1.9-pref-apps.patch + # http://sourceforge.net/p/pcmanfm/feature-requests/385/ Patch1000: http://sourceforge.net/p/pcmanfm/feature-requests/_discuss/thread/0a50a386/597e/attachment/libfm-1.2.3-moduledir-gtkspecific-v02.patch @@ -191,6 +196,8 @@ cp -a %{SOURCE1} . %setup -q -n %{name}-%{githash} %endif +%patch11 -p1 +%patch12 -p1 %patch102 -p1 %if 0%{?fedora} >= 22 %patch1000 -p1 @@ -396,6 +403,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %endif %changelog +* Mon Dec 5 2016 Mamoru TASAKA - 1.2.4-11.D20161204git275559f196 +- Update to the lastest master branch, with cherry-picking patches from 1.2 branch + to revert some enhancement change on master + * Thu Nov 10 2016 Mamoru TASAKA - 1.2.4-10.D20161105gitc2989af015 - Remove duplicate files diff --git a/sources b/sources index 3667278..09f2d8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca5ee4490645d1f82984939faf721b00 libfm-1.2.4-D20161105gitc2989af0154256c35c5def4b9f5a758c8a3878ca.tar.gz +efad9996ff17d95bcd41344bc5692290 libfm-1.2.4-D20161204git275559f196db6340d4ae6119a10d9b0efedaf84f.tar.gz