From 6c1a07fb211a67dc5a5bbd21b5e6aabb31e2ef6c Mon Sep 17 00:00:00 2001 From: misaka00251 Date: Fri, 3 Feb 2023 15:52:32 +0800 Subject: [PATCH] Revert avoid saving duplicate command changes --- revert-avoid-saving-duplicate-command.patch | 31 +++++++++++++++++++++ xfce4-appfinder.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 revert-avoid-saving-duplicate-command.patch diff --git a/revert-avoid-saving-duplicate-command.patch b/revert-avoid-saving-duplicate-command.patch new file mode 100644 index 0000000..9f8ab78 --- /dev/null +++ b/revert-avoid-saving-duplicate-command.patch @@ -0,0 +1,31 @@ +diff --git a/src/appfinder-model.c b/src/appfinder-model.c +index 9357fc9..b10490a 100644 +--- a/src/appfinder-model.c ++++ b/src/appfinder-model.c +@@ -917,17 +917,6 @@ xfce_appfinder_model_item_compare (gconstpointer a, + + + +-static gint +-xfce_appfinder_model_item_compare_command (gconstpointer a, +- gconstpointer b) +-{ +- const ModelItem *item_a = a, *item_b = b; +- +- return g_utf8_collate (item_a->command, item_b->command); +-} +- +- +- + static gchar * + xfce_appfinder_model_item_key (GarconMenuItem *item) + { +@@ -1188,7 +1177,7 @@ xfce_appfinder_model_history_insert (XfceAppfinderModel *model, + /* add new command */ + item = g_slice_new0 (ModelItem); + item->command = g_strdup (command); +- if (g_slist_find_custom (model->items, item, xfce_appfinder_model_item_compare_command) != NULL) ++ if (g_slist_find_custom (model->items, item, xfce_appfinder_model_item_compare) != NULL) + { + APPFINDER_DEBUG ("Skip adding %s to the model as it's already contained.", command); + g_slice_free (ModelItem, item); diff --git a/xfce4-appfinder.spec b/xfce4-appfinder.spec index 315142f..47ed591 100644 --- a/xfce4-appfinder.spec +++ b/xfce4-appfinder.spec @@ -2,7 +2,7 @@ Name: xfce4-appfinder Version: 4.18.0 -Release: 2 +Release: 3 Summary: Appfinder for the Xfce4 Desktop Environment License: GPLv2+ @@ -10,6 +10,7 @@ URL: http://www.xfce.org/ Source0: http://archive.xfce.org/src/xfce/%{name}/%{xfceversion}/%{name}-%{version}.tar.bz2 Patch0: use-correct-model-when-running-from-commands-history.patch +Patch1: revert-avoid-saving-duplicate-command.patch BuildRequires: make BuildRequires: gcc-c++ @@ -30,6 +31,7 @@ xfce-appfinder shows system wide installed applications. %prep %setup -q %patch0 -p1 +%patch1 -p1 # fix icon problems - GTK-3.10+ sed -i 's/gtk-find/edit-find/g' data/xfce4-appfinder.desktop.in @@ -62,6 +64,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.xfce.%{nam %{_metainfodir}/org.xfce.%{name}.appdata.xml %changelog +* Fri Feb 03 2023 misaka00251 - 4.18.0-3 +- Revert avoid saving duplicate command changes + * Fri Jan 13 2023 misaka00251 - 4.18.0-2 - Add upstream patch to fix command history segmentation fault