[gtk+] Deselect all other selected items when clicking a selected one
- From: Claudio Saavedra <csaavedra src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Deselect all other selected items when clicking a selected one
- Date: Sat, 18 Apr 2009 11:51:22 -0400 (EDT)
commit a982cea9cee9f9c3357dda3d97182f495e0ec893
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sat Apr 18 18:47:07 2009 +0300
Deselect all other selected items when clicking a selected one
When clicking on an GtkIconView item inside a selection, deselect
all other selected items. (#506862)
---
gtk/gtkiconview.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 78d24d7..aa1d16e 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -2144,14 +2144,11 @@ gtk_icon_view_button_press (GtkWidget *widget,
}
else
{
- if (!item->selected)
- {
- gtk_icon_view_unselect_all_internal (icon_view);
-
- item->selected = TRUE;
- gtk_icon_view_queue_draw_item (icon_view, item);
- dirty = TRUE;
- }
+ gtk_icon_view_unselect_all_internal (icon_view);
+
+ item->selected = TRUE;
+ gtk_icon_view_queue_draw_item (icon_view, item);
+ dirty = TRUE;
}
gtk_icon_view_set_cursor_item (icon_view, item, cursor_cell);
icon_view->priv->anchor_item = item;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]