diff --git a/0001-Make-the-Don-t-ask-again-checkbox-work-properly.patch b/0001-Make-the-Don-t-ask-again-checkbox-work-properly.patch deleted file mode 100644 index ba59170..0000000 --- a/0001-Make-the-Don-t-ask-again-checkbox-work-properly.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 9c19d7fedadf38cc4fec21efdb3908572448f658 Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Thu, 30 May 2013 19:21:11 -0400 -Subject: [PATCH] Make the 'Don't ask again' checkbox work properly - -We used to remove the user-dirs.locale file when this is checked, -but that prevents xdg-user-dirs-gtk-update from ever running again. -Instead, update it with the current locale. This has the effect -of keeping xdg-user-dirs-gtk-update from running until the locale -changes again, which is probably closer to the intended effect. - -https://bugzilla.redhat.com/show_bug.cgi?id=968955 ---- - update.c | 40 +++++++++++++++++++++++++++++++--------- - 1 file changed, 31 insertions(+), 9 deletions(-) - -diff --git a/update.c b/update.c -index 4697913..8710c79 100644 ---- a/update.c -+++ b/update.c -@@ -48,12 +48,40 @@ has_xdg_translation (void) - if (strncmp (locale, "en_US", 5) == 0 || - strcmp (locale, "C") == 0) - return TRUE; -- -+ - str = "Desktop"; - return dgettext ("xdg-user-dirs", str) != str; - } - - static void -+save_locale (void) -+{ -+ FILE *file; -+ char *user_locale_file; -+ char *locale, *dot; -+ -+ user_locale_file = g_build_filename (g_get_user_config_dir (), -+ "user-dirs.locale", NULL); -+ file = fopen (user_locale_file, "w"); -+ g_free (user_locale_file); -+ -+ if (file == NULL) -+ { -+ fprintf (stderr, "Can't save user-dirs.locale\n"); -+ return; -+ } -+ -+ locale = g_strdup (setlocale (LC_MESSAGES, NULL)); -+ /* Skip encoding part */ -+ dot = strchr (locale, '.'); -+ if (dot) -+ *dot = 0; -+ fprintf (file, "%s", locale); -+ g_free (locale); -+ fclose (file); -+} -+ -+static void - update_locale (XdgDirEntry *old_entries) - { - XdgDirEntry *new_entries, *entry; -@@ -91,10 +119,9 @@ update_locale (XdgDirEntry *old_entries) - g_free (std_out); - g_free (std_err); - g_free (cmdline); -- - if (!WIFEXITED(exit_status) || WEXITSTATUS(exit_status) != 0) - return; -- -+ - new_entries = parse_xdg_dirs (filename); - g_unlink (filename); - g_free (filename); -@@ -254,12 +281,7 @@ update_locale (XdgDirEntry *old_entries) - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check))) - { -- char *file; -- -- file = g_build_filename (g_get_user_config_dir (), -- "user-dirs.locale", NULL); -- g_unlink (file); -- g_free (file); -+ save_locale (); - } - - g_free (new_entries); --- -1.8.2.1 - diff --git a/show-in-mate.patch b/show-in-mate.patch new file mode 100644 index 0000000..7c2d203 --- /dev/null +++ b/show-in-mate.patch @@ -0,0 +1,12 @@ +diff -up xdg-user-dirs-gtk-0.10/user-dirs-update-gtk.desktop.in.mate xdg-user-dirs-gtk-0.10/user-dirs-update-gtk.desktop.in +--- xdg-user-dirs-gtk-0.10/user-dirs-update-gtk.desktop.in.mate 2014-01-27 19:09:55.954616086 -0500 ++++ xdg-user-dirs-gtk-0.10/user-dirs-update-gtk.desktop.in 2014-01-27 19:10:02.965602005 -0500 +@@ -4,7 +4,7 @@ Exec=xdg-user-dirs-gtk-update + _Name=User folders update + _Comment=Update common folders names to match current locale + Terminal=false +-OnlyShowIn=GNOME;LXDE;Unity; ++OnlyShowIn=GNOME;LXDE;Unity;MATE; + Type=Application + StartupNotify=false + X-KDE-autostart-after=panel diff --git a/xdg-user-dirs-gtk-0.10.tar.xz b/xdg-user-dirs-gtk-0.10.tar.xz deleted file mode 100644 index 7354888..0000000 Binary files a/xdg-user-dirs-gtk-0.10.tar.xz and /dev/null differ diff --git a/xdg-user-dirs-gtk-0.11.tar.xz b/xdg-user-dirs-gtk-0.11.tar.xz new file mode 100644 index 0000000..e24b1fe Binary files /dev/null and b/xdg-user-dirs-gtk-0.11.tar.xz differ diff --git a/xdg-user-dirs-gtk.spec b/xdg-user-dirs-gtk.spec index c6a1297..53bc707 100644 --- a/xdg-user-dirs-gtk.spec +++ b/xdg-user-dirs-gtk.spec @@ -1,11 +1,12 @@ Name: xdg-user-dirs-gtk -Version: 0.10 -Release: 17 +Version: 0.11 +Release: 1 Summary: Integrated tools for gnome to help manage directories License: GPL+ URL: http://freedesktop.org/wiki/Software/xdg-user-dirs Source0: http://download.gnome.org/sources/xdg-user-dirs-gtk/%{version}/%{name}-%{version}.tar.xz -Patch001: 0001-Make-the-Don-t-ask-again-checkbox-work-properly.patch +Patch0: show-in-mate.patch + BuildRequires: desktop-file-utils gettext gtk3-devel intltool xdg-user-dirs gcc Requires: xdg-user-dirs @@ -32,6 +33,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/user-dirs-upda %config(noreplace) %{_sysconfdir}/xdg/autostart/user-dirs-update-gtk.desktop %changelog +* Fri Mar 17 2023 Li Long - 0.11-1 +- Upgrade to 0.11 + * Mon May 31 2021 huanghaitao - 0.10-17 - Completing build dependencies to fix gcc compiler missing error