This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/gedit.git#e88e71c7576e4de75a258d0567e371031a6ee315
101 lines
3.2 KiB
Diff
101 lines
3.2 KiB
Diff
From 8f6490c602991a456413e0053429bb7b4c70d4b6 Mon Sep 17 00:00:00 2001
|
|
From: Zander Brown <zbrown@gnome.org>
|
|
Date: Thu, 11 Feb 2021 10:26:55 +0000
|
|
Subject: [PATCH] file-browser: drop use of confirm-trash
|
|
|
|
Nautilus has removed their key as it was being (ab)used by other apps:
|
|
https://gitlab.gnome.org/GNOME/nautilus/-/commit/e96aac1f6526f5373405e071703b5f18b0c728d3
|
|
|
|
This then caused gedit to crash on launch as the plug-in is enabled by
|
|
default:
|
|
https://gitlab.gnome.org/GNOME/gedit/-/issues/408
|
|
|
|
Fix #408 by simply assuming the default value of the key
|
|
---
|
|
.../filebrowser/gedit-file-browser-plugin.c | 32 -------------------
|
|
1 file changed, 32 deletions(-)
|
|
|
|
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
|
|
index 2e8e13e7f..983e5de74 100644
|
|
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
|
|
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
|
|
@@ -50,7 +50,6 @@
|
|
#define NAUTILUS_BASE_SETTINGS "org.gnome.nautilus.preferences"
|
|
#define NAUTILUS_FALLBACK_SETTINGS "org.gnome.gedit.plugins.filebrowser.nautilus"
|
|
#define NAUTILUS_CLICK_POLICY_KEY "click-policy"
|
|
-#define NAUTILUS_CONFIRM_TRASH_KEY "confirm-trash"
|
|
|
|
#define TERMINAL_BASE_SETTINGS "org.gnome.desktop.default-applications.terminal"
|
|
#define TERMINAL_EXEC_KEY "exec"
|
|
@@ -66,10 +65,8 @@ struct _GeditFileBrowserPluginPrivate
|
|
GeditFileBrowserWidget *tree_widget;
|
|
gboolean auto_root;
|
|
gulong end_loading_handle;
|
|
- gboolean confirm_trash;
|
|
|
|
guint click_policy_handle;
|
|
- guint confirm_trash_handle;
|
|
};
|
|
|
|
enum
|
|
@@ -321,14 +318,6 @@ on_click_policy_changed (GSettings *settings,
|
|
gedit_file_browser_view_set_click_policy (view, policy);
|
|
}
|
|
|
|
-static void
|
|
-on_confirm_trash_changed (GSettings *settings,
|
|
- const gchar *key,
|
|
- GeditFileBrowserPlugin *plugin)
|
|
-{
|
|
- plugin->priv->confirm_trash = g_settings_get_boolean (settings, key);
|
|
-}
|
|
-
|
|
static void
|
|
install_nautilus_prefs (GeditFileBrowserPlugin *plugin)
|
|
{
|
|
@@ -349,18 +338,6 @@ install_nautilus_prefs (GeditFileBrowserPlugin *plugin)
|
|
"changed::" NAUTILUS_CLICK_POLICY_KEY,
|
|
G_CALLBACK (on_click_policy_changed),
|
|
plugin);
|
|
-
|
|
- /* Get confirm_trash */
|
|
- prefb = g_settings_get_boolean (priv->nautilus_settings,
|
|
- NAUTILUS_CONFIRM_TRASH_KEY);
|
|
-
|
|
- priv->confirm_trash = prefb;
|
|
-
|
|
- priv->confirm_trash_handle =
|
|
- g_signal_connect (priv->nautilus_settings,
|
|
- "changed::" NAUTILUS_CONFIRM_TRASH_KEY,
|
|
- G_CALLBACK (on_confirm_trash_changed),
|
|
- plugin);
|
|
}
|
|
|
|
static void
|
|
@@ -588,12 +565,6 @@ gedit_file_browser_plugin_deactivate (GeditWindowActivatable *activatable)
|
|
priv->click_policy_handle);
|
|
}
|
|
|
|
- if (priv->confirm_trash_handle)
|
|
- {
|
|
- g_signal_handler_disconnect (priv->nautilus_settings,
|
|
- priv->confirm_trash_handle);
|
|
- }
|
|
-
|
|
panel = gedit_window_get_side_panel (priv->window);
|
|
gtk_container_remove (GTK_CONTAINER (panel), GTK_WIDGET (priv->tree_widget));
|
|
}
|
|
@@ -932,9 +903,6 @@ on_confirm_delete_cb (GeditFileBrowserWidget *widget,
|
|
gchar *secondary;
|
|
gboolean result;
|
|
|
|
- if (!priv->confirm_trash)
|
|
- return TRUE;
|
|
-
|
|
if (paths->next == NULL)
|
|
{
|
|
normal = get_filename_from_path (GTK_TREE_MODEL (store), (GtkTreePath *)(paths->data));
|
|
--
|
|
GitLab
|
|
|