summaryrefslogtreecommitdiff
path: root/x11-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-23 02:29:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-23 02:29:55 +0100
commit4ecefdb170f4b1c7b7de25ad9f0b7b4535a387bb (patch)
tree71d4d44494c062178b4cbe46891067d32b9c04bb /x11-libs
parent8a840f5ceb4d1e3ff8caea23d1c170ab64a2d21b (diff)
x11-libs/libfm : add file compare attributes (see : https://github.com/lxde/libfm/pull/37)
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/libfm-extra/files/add_file_compare_attributes.patch53
-rw-r--r--x11-libs/libfm-extra/libfm-extra-1.3.0-r1.ebuild (renamed from x11-libs/libfm-extra/libfm-extra-1.3.0.ebuild)3
-rw-r--r--x11-libs/libfm/files/add_file_compare_attributes.patch53
-rw-r--r--x11-libs/libfm/libfm-1.3.0-r1.ebuild (renamed from x11-libs/libfm/libfm-1.3.0.ebuild)1
4 files changed, 109 insertions, 1 deletions
diff --git a/x11-libs/libfm-extra/files/add_file_compare_attributes.patch b/x11-libs/libfm-extra/files/add_file_compare_attributes.patch
new file mode 100644
index 00000000..65f0323c
--- /dev/null
+++ b/x11-libs/libfm-extra/files/add_file_compare_attributes.patch
@@ -0,0 +1,53 @@
+diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
+index 49aebe47..1d124a60 100644
+--- a/src/gtk/fm-progress-dlg.c
++++ b/src/gtk/fm-progress-dlg.c
+@@ -166,6 +166,8 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
+ GtkLabel *src_fi, *dest_fi;
+ GtkEntry *filename;
+ GtkToggleButton *apply_all;
++ char* comparedate;
++ char* comparesize;
+ char* tmp;
+ const char* disp_size;
+ FmPath* path;
+@@ -200,18 +202,34 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
+ gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(data->dlg));
+
+ gtk_image_set_from_gicon(src_icon, G_ICON(icon), GTK_ICON_SIZE_DIALOG);
++ if (fm_file_info_get_mtime(src) > fm_file_info_get_mtime(dest))
++ comparedate = _("newer");
++ else
++ if (fm_file_info_get_mtime(src) < fm_file_info_get_mtime(dest))
++ comparedate = _("older");
++ else
++ if (fm_file_info_get_mtime(src) == fm_file_info_get_mtime(dest))
++ comparedate = _("same date/time");
+ disp_size = fm_file_info_get_disp_size(src);
+ if(disp_size)
+ {
+- tmp = g_strdup_printf(_("Type: %s\nSize: %s\nModified: %s"),
+- fm_file_info_get_desc(src), disp_size,
+- fm_file_info_get_disp_mtime(src));
++ if (fm_file_info_get_size(src) > fm_file_info_get_size(dest))
++ comparesize = _("larger");
++ else
++ if (fm_file_info_get_size(src) < fm_file_info_get_size(dest))
++ comparesize = _("less");
++ else
++ if (fm_file_info_get_size(src) == fm_file_info_get_size(dest))
++ comparesize = _("same size");
++ tmp = g_strdup_printf(_("Type: %s\nSize: %s (%s)\nModified: %s (%s)"),
++ fm_file_info_get_desc(src), disp_size, comparesize,
++ fm_file_info_get_disp_mtime(src), comparedate);
+ }
+ else
+ {
+- tmp = g_strdup_printf(_("Type: %s\nModified: %s"),
++ tmp = g_strdup_printf(_("Type: %s\nModified: %s (%s)"),
+ fm_file_info_get_desc(src),
+- fm_file_info_get_disp_mtime(src));
++ fm_file_info_get_disp_mtime(src), comparedate);
+ }
+
+ gtk_label_set_text(src_fi, tmp);
diff --git a/x11-libs/libfm-extra/libfm-extra-1.3.0.ebuild b/x11-libs/libfm-extra/libfm-extra-1.3.0-r1.ebuild
index 257cabd6..324bb02e 100644
--- a/x11-libs/libfm-extra/libfm-extra-1.3.0.ebuild
+++ b/x11-libs/libfm-extra/libfm-extra-1.3.0-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
-inherit autotools xdg-utils
+inherit eutils autotools xdg-utils
MY_PV=${PV/_/}
MY_PN="libfm"
@@ -27,6 +27,7 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"/${MY_P}
src_prepare() {
+ epatch "${FILESDIR}"/add_file_compare_attributes.patch
sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
diff --git a/x11-libs/libfm/files/add_file_compare_attributes.patch b/x11-libs/libfm/files/add_file_compare_attributes.patch
new file mode 100644
index 00000000..65f0323c
--- /dev/null
+++ b/x11-libs/libfm/files/add_file_compare_attributes.patch
@@ -0,0 +1,53 @@
+diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
+index 49aebe47..1d124a60 100644
+--- a/src/gtk/fm-progress-dlg.c
++++ b/src/gtk/fm-progress-dlg.c
+@@ -166,6 +166,8 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
+ GtkLabel *src_fi, *dest_fi;
+ GtkEntry *filename;
+ GtkToggleButton *apply_all;
++ char* comparedate;
++ char* comparesize;
+ char* tmp;
+ const char* disp_size;
+ FmPath* path;
+@@ -200,18 +202,34 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
+ gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(data->dlg));
+
+ gtk_image_set_from_gicon(src_icon, G_ICON(icon), GTK_ICON_SIZE_DIALOG);
++ if (fm_file_info_get_mtime(src) > fm_file_info_get_mtime(dest))
++ comparedate = _("newer");
++ else
++ if (fm_file_info_get_mtime(src) < fm_file_info_get_mtime(dest))
++ comparedate = _("older");
++ else
++ if (fm_file_info_get_mtime(src) == fm_file_info_get_mtime(dest))
++ comparedate = _("same date/time");
+ disp_size = fm_file_info_get_disp_size(src);
+ if(disp_size)
+ {
+- tmp = g_strdup_printf(_("Type: %s\nSize: %s\nModified: %s"),
+- fm_file_info_get_desc(src), disp_size,
+- fm_file_info_get_disp_mtime(src));
++ if (fm_file_info_get_size(src) > fm_file_info_get_size(dest))
++ comparesize = _("larger");
++ else
++ if (fm_file_info_get_size(src) < fm_file_info_get_size(dest))
++ comparesize = _("less");
++ else
++ if (fm_file_info_get_size(src) == fm_file_info_get_size(dest))
++ comparesize = _("same size");
++ tmp = g_strdup_printf(_("Type: %s\nSize: %s (%s)\nModified: %s (%s)"),
++ fm_file_info_get_desc(src), disp_size, comparesize,
++ fm_file_info_get_disp_mtime(src), comparedate);
+ }
+ else
+ {
+- tmp = g_strdup_printf(_("Type: %s\nModified: %s"),
++ tmp = g_strdup_printf(_("Type: %s\nModified: %s (%s)"),
+ fm_file_info_get_desc(src),
+- fm_file_info_get_disp_mtime(src));
++ fm_file_info_get_disp_mtime(src), comparedate);
+ }
+
+ gtk_label_set_text(src_fi, tmp);
diff --git a/x11-libs/libfm/libfm-1.3.0.ebuild b/x11-libs/libfm/libfm-1.3.0-r1.ebuild
index 788658c0..ddf591da 100644
--- a/x11-libs/libfm/libfm-1.3.0.ebuild
+++ b/x11-libs/libfm/libfm-1.3.0-r1.ebuild
@@ -45,6 +45,7 @@ S="${WORKDIR}"/${MY_P}
REQUIRED_USE="udisks? ( automount ) doc? ( gtk ) gtk3? ( gtk )"
src_prepare() {
+ epatch "${FILESDIR}"/add_file_compare_attributes.patch
if ! use doc; then
sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"