[nautilus/places-sidebar: 3/6] Implement the location-selected handler for GtkPlacesSidebar
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/places-sidebar: 3/6] Implement the location-selected handler for GtkPlacesSidebar
- Date: Tue, 23 Oct 2012 00:02:18 +0000 (UTC)
commit 588b891be5e9670443f3d8380b494e0e494a3a96
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Oct 22 18:35:08 2012 -0500
Implement the location-selected handler for GtkPlacesSidebar
Signed-off-by: Federico Mena Quintero <federico gnome org>
src/nautilus-window.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index b3a0a85..5112d7c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -556,7 +556,25 @@ places_sidebar_location_selected_cb (GtkPlacesSidebar *sidebar,
GtkPlacesOpenMode open_mode,
gpointer user_data)
{
- /* FIXME */
+ NautilusWindow *window = NAUTILUS_WINDOW (user_data);
+ NautilusWindowOpenFlags flags;
+
+ switch (open_mode) {
+ case GTK_PLACES_OPEN_MODE_NEW_TAB:
+ flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB;
+ break;
+
+ case GTK_PLACES_OPEN_MODE_NEW_WINDOW:
+ flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW;
+ break;
+
+ case GTK_PLACES_OPEN_MODE_NORMAL: /* fall-through */
+ default:
+ flags = 0;
+ break;
+ }
+
+ nautilus_window_slot_open_location (window->details->active_slot, location, flags);
}
/* Callback used when the places sidebar needs us to show the file properties dialog */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]