[gnome-boxes] collection-view: activate item from search result (regression)
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] collection-view: activate item from search result (regression)
- Date: Fri, 24 Aug 2012 15:30:29 +0000 (UTC)
commit c75dce2cd78e5bcd83429e92868d076614d5da52
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date: Fri Aug 24 17:20:29 2012 +0200
collection-view: activate item from search result (regression)
Restore silently drop item-activated handler.
Solve regression introduced in "Use GdMainIconView instead of
GtkIconView", https://bugzilla.gnome.org/show_bug.cgi?id=681911
src/collection-view.vala | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/collection-view.vala b/src/collection-view.vala
index d4a4c33..6e5b9d1 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -369,6 +369,11 @@ private class Boxes.CollectionView: Boxes.UI {
icon_view.get_style_context ().add_class ("boxes-icon-view");
icon_view.button_press_event.connect (on_button_press_event);
icon_view.button_release_event.connect (on_button_release_event);
+ icon_view_activate_on_single_click (icon_view, true);
+ icon_view.item_activated.connect ((view, path) => {
+ var item = get_item_for_path (path);
+ App.app.select_item (item);
+ });
var scrolled_window = new Gtk.ScrolledWindow (null, null);
// TODO: this should be set, but doesn't resize correctly the gtkactor..
@@ -426,8 +431,8 @@ private class Boxes.CollectionView: Boxes.UI {
if (App.app.selection_mode)
return on_button_release_selection_mode (event, entered_mode, path);
- else
- return on_button_release_view_mode (event, path);
+
+ return false;
}
private bool on_button_release_selection_mode (Gdk.EventButton event, bool entered_mode, Gtk.TreePath path) {
@@ -448,12 +453,4 @@ private class Boxes.CollectionView: Boxes.UI {
return false;
}
-
- private bool on_button_release_view_mode (Gdk.EventButton event, Gtk.TreePath path) {
- var item = get_item_for_path (path);
- if (item != null)
- App.app.select_item (item);
-
- return false;
- }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]