[gtk+/wip/csoriano/bookmarks: 4/4] gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE



commit 7f614eb0adc214bb7b6692922ccb2a97b6503dfa
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed May 27 16:19:23 2015 +0200

    gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE
    
    Even using GTK_SELECTION_BROWSE we expect to sometimes not having
    selected any row, as the docs says, when i.e. searching or so.
    What is enforced is that from any user interaction, only one row can be
    selected at once.
    But we could allow applications to unselect all rows, for cases when
    the application needs to show that something inside the application
    invalidated the selection (like when searching, etc).
    
    For user interactions the *_internal methods are used, so it's enough
    to remove the check in the public function without affecting the
    internal behavior.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749970

 gtk/gtklistbox.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 554cd42..b3c9d76 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -795,9 +795,6 @@ gtk_list_box_unselect_all (GtkListBox *box)
 
   g_return_if_fail (GTK_IS_LIST_BOX (box));
 
-  if (BOX_PRIV (box)->selection_mode == GTK_SELECTION_BROWSE)
-    return;
-
   dirty = gtk_list_box_unselect_all_internal (box);
 
   if (dirty)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]