summaryrefslogtreecommitdiff
path: root/src/nautilus-window-slot-dnd.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-12-21 18:17:52 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2011-01-11 11:43:18 +0100
commitad0d377ac236392a9ccaeae789e07e1af4a796e5 (patch)
treeb5441f47c0ef9f5afb34ab753806592c2e74b97b /src/nautilus-window-slot-dnd.c
parent4c031a4794126af08cea1774dd7ec3904d0ad25e (diff)
downloadnautilus-ad0d377ac236392a9ccaeae789e07e1af4a796e5.tar.gz
Rework architecture of NautilusWindow/NautilusWindowSlotInfo
In the past, nautilus was designed keeping in mind the concept that it might not just be a file browser, but a sort of platform to embed various kind of views in it. - libnautilus-private: general lowlevel items, such as the icon container, NautilusFile, I/O and so on - src: general widgets and UI items - src/file-manager: file manager views, agnostic of what's in src/, for the sake of being pluggable enough This is really not applicable anymore, as nautilus won't go in any direction other than being a file manager; at the same time, this complicates code and architecture quite a lot. In this commit, as a first step towards a more clean codebase, we remove the NautilusWindowInfo and NautilusWindowSlotInfo interfaces, using NautilusWindow and NautilusWindowSlot directly. Note that there should be no actual code changes, only moving of pieces around.
Diffstat (limited to 'src/nautilus-window-slot-dnd.c')
-rw-r--r--src/nautilus-window-slot-dnd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index 660619b90..c735c969d 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -42,7 +42,7 @@ typedef struct {
} data;
GFile *target_location;
- NautilusWindowSlotInfo *target_slot;
+ NautilusWindowSlot *target_slot;
} NautilusDragSlotProxyInfo;
static gboolean
@@ -54,7 +54,7 @@ slot_proxy_drag_motion (GtkWidget *widget,
gpointer user_data)
{
NautilusDragSlotProxyInfo *drag_info;
- NautilusWindowSlotInfo *target_slot;
+ NautilusWindowSlot *target_slot;
GtkWidget *window;
GdkAtom target;
int action;
@@ -69,7 +69,7 @@ slot_proxy_drag_motion (GtkWidget *widget,
}
window = gtk_widget_get_toplevel (widget);
- g_assert (NAUTILUS_IS_WINDOW_INFO (window));
+ g_assert (NAUTILUS_IS_WINDOW (window));
if (!drag_info->have_data) {
target = gtk_drag_dest_find_target (widget, context, NULL);
@@ -88,11 +88,11 @@ slot_proxy_drag_motion (GtkWidget *widget,
if (drag_info->target_slot != NULL) {
target_slot = drag_info->target_slot;
} else {
- target_slot = nautilus_window_info_get_active_slot (NAUTILUS_WINDOW_INFO (window));
+ target_slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (window));
}
if (target_slot != NULL) {
- target_uri = nautilus_window_slot_info_get_current_location (target_slot);
+ target_uri = nautilus_window_slot_get_current_location (target_slot);
}
}
@@ -200,7 +200,7 @@ slot_proxy_handle_drop (GtkWidget *widget,
NautilusDragSlotProxyInfo *drag_info)
{
GtkWidget *window;
- NautilusWindowSlotInfo *target_slot;
+ NautilusWindowSlot *target_slot;
NautilusView *target_view;
char *target_uri;
GList *uri_list;
@@ -213,24 +213,24 @@ slot_proxy_handle_drop (GtkWidget *widget,
}
window = gtk_widget_get_toplevel (widget);
- g_assert (NAUTILUS_IS_WINDOW_INFO (window));
+ g_assert (NAUTILUS_IS_WINDOW (window));
if (drag_info->target_slot != NULL) {
target_slot = drag_info->target_slot;
} else {
- target_slot = nautilus_window_info_get_active_slot (NAUTILUS_WINDOW_INFO (window));
+ target_slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (window));
}
target_uri = NULL;
if (drag_info->target_location != NULL) {
target_uri = g_file_get_uri (drag_info->target_location);
} else if (target_slot != NULL) {
- target_uri = nautilus_window_slot_info_get_current_location (target_slot);
+ target_uri = nautilus_window_slot_get_current_location (target_slot);
}
target_view = NULL;
if (target_slot != NULL) {
- target_view = nautilus_window_slot_info_get_current_view (target_slot);
+ target_view = nautilus_window_slot_get_current_view (target_slot);
}
if (target_slot != NULL && target_view != NULL) {