diff --git a/fix_dont_hyphenate.patch b/fix_dont_hyphenate.patch new file mode 100644 index 0000000..ff16da8 --- /dev/null +++ b/fix_dont_hyphenate.patch @@ -0,0 +1,22 @@ +From 9d357d28adb47b57e48007b516ee5e1f9292d79e Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Sun, 8 Dec 2019 23:59:38 +0000 +Subject: [PATCH] file-operations: fix copying from the trash + +--- + libnemo-private/nemo-file-operations.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libnemo-private/nemo-file-operations.c b/libnemo-private/nemo-file-operations.c +index f23a61837..8efdcdfc5 100644 +--- a/libnemo-private/nemo-file-operations.c ++++ b/libnemo-private/nemo-file-operations.c +@@ -3532,7 +3532,7 @@ get_target_file_with_custom_name (GFile *src, + + /* if file is being restored from trash make sure it uses its original name */ + if (g_file_has_uri_scheme (src, "trash")) { +- copyname = g_strdup (g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH)); ++ copyname = g_path_get_basename (g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH)); + } + + if (copyname == NULL) { diff --git a/fix_trash_move.patch b/fix_trash_move.patch new file mode 100644 index 0000000..2b6b73e --- /dev/null +++ b/fix_trash_move.patch @@ -0,0 +1,154 @@ +From 572e80a9d313557f68a7dcf1aa3623fb217ca363 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Sun, 8 Dec 2019 21:45:30 +0000 +Subject: [PATCH 1/2] nemo-icon-canvas-item.c: Don't hyphenate long filenames + +--- + libnemo-private/nemo-icon-canvas-item.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/libnemo-private/nemo-icon-canvas-item.c b/libnemo-private/nemo-icon-canvas-item.c +index 33af6e519..184b76e94 100644 +--- a/libnemo-private/nemo-icon-canvas-item.c ++++ b/libnemo-private/nemo-icon-canvas-item.c +@@ -52,6 +52,14 @@ + #define LABEL_OFFSET_BESIDES 3 + #define LABEL_LINE_SPACING 0 + ++#ifndef PANGO_CHECK_VERSION ++#define PANGO_CHECK_VERSION(major, minor, micro) \ ++ (PANGO_VERSION_MAJOR > (major) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR > (minor)) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR == (minor) && \ ++ PANGO_VERSION_MICRO >= (micro))) ++#endif ++ + /* special text height handling + * each item has three text height variables: + * + text_height: actual height of the displayed (i.e. on-screen) PangoLayout. +@@ -1408,12 +1416,18 @@ create_label_layout (NemoIconCanvasItem *item, + GString *str; + char *zeroified_text; + const char *p; ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ PangoAttrList *attr_list; ++ #endif + + canvas_item = EEL_CANVAS_ITEM (item); + + container = NEMO_ICON_CONTAINER (canvas_item->canvas); + context = gtk_widget_get_pango_context (GTK_WIDGET (canvas_item->canvas)); + layout = pango_layout_new (context); ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ attr_list = pango_attr_list_new (); ++ #endif + + zeroified_text = NULL; + +@@ -1449,6 +1463,11 @@ create_label_layout (NemoIconCanvasItem *item, + pango_layout_set_spacing (layout, LABEL_LINE_SPACING); + pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR); + ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ pango_attr_list_insert (attr_list, pango_attr_insert_hyphens_new (FALSE)); ++ pango_layout_set_attributes (layout, attr_list); ++ #endif ++ + /* Create a font description */ + if (container->details->font && g_strcmp0 (container->details->font, "") != 0) { + desc = pango_font_description_from_string (container->details->font); +@@ -1469,6 +1488,9 @@ create_label_layout (NemoIconCanvasItem *item, + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + g_free (zeroified_text); ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ pango_attr_list_unref (attr_list); ++ #endif + + return layout; + } + +From 66bbb2ff14922ddcac595ddbe68ff0eb294dbeb8 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Mon, 9 Dec 2019 00:49:30 +0000 +Subject: [PATCH 2/2] eel-editable-label.c: Don't hyphenate long filenames + +--- + eel/eel-editable-label.c | 34 ++++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) + +diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c +index ecf49e3ba..71bcb88d9 100644 +--- a/eel/eel-editable-label.c ++++ b/eel/eel-editable-label.c +@@ -36,6 +36,15 @@ + #include + #include + ++#ifndef PANGO_CHECK_VERSION ++#define PANGO_CHECK_VERSION(major, minor, micro) \ ++ (PANGO_VERSION_MAJOR > (major) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR > (minor)) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR == (minor) && \ ++ PANGO_VERSION_MICRO >= (micro))) ++#endif ++ ++ + enum { + MOVE_CURSOR, + POPULATE_POPUP, +@@ -964,7 +973,11 @@ eel_editable_label_ensure_layout (EelEditableLabel *label, + gint preedit_length = 0; + PangoAttrList *preedit_attrs = NULL; + PangoAlignment align = PANGO_ALIGN_LEFT; /* Quiet gcc */ ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ PangoAttrList *attr_list = pango_attr_list_new (); ++ #else + PangoAttrList *tmp_attrs = pango_attr_list_new (); ++ #endif + + if (include_preedit) + { +@@ -981,9 +994,14 @@ eel_editable_label_ensure_layout (EelEditableLabel *label, + g_string_insert (tmp_string, label->selection_anchor, preedit_string); + + label->layout = gtk_widget_create_pango_layout (widget, tmp_string->str); +- ++ ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ pango_attr_list_splice (attr_list, preedit_attrs, ++ label->selection_anchor, preedit_length); ++ #else + pango_attr_list_splice (tmp_attrs, preedit_attrs, + label->selection_anchor, preedit_length); ++ #endif + + g_string_free (tmp_string, TRUE); + } +@@ -994,15 +1012,23 @@ eel_editable_label_ensure_layout (EelEditableLabel *label, + label->layout_includes_preedit = include_preedit; + + if (label->font_desc != NULL) +- pango_layout_set_font_description (label->layout, label->font_desc); +- ++ pango_layout_set_font_description (label->layout, label->font_desc); ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ pango_attr_list_insert (attr_list, pango_attr_insert_hyphens_new (FALSE)); ++ pango_layout_set_attributes (label->layout, attr_list); ++ #else + pango_layout_set_attributes (label->layout, tmp_attrs); ++ #endif + + if (preedit_string) + g_free (preedit_string); + if (preedit_attrs) +- pango_attr_list_unref (preedit_attrs); ++ pango_attr_list_unref (preedit_attrs); ++ #if PANGO_CHECK_VERSION (1, 44, 0) ++ pango_attr_list_unref (attr_list); ++ #else + pango_attr_list_unref (tmp_attrs); ++ #endif + + switch (label->jtype) + { diff --git a/nemo.spec b/nemo.spec index 02f8f3f..3849453 100644 --- a/nemo.spec +++ b/nemo.spec @@ -1,13 +1,15 @@ Name: nemo Summary: File manager for Cinnamon Version: 4.4.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/linuxmint/%{name} Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz Source1: nemo-fedora.gschema.override Patch0: remove_desktop_search.patch Patch1: Don-t-scale-text-size-when-zooming.patch +Patch2: %url/pull/2257.patch#/fix_trash_move.patch +Patch3: %url/pull/2258.patch#/fix_dont_hyphenate.patch Requires: redhat-menus Requires: gvfs%{?_isa} @@ -122,6 +124,10 @@ rm -f %buildroot%{_datadir}/icons/hicolor/.icon-theme.cache %{_datadir}/gir-1.0/*.gir %changelog +* Mon Dec 09 2019 Leigh Scott - 4.4.1-2 +- Add patch to fix 'Don't hyphenate long filenames' +- Add patch to fix 'fix copying from the trash' + * Thu Nov 28 2019 Leigh Scott - 4.4.1-1 - Update to 4.4.1 release