Commit 2126560b authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Add nautilus_window_slot_info_get_window() for getting current

2008-07-13  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-window-slot-info.c
	(nautilus_window_slot_info_get_current_view):
	* libnautilus-private/nautilus-window-slot-info.h:
	* src/nautilus-window-slot.c (real_slot_info_get_current_view),
	(nautilus_window_slot_info_iface_init):
	Add nautilus_window_slot_info_get_window()
	for getting current NautilusView (one ref count added).

svn path=/trunk/; revision=14354
parent 5ebe5458
2008-07-13 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-window-slot-info.c
(nautilus_window_slot_info_get_current_view):
* libnautilus-private/nautilus-window-slot-info.h:
* src/nautilus-window-slot.c (real_slot_info_get_current_view),
(nautilus_window_slot_info_iface_init):
Add nautilus_window_slot_info_get_window()
for getting current NautilusView (one ref count added).
2008-07-12 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-container.c
......
......@@ -129,6 +129,14 @@ nautilus_window_slot_info_get_current_location (NautilusWindowSlotInfo *slot)
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_current_location) (slot);
}
NautilusView *
nautilus_window_slot_info_get_current_view (NautilusWindowSlotInfo *slot)
{
g_assert (NAUTILUS_IS_WINDOW_SLOT_INFO (slot));
return (* NAUTILUS_WINDOW_SLOT_INFO_GET_IFACE (slot)->get_current_view) (slot);
}
NautilusWindowInfo *
nautilus_window_slot_info_get_window (NautilusWindowSlotInfo *slot)
{
......
......@@ -26,6 +26,7 @@
#define NAUTILUS_WINDOW_SLOT_INFO_H
#include "nautilus-window-info.h"
#include "nautilus-view.h"
#define NAUTILUS_TYPE_WINDOW_SLOT_INFO (nautilus_window_slot_info_get_type ())
......@@ -62,6 +63,7 @@ struct _NautilusWindowSlotInfoIface
GList *(* get_selection) (NautilusWindowSlotInfo *slot);
char * (* get_current_location) (NautilusWindowSlotInfo *slot);
NautilusView * (* get_current_view) (NautilusWindowSlotInfo *slot);
void (* set_status) (NautilusWindowSlotInfo *slot,
const char *status);
char * (* get_title) (NautilusWindowSlotInfo *slot);
......@@ -85,6 +87,7 @@ void nautilus_window_slot_info_set_status
const char *status);
char * nautilus_window_slot_info_get_current_location (NautilusWindowSlotInfo *slot);
NautilusView * nautilus_window_slot_info_get_current_view (NautilusWindowSlotInfo *slot);
int nautilus_window_slot_info_get_selection_count (NautilusWindowSlotInfo *slot);
GList * nautilus_window_slot_info_get_selection (NautilusWindowSlotInfo *slot);
char * nautilus_window_slot_info_get_title (NautilusWindowSlotInfo *slot);
......
......@@ -509,6 +509,22 @@ real_slot_info_get_current_location (NautilusWindowSlotInfo *info)
return NULL;
}
static NautilusView *
real_slot_info_get_current_view (NautilusWindowSlotInfo *info)
{
NautilusWindowSlot *slot;
slot = NAUTILUS_WINDOW_SLOT (info);
if (slot->content_view != NULL) {
return g_object_ref (slot->content_view);
} else if (slot->new_content_view) {
return g_object_ref (slot->new_content_view);
}
return NULL;
}
static void
nautilus_window_slot_dispose (GObject *object)
{
......@@ -575,6 +591,7 @@ nautilus_window_slot_info_iface_init (NautilusWindowSlotInfoIface *iface)
iface->get_window = nautilus_window_slot_get_window;
iface->get_selection_count = nautilus_window_slot_get_selection_count;
iface->get_current_location = real_slot_info_get_current_location;
iface->get_current_view = real_slot_info_get_current_view;
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment