rpms/control-center/F-12 keybinding-bugs.patch, NONE, 1.1 control-center.spec, 1.495, 1.496

Matthias Clasen mclasen at fedoraproject.org
Sat Oct 3 02:23:54 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/control-center/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27856

Modified Files:
	control-center.spec 
Added Files:
	keybinding-bugs.patch 
Log Message:
fix logic errors in the keybinding capplet


keybinding-bugs.patch:
 gnome-keybinding-properties.c |   25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

--- NEW FILE keybinding-bugs.patch ---
>From e0c60bbd3064a67b975d92adc417878ea8949c95 Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell at canonical.com>
Date: Thu, 1 Oct 2009 12:45:25 +1000
Subject: [PATCH] Fix broken logic in keybinding tree model

---
 capplets/keybindings/gnome-keybinding-properties.c |   24 ++++++++-----------
 1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/capplets/keybindings/gnome-keybinding-properties.c b/capplets/keybindings/gnome-keybinding-properties.c
index 6e36e34..0b62f8c 100644
--- a/capplets/keybindings/gnome-keybinding-properties.c
+++ b/capplets/keybindings/gnome-keybinding-properties.c
@@ -522,11 +522,10 @@ find_section (GtkTreeModel *model,
               GtkTreeIter  *iter,
 	      const char   *title)
 {
-  gboolean success, found;
+  gboolean success;
 
-  found = FALSE;
   success = gtk_tree_model_get_iter_first (model, iter);
-  while (success && !found)
+  while (success)
     {
       char *description = NULL;
 
@@ -534,16 +533,15 @@ find_section (GtkTreeModel *model,
 			  DESCRIPTION_COLUMN, &description,
 			  -1);
 
-      found = (g_strcmp0 (description, title) == 0);
+      if (g_strcmp0 (description, title) == 0)
+        return;
       success = gtk_tree_model_iter_next (model, iter);
     }
-  if (!found)
-    {
-      gtk_tree_store_append (GTK_TREE_STORE (model), iter, NULL);
-      gtk_tree_store_set (GTK_TREE_STORE (model), iter,
-			  DESCRIPTION_COLUMN, title,
-			  -1);
-    }
+
+    gtk_tree_store_append (GTK_TREE_STORE (model), iter, NULL);
+    gtk_tree_store_set (GTK_TREE_STORE (model), iter,
+                        DESCRIPTION_COLUMN, title,
+                        -1);
 }
 
 static void
@@ -555,7 +553,6 @@ append_keys_to_tree (GtkBuilder         *builder,
   GtkTreeIter parent_iter, iter;
   GtkTreeModel *model;
   gint i, j;
-  gint rows_before;
 
   client = gconf_client_get_default ();
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (gtk_builder_get_object (builder, "shortcut_treeview")));
@@ -571,7 +568,6 @@ append_keys_to_tree (GtkBuilder         *builder,
    * then we need to scroll now */
   ensure_scrollbar (builder, i - 1);
 
-  rows_before = i;
   for (j = 0; keys_list[j].name != NULL; j++)
     {
       GConfEntry *entry;
@@ -689,7 +685,7 @@ append_keys_to_tree (GtkBuilder         *builder,
   g_object_unref (client);
 
   /* Don't show an empty section */
-  if (i == rows_before)
+  if (gtk_tree_model_iter_n_children (model, &parent_iter) == 0)
     gtk_tree_store_remove (GTK_TREE_STORE (model), &parent_iter);
 
   if (i == 0)
-- 
1.6.3.3



Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/F-12/control-center.spec,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -p -r1.495 -r1.496
--- control-center.spec	2 Oct 2009 05:12:39 -0000	1.495
+++ control-center.spec	3 Oct 2009 02:23:53 -0000	1.496
@@ -24,7 +24,7 @@
 Summary: Utilities to configure the GNOME desktop
 Name: control-center
 Version: 2.28.0
-Release: 13%{?dist}
+Release: 14%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 Group: User Interface/Desktops
@@ -64,6 +64,9 @@ Patch51: mirror-crash.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=597066
 Patch52: shell-markup.patch
 
+# https://bugzilla.gnome.org/show_bug.cgi?id=596939
+Patch53: keybinding-bugs.patch
+
 # call the Fedora/RHEL graphical passwd changing apps
 Patch95: gnome-control-center-2.25.2-passwd.patch
 Patch96: gnome-control-center-2.25.2-gecos.patch
@@ -200,6 +203,7 @@ for the GNOME desktop.
 %patch50 -p1 -b .fix-background-tooltips
 %patch51 -p1 -b .mirror-crash
 %patch52 -p1 -b .shell-markup
+%patch53 -p1 -b .keybinding-bugs
 
 # vendor configuration patches
 %patch95 -p1 -b .passwd
@@ -390,6 +394,10 @@ fi
 
 
 %changelog
+* Fri Oct  2 2009 Matthias Clasen <mclasen at redhat.com> 2.28.0-14
+- Fix some logic errors in the keybinding capplet that can lead
+  to missing entries
+
 * Fri Oct  2 2009 Matthias Clasen <mclasen at redhat.com> 2.28.0-13
 - Don't show markup in the UI
 




More information about the fedora-extras-commits mailing list