[xfce4-settings] Add patch for keyboard default clearing. Fixes bug #753319
Kevin Fenzi
kevin at fedoraproject.org
Sun Feb 19 20:29:02 UTC 2012
commit 0560ed8c2634df870384441dd24ef6ed35a7f3d0
Author: Kevin Fenzi <kevin at scrye.com>
Date: Sun Feb 19 13:29:00 2012 -0700
Add patch for keyboard default clearing. Fixes bug #753319
xfce4-settings-4.8.3-clear-keyboard.patch | 43 +++++++++++++++++++++++++++++
xfce4-settings.spec | 9 +++++-
2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/xfce4-settings-4.8.3-clear-keyboard.patch b/xfce4-settings-4.8.3-clear-keyboard.patch
new file mode 100644
index 0000000..141d33d
--- /dev/null
+++ b/xfce4-settings-4.8.3-clear-keyboard.patch
@@ -0,0 +1,43 @@
+From 6d5cf80f7b7826e791d503713c965e969549ea15 Mon Sep 17 00:00:00 2001
+From: Eric Koegel <eric.koegel at gmail.com>
+Date: Sun, 12 Feb 2012 11:41:41 +0000
+Subject: Clear out all the old entries before resetting to defaults
+
+When resetting the keyboard shortcuts to their default entries we
+need to clear out all the old entires in the list to prevent
+duplicates from appearing. (Bug 8138)
+---
+diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
+index 8776a69..e8b6811 100644
+--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
++++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
+@@ -958,7 +958,9 @@ xfce_keyboard_settings_delete_button_clicked (XfceKeyboardSettings *settings)
+ static void
+ xfce_keyboard_settings_reset_button_clicked (XfceKeyboardSettings *settings)
+ {
+- gint response;
++ gint response;
++ GObject *view;
++ GtkListStore *store;
+
+ g_return_if_fail (XFCE_IS_KEYBOARD_SETTINGS (settings));
+
+@@ -971,7 +973,15 @@ xfce_keyboard_settings_reset_button_clicked (XfceKeyboardSettings *settings)
+ NULL);
+
+ if (G_LIKELY (response == GTK_RESPONSE_YES))
+- xfce_shortcuts_provider_reset_to_defaults (settings->priv->provider);
++ {
++ view = gtk_builder_get_object (GTK_BUILDER (settings), "kbd_shortcuts_view");
++
++ /* Clear out all the previous entries */
++ store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view)));
++ gtk_list_store_clear (store);
++
++ xfce_shortcuts_provider_reset_to_defaults (settings->priv->provider);
++ }
+ }
+
+
+--
+cgit v0.9.0.2
diff --git a/xfce4-settings.spec b/xfce4-settings.spec
index 8c14d55..b85cb92 100644
--- a/xfce4-settings.spec
+++ b/xfce4-settings.spec
@@ -2,7 +2,7 @@
Name: xfce4-settings
Version: 4.8.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Settings Manager for Xfce
Group: User Interface/Desktops
@@ -15,6 +15,9 @@ Patch0: xfce4-settings-4.6.0-fedora.patch
# Add patch to handle position settings on multi monitor setups
# https://bugzilla.xfce.org/show_bug.cgi?id=7465
Patch1: xfce4-settings-4.8.3-monitor-position.patch
+# Add patch to clean out old keyboard settings when you set to default.
+# https://bugzilla.redhat.com/show_bug.cgi?id=753319
+Patch2: xfce4-settings-4.8.3-clear-keyboard.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext
@@ -48,6 +51,7 @@ This package includes the settings manager applications for the Xfce desktop.
%setup -q
%patch0 -p1 -b .vendor
%patch1 -p1 -b .multi-monitor-position
+%patch2 -p1 -b .keyboard-clear
%build
# add --enable-maintainer-mode to regen after multi monitor setup patch.
@@ -90,6 +94,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/applications/xfce*.desktop
%changelog
+* Sun Feb 19 2012 Kevin Fenzi <kevin at scrye.com> - 4.8.3-4
+- Add patch for keyboard default clearing. Fixes bug #753319
+
* Sat Jan 21 2012 Kevin Fenzi <kevin at scrye.com> - 4.8.3-3
- Add patch for multi monitor position settings. Fixes bug #773780
More information about the scm-commits
mailing list