nautilus r14300 - in branches/multiview: . src
- From: cneumair svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14300 - in branches/multiview: . src
- Date: Sun, 29 Jun 2008 11:28:12 +0000 (UTC)
Author: cneumair
Date: Sun Jun 29 11:28:11 2008
New Revision: 14300
URL: http://svn.gnome.org/viewvc/nautilus?rev=14300&view=rev
Log:
2008-06-29 Christian Neumair <cneumair gnome org>
* src/nautilus-window-slot.c (real_slot_info_get_current_location),
(nautilus_window_slot_info_iface_init):
Return pending location, fall back to current location. This API is
used by the side panes, we have to guarantee that a valid URI is
returned even if the view has not yet been set up.
Modified:
branches/multiview/ChangeLog
branches/multiview/src/nautilus-window-slot.c
Modified: branches/multiview/src/nautilus-window-slot.c
==============================================================================
--- branches/multiview/src/nautilus-window-slot.c (original)
+++ branches/multiview/src/nautilus-window-slot.c Sun Jun 29 11:28:11 2008
@@ -415,6 +415,26 @@
}
}
+/* returns either the pending or the actual current location - used by side panes. */
+static char *
+real_slot_info_get_current_location (NautilusWindowSlotInfo *info)
+{
+ NautilusWindowSlot *slot;
+
+ slot = NAUTILUS_WINDOW_SLOT (info);
+
+ if (slot->pending_location != NULL) {
+ return g_file_get_uri (slot->pending_location);
+ }
+
+ if (slot->location != NULL) {
+ return g_file_get_uri (slot->location);
+ }
+
+ g_assert_not_reached ();
+ return NULL;
+}
+
static void
nautilus_window_slot_dispose (GObject *object)
{
@@ -480,7 +500,7 @@
iface->inactive = nautilus_window_slot_inactive;
iface->get_window = nautilus_window_slot_get_window;
iface->get_selection_count = nautilus_window_slot_get_selection_count;
- iface->get_current_location = nautilus_window_slot_get_location_uri;
+ iface->get_current_location = real_slot_info_get_current_location;
iface->set_status = nautilus_window_slot_set_status;
iface->get_title = nautilus_window_slot_get_title;
iface->open_location = nautilus_window_slot_open_location_full;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]