[arch-commits] Commit in thunar/trunk (PKGBUILD thunar-bz15200.patch)
Evangelos Foutras
foutrelis at archlinux.org
Sat May 18 06:18:31 UTC 2019
Date: Saturday, May 18, 2019 @ 06:18:31
Author: foutrelis
Revision: 353559
upgpkg: thunar 1.8.5-1
New upstream release.
Modified:
thunar/trunk/PKGBUILD
thunar/trunk/thunar-bz15200.patch
----------------------+
PKGBUILD | 8 -
thunar-bz15200.patch | 203 -------------------------------------------------
2 files changed, 5 insertions(+), 206 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-05-17 20:06:05 UTC (rev 353558)
+++ PKGBUILD 2019-05-18 06:18:31 UTC (rev 353559)
@@ -2,8 +2,8 @@
# Contributor: Andrew Simmons <andrew.simmons at gmail.com>
pkgname=thunar
-pkgver=1.8.4
-pkgrel=2
+pkgver=1.8.5
+pkgrel=1
pkgdesc="Modern file manager for Xfce"
arch=('x86_64')
url="https://docs.xfce.org/xfce/thunar/start"
@@ -21,9 +21,9 @@
source=(https://archive.xfce.org/src/xfce/$pkgname/${pkgver%.*}/Thunar-$pkgver.tar.bz2
thunar-bz14946.patch
thunar-bz15200.patch)
-sha256sums=('c2bf51da8ddec8f642d67818184ada2ca6e143151e6a45563991db73387a93b0'
+sha256sums=('caeecb82b33057bbec24164bbd47ef84bec927149daeac3bcad72499a4f92e4a'
'749881ff877d05c442db05b4724ef8847198c136d73615c9492acd4ec3f4a967'
- 'f504f75b025ee8e2b092c92951bcf8e6720ea187e168847f4d0edc18a52fb258')
+ '262a64edf64e0070c1a189368c2b1c2929ed0b8566a1bc74f6042b6c54d21941')
prepare() {
cd "$srcdir/Thunar-$pkgver"
Modified: thunar-bz15200.patch
===================================================================
--- thunar-bz15200.patch 2019-05-17 20:06:05 UTC (rev 353558)
+++ thunar-bz15200.patch 2019-05-18 06:18:31 UTC (rev 353559)
@@ -1,7 +1,7 @@
From 03b8362dd9946fa4593497672ef4f341330170ed Mon Sep 17 00:00:00 2001
From: Andre Miranda <andreldm at xfce.org>
Date: Sun, 14 Apr 2019 15:06:35 -0300
-Subject: [PATCH 1/2] Job is now optional for thunar_io_scan_directory
+Subject: [PATCH] Job is now optional for thunar_io_scan_directory
---
thunar/thunar-io-scan-directory.c | 22 +++++++++++-----------
@@ -78,204 +78,3 @@
{
g_propagate_error (error, err);
thunar_g_file_list_free (files);
-
-From 6f980dbd6fed2b471d9fb9c7e1dd11d95b502150 Mon Sep 17 00:00:00 2001
-From: Andre Miranda <andreldm at xfce.org>
-Date: Sun, 14 Apr 2019 15:08:40 -0300
-Subject: [PATCH 2/2] Load templates synchronously (Bug #15200)
-
----
- thunar/thunar-templates-action.c | 95 ++++++++++++++++----------------
- 1 file changed, 46 insertions(+), 49 deletions(-)
-
-diff --git a/thunar/thunar-templates-action.c b/thunar/thunar-templates-action.c
-index 42118ae32..35df13d18 100644
---- a/thunar/thunar-templates-action.c
-+++ b/thunar/thunar-templates-action.c
-@@ -25,8 +25,7 @@
- #include <gio/gio.h>
-
- #include <thunar/thunar-icon-factory.h>
--#include <thunar/thunar-job.h>
--#include <thunar/thunar-misc-jobs.h>
-+#include <thunar/thunar-io-scan-directory.h>
- #include <thunar/thunar-private.h>
- #include <thunar/thunar-templates-action.h>
- #include <thunar/thunar-util.h>
-@@ -44,7 +43,7 @@ enum
-
- static void thunar_templates_action_finalize (GObject *object);
- static GtkWidget *thunar_templates_action_create_menu_item (GtkAction *action);
--static void thunar_templates_action_menu_shown (GtkWidget *menu,
-+static void thunar_templates_action_load (GtkWidget *menu,
- ThunarTemplatesAction *templates_action);
-
-
-@@ -167,9 +166,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
-
- /* associate an empty submenu with the item (will be filled when shown) */
- menu = gtk_menu_new ();
-- g_signal_connect (G_OBJECT (menu), "show", G_CALLBACK (thunar_templates_action_menu_shown), action);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu);
-
-+ thunar_templates_action_load (menu, THUNAR_TEMPLATES_ACTION (action));
-+
- return item;
- }
-
-@@ -310,14 +310,13 @@ compare_files (ThunarFile *a,
-
-
- static gboolean
--thunar_templates_action_files_ready (ThunarJob *job,
-- GList *files,
-- ThunarTemplatesAction *templates_action)
-+thunar_templates_action_set_files (GtkWidget *menu,
-+ GList *files,
-+ ThunarTemplatesAction *templates_action)
- {
- ThunarIconFactory *icon_factory;
- ThunarFile *file;
- GdkPixbuf *icon;
-- GtkWidget *menu;
- GtkWidget *parent_menu;
- GtkWidget *submenu;
- GtkWidget *image;
-@@ -331,9 +330,6 @@ thunar_templates_action_files_ready (ThunarJob *job,
- gchar *label;
- gchar *dot;
-
-- /* determine the menu to add the items and submenus to */
-- menu = g_object_get_data (G_OBJECT (job), "menu");
--
- /* do nothing if there is no menu */
- if (menu == NULL)
- return FALSE;
-@@ -447,26 +443,21 @@ G_GNUC_END_IGNORE_DEPRECATIONS
-
-
- static void
--thunar_templates_action_load_error (ThunarJob *job,
-- GError *error,
-- ThunarTemplatesAction *templates_action)
-+thunar_templates_action_set_error (GtkWidget *menu,
-+ const gchar *error_message,
-+ ThunarTemplatesAction *templates_action)
- {
- GtkWidget *item;
-- GtkWidget *menu;
- GList *menu_children = NULL;
-
-- _thunar_return_if_fail (THUNAR_IS_JOB (job));
-- _thunar_return_if_fail (error != NULL);
-+ _thunar_return_if_fail (error_message != NULL);
- _thunar_return_if_fail (THUNAR_IS_TEMPLATES_ACTION (templates_action));
-- _thunar_return_if_fail (templates_action->job == job);
--
-- menu = g_object_get_data (G_OBJECT (job), "menu");
-
- /* check if any items were added to the menu */
- if (G_LIKELY (menu != NULL && (menu_children = gtk_container_get_children( GTK_CONTAINER (menu))) == NULL))
- {
- /* tell the user that no templates were found */
-- item = gtk_menu_item_new_with_label (error->message);
-+ item = gtk_menu_item_new_with_label (error_message);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_set_sensitive (item, FALSE);
- gtk_widget_show (item);
-@@ -478,17 +469,13 @@ thunar_templates_action_load_error (ThunarJob *job,
-
-
- static void
--thunar_templates_action_load_finished (ThunarJob *job,
-+thunar_templates_action_load_finished (GtkWidget *menu,
- ThunarTemplatesAction *templates_action)
- {
- GtkWidget *item;
-- GtkWidget *menu;
-
-- _thunar_return_if_fail (THUNAR_IS_JOB (job));
- _thunar_return_if_fail (THUNAR_IS_TEMPLATES_ACTION (templates_action));
-- _thunar_return_if_fail (templates_action->job == job);
-
-- menu = g_object_get_data (G_OBJECT (job), "menu");
- if (G_LIKELY (menu != NULL))
- {
- /* append a menu separator */
-@@ -503,43 +490,53 @@ thunar_templates_action_load_finished (ThunarJob *job,
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
--
-- g_signal_handlers_disconnect_matched (job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL,
-- templates_action);
-- g_object_unref (job);
- }
-
-
-
- static void
--thunar_templates_action_menu_shown (GtkWidget *menu,
-- ThunarTemplatesAction *templates_action)
-+thunar_templates_action_load (GtkWidget *menu,
-+ ThunarTemplatesAction *templates_action)
- {
-- GList *children;
-+ GList *files = NULL;
-+ GFile *home_dir;
-+ GFile *templates_dir;
-+ const gchar *path;
-
- _thunar_return_if_fail (THUNAR_IS_TEMPLATES_ACTION (templates_action));
- _thunar_return_if_fail (GTK_IS_MENU_SHELL (menu));
-
-- /* drop all existing children of the menu first */
-- children = gtk_container_get_children (GTK_CONTAINER (menu));
-- g_list_free_full (children, (GDestroyNotify) gtk_widget_destroy);
-+ home_dir = thunar_g_file_new_for_home ();
-+ path = g_get_user_special_dir (G_USER_DIRECTORY_TEMPLATES);
-+
-+ if (G_LIKELY (path != NULL))
-+ templates_dir = g_file_new_for_path (path);
-+ else
-+ templates_dir = g_file_resolve_relative_path (home_dir, "Templates");
-
-- if (G_LIKELY (templates_action->job == NULL))
-+ if (G_LIKELY (!g_file_equal (templates_dir, home_dir)))
- {
-- templates_action->job = thunar_misc_jobs_load_template_files (menu);
-- g_object_add_weak_pointer (G_OBJECT (templates_action->job),
-- (gpointer) &templates_action->job);
-+ /* load the ThunarFiles */
-+ files = thunar_io_scan_directory (NULL, templates_dir,
-+ G_FILE_QUERY_INFO_NONE,
-+ TRUE, FALSE, TRUE, NULL);
-+ }
-
-- g_signal_connect (templates_action->job, "files-ready",
-- G_CALLBACK (thunar_templates_action_files_ready),
-- templates_action);
-- g_signal_connect (templates_action->job, "error",
-- G_CALLBACK (thunar_templates_action_load_error),
-- templates_action);
-- g_signal_connect (templates_action->job, "finished",
-- G_CALLBACK (thunar_templates_action_load_finished),
-- templates_action);
-+ g_object_unref (templates_dir);
-+ g_object_unref (home_dir);
-+
-+ if (files == NULL)
-+ {
-+ thunar_templates_action_set_error (menu, _("No templates installed"),
-+ templates_action);
- }
-+ else
-+ {
-+ thunar_templates_action_set_files (menu, files, templates_action);
-+ thunar_g_file_list_free (files);
-+ }
-+
-+ thunar_templates_action_load_finished (menu, templates_action);
- }
-
-
More information about the arch-commits
mailing list