Hello community, here is the log from the commit of package thunar for openSUSE:Factory checked in at 2014-10-15 08:51:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/thunar (Old) and /work/SRC/openSUSE:Factory/.thunar.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "thunar" Changes: -------- --- /work/SRC/openSUSE:Factory/thunar/thunar.changes 2014-10-02 14:14:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.thunar.new/thunar.changes 2014-10-15 08:52:14.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Oct 14 08:16:17 UTC 2014 - g...@opensuse.org + +- add thunar-support-gtk3-bookmarks.patch in order to add support + for the GTK 3 bookmarks file (bxo#10627) +- add thunar-fix-default-application-lookup.patch in order to fix + the default application lookup with gio >= 2.41 (bxo#11212) + +------------------------------------------------------------------- New: ---- thunar-fix-default-application-lookup.patch thunar-support-gtk3-bookmarks.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ thunar.spec ++++++ --- /var/tmp/diff_new_pack.XGK6Sh/_old 2014-10-15 08:52:15.000000000 +0200 +++ /var/tmp/diff_new_pack.XGK6Sh/_new 2014-10-15 08:52:15.000000000 +0200 @@ -29,6 +29,10 @@ Source100: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM thunar-use-xdg-icon-spec-icons.patch g...@opensuse.org -- Use generic icons that conform to the XDG Icon Naming Spec Patch0: thunar-use-xdg-icon-spec-icons.patch +# PATCH-FIX-UPSTREAM thunar-support-gtk3-bookmarks.patch bxo#10627 g...@opensuse.org -- Add support for the GTK 3 bookmarks file (backported from upstream git) +Patch1: thunar-support-gtk3-bookmarks.patch +# PATCH-FIX-UPSTREAM thunar-fix-default-application-lookup.patch bxo#11212 g...@opensuse.org -- Fix the default application lookup with gio >= 2.41 +Patch2: thunar-fix-default-application-lookup.patch BuildRequires: fdupes BuildRequires: gtk-doc BuildRequires: intltool @@ -96,6 +100,8 @@ %prep %setup -q -n Thunar-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure \ ++++++ thunar-fix-default-application-lookup.patch ++++++ Index: Thunar-1.6.3/thunar/thunar-file.c =================================================================== --- Thunar-1.6.3.orig/thunar/thunar-file.c +++ Thunar-1.6.3/thunar/thunar-file.c @@ -3963,6 +3963,7 @@ thunar_file_list_get_applications (GList GList *next; GList *ap; GList *lp; + GAppInfo *default_application; const gchar *previous_type = NULL; const gchar *current_type; @@ -3981,7 +3982,25 @@ thunar_file_list_get_applications (GList /* determine the list of applications that can open this file */ if (G_UNLIKELY (current_type != NULL)) - list = g_app_info_get_all_for_type (current_type); + { + list = g_app_info_get_all_for_type (current_type); + + /* move any default application in front of the list */ + default_application = g_app_info_get_default_for_type (current_type, FALSE); + if (G_LIKELY (default_application != NULL)) + { + for (ap = list; ap != NULL; ap = ap->next) + { + if (g_app_info_equal (ap->data, default_application)) + { + g_object_unref (ap->data); + list = g_list_delete_link (list, ap); + break; + } + } + list = g_list_prepend (list, default_application); + } + } else list = NULL; ++++++ thunar-support-gtk3-bookmarks.patch ++++++ >From 6a63d7bd8ff0d937cb30f112c3fd080a5a107053 Mon Sep 17 00:00:00 2001 From: Alistair Buxton <a.j.bux...@gmail.com> Date: Wed, 12 Mar 2014 20:20:05 +0000 Subject: Add support for the GTK 3 bookmarks file (bug #10627) The changes ensure that the config directory exists before attempting to write bookmarks. It falls back to the old location to support both GTK 2 and 3. Index: Thunar-1.6.3/thunar/thunar-gio-extensions.c =================================================================== --- Thunar-1.6.3.orig/thunar/thunar-gio-extensions.c +++ Thunar-1.6.3/thunar/thunar-gio-extensions.c @@ -77,7 +77,7 @@ thunar_g_file_new_for_bookmarks (void) gchar *filename; GFile *bookmarks; - filename = g_build_filename (xfce_get_homedir (), ".gtk-bookmarks", NULL); + filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0", "bookmarks", NULL); bookmarks = g_file_new_for_path (filename); g_free (filename); Index: Thunar-1.6.3/thunar/thunar-shortcuts-model.c =================================================================== --- Thunar-1.6.3.orig/thunar/thunar-shortcuts-model.c +++ Thunar-1.6.3/thunar/thunar-shortcuts-model.c @@ -1364,6 +1364,7 @@ thunar_shortcuts_model_save (ThunarShort gchar *uri; GList *lp; GError *err = NULL; + GFile *parent = NULL; _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model)); @@ -1389,6 +1390,22 @@ thunar_shortcuts_model_save (ThunarShort } } + /* create folder if it does not exist */ + parent = g_file_get_parent (model->bookmarks_file); + if (!g_file_make_directory_with_parents (parent, NULL, &err)) + { + if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_EXISTS)) + { + g_clear_error (&err); + } + else + { + g_warning ("Failed to create bookmarks folder: %s", err->message); + g_error_free (err); + } + } + g_clear_object (&parent); + /* write data to the disk */ bookmarks_path = g_file_get_path (model->bookmarks_file); if (!g_file_set_contents (bookmarks_path, contents->str, contents->len, &err)) Index: Thunar-1.6.3/thunar/thunar-util.c =================================================================== --- Thunar-1.6.3.orig/thunar/thunar-util.c +++ Thunar-1.6.3/thunar/thunar-util.c @@ -84,6 +84,15 @@ thunar_util_load_bookmarks (GFile /* append the GTK+ bookmarks (if any) */ fp = fopen (bookmarks_path, "r"); + g_free (bookmarks_path); + + if (G_UNLIKELY (fp == NULL)) + { + bookmarks_path = g_build_filename (g_get_home_dir (), ".gtk-bookmarks", NULL); + fp = fopen(bookmarks_path, "r"); + g_free(bookmarks_path); + } + if (G_LIKELY (fp != NULL)) { while (fgets (line, sizeof (line), fp) != NULL) @@ -119,7 +128,6 @@ thunar_util_load_bookmarks (GFile fclose (fp); } - g_free (bookmarks_path); } -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org