[pluma] 01/04: debian/patches: Add 0003_glib243-compat.patch. Filebrowser plugin: first connect to settings, then read them. (Closes: #780791).
Mike Gabriel
sunweaver at debian.org
Mon May 11 11:19:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository pluma.
commit 63e9160c139a6029e9ba4538284da6367da83e12
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon May 11 12:56:07 2015 +0200
debian/patches: Add 0003_glib243-compat.patch. Filebrowser plugin: first connect to settings, then read them. (Closes: #780791).
---
debian/patches/0003_glib243-compat.patch | 95 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 96 insertions(+)
diff --git a/debian/patches/0003_glib243-compat.patch b/debian/patches/0003_glib243-compat.patch
new file mode 100644
index 0000000..1e778ac
--- /dev/null
+++ b/debian/patches/0003_glib243-compat.patch
@@ -0,0 +1,95 @@
+From ffe784498722cf160a836caed201e1de4ac9fded Mon Sep 17 00:00:00 2001
+From: Monsta <monsta at inbox.ru>
+Date: Thu, 19 Mar 2015 17:24:55 +0300
+Subject: [PATCH] filebrowser plugin: first connect to settings, then read
+ them.
+
+fixes the issue with GLib >= 2.43,
+https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619
+---
+ plugins/filebrowser/pluma-file-browser-plugin.c | 54 ++++++++++++++-----------
+ 1 file changed, 30 insertions(+), 24 deletions(-)
+
+diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c
+index 030ab78..6198ea0 100644
+--- a/plugins/filebrowser/pluma-file-browser-plugin.c
++++ b/plugins/filebrowser/pluma-file-browser-plugin.c
+@@ -312,6 +312,18 @@ on_confirm_trash_changed (GSettings *settings,
+ data->confirm_trash = enable;
+ }
+
++static gboolean
++have_click_policy (void)
++{
++ GSettings *settings = g_settings_new (CAJA_SCHEMA);
++ gchar *pref = g_settings_get_string (settings, CAJA_CLICK_POLICY_KEY);
++ gboolean result = (pref != NULL);
++
++ g_free (pref);
++ g_object_unref (settings);
++ return result;
++}
++
+ static void
+ install_caja_prefs (PlumaFileBrowserPluginData *data)
+ {
+@@ -320,41 +332,35 @@ install_caja_prefs (PlumaFileBrowserPluginData *data)
+ PlumaFileBrowserViewClickPolicy policy;
+ PlumaFileBrowserView *view;
+
+- /* Get click_policy */
+- pref = g_settings_get_string (data->caja_settings, CAJA_CLICK_POLICY_KEY);
++ if (have_click_policy ()) {
++ g_signal_connect (data->caja_settings,
++ "changed::" CAJA_CLICK_POLICY_KEY,
++ G_CALLBACK (on_click_policy_changed),
++ data);
++ }
++
++ g_signal_connect (data->caja_settings,
++ "changed::" CAJA_ENABLE_DELETE_KEY,
++ G_CALLBACK (on_enable_delete_changed),
++ data);
+
++ g_signal_connect (data->caja_settings,
++ "changed::" CAJA_CONFIRM_TRASH_KEY,
++ G_CALLBACK (on_confirm_trash_changed),
++ data);
++
++ pref = g_settings_get_string (data->caja_settings, CAJA_CLICK_POLICY_KEY);
+ policy = click_policy_from_string (pref);
++ g_free (pref);
+
+ view = pluma_file_browser_widget_get_browser_view (data->tree_widget);
+ pluma_file_browser_view_set_click_policy (view, policy);
+
+- if (pref) {
+- g_signal_connect (data->caja_settings,
+- "changed::" CAJA_CLICK_POLICY_KEY,
+- G_CALLBACK (on_click_policy_changed),
+- data);
+- g_free (pref);
+- }
+-
+- /* Get enable_delete */
+ prefb = g_settings_get_boolean (data->caja_settings, CAJA_ENABLE_DELETE_KEY);
+-
+ g_object_set (G_OBJECT (data->tree_widget), "enable-delete", prefb, NULL);
+
+- g_signal_connect (data->caja_settings,
+- "changed::" CAJA_ENABLE_DELETE_KEY,
+- G_CALLBACK (on_enable_delete_changed),
+- data);
+-
+- /* Get confirm_trash */
+ prefb = g_settings_get_boolean (data->caja_settings, CAJA_CONFIRM_TRASH_KEY);
+-
+ data->confirm_trash = prefb;
+-
+- g_signal_connect (data->caja_settings,
+- "changed::" CAJA_CONFIRM_TRASH_KEY,
+- G_CALLBACK (on_confirm_trash_changed),
+- data);
+ }
+
+ static void
diff --git a/debian/patches/series b/debian/patches/series
index fa763c3..df40fd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
0002_use-zenity-instead-of-mate-dialogs.patch
+0003_glib243-compat.patch
2001_fix-man-page-errors.patch
2002_omit-gfdl-licensed-help-files.patch
2003_omit-non-linux-build-files.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/pluma.git
More information about the pkg-mate-commits
mailing list