[nautilus] pathbar: use a NautilusFile instead of a GFile as a drag target
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] pathbar: use a NautilusFile instead of a GFile as a drag target
- Date: Wed, 6 Apr 2011 19:21:37 +0000 (UTC)
commit f49b62649a092a56e2cf6203db0fef08d2ed7618
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Apr 6 15:18:19 2011 -0400
pathbar: use a NautilusFile instead of a GFile as a drag target
The NautilusFile tracks changes in the file name, so it solves the bug
reported in https://bugzilla.gnome.org/show_bug.cgi?id=581748
src/nautilus-pathbar.c | 2 +-
src/nautilus-window-slot-dnd.c | 18 +++++++++---------
src/nautilus-window-slot-dnd.h | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index ec74203..11fbaa5 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1637,7 +1637,7 @@ make_directory_button (NautilusPathBar *path_bar,
setup_button_drag_source (button_data);
- nautilus_drag_slot_proxy_init (button_data->button, path, NULL);
+ nautilus_drag_slot_proxy_init (button_data->button, button_data->file, NULL);
g_object_unref (path);
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index a943462..4ec439f 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -42,7 +42,7 @@ typedef struct {
char *netscape_url;
} data;
- GFile *target_location;
+ NautilusFile *target_file;
NautilusWindowSlot *target_slot;
} NautilusDragSlotProxyInfo;
@@ -83,8 +83,8 @@ slot_proxy_drag_motion (GtkWidget *widget,
}
target_uri = NULL;
- if (drag_info->target_location != NULL) {
- target_uri = g_file_get_uri (drag_info->target_location);
+ if (drag_info->target_file != NULL) {
+ target_uri = nautilus_file_get_uri (drag_info->target_file);
} else {
if (drag_info->target_slot != NULL) {
target_slot = drag_info->target_slot;
@@ -129,7 +129,7 @@ drag_info_free (gpointer user_data)
{
NautilusDragSlotProxyInfo *drag_info = user_data;
- g_clear_object (&drag_info->target_location);
+ g_clear_object (&drag_info->target_file);
g_clear_object (&drag_info->target_slot);
g_slice_free (NautilusDragSlotProxyInfo, drag_info);
@@ -223,8 +223,8 @@ slot_proxy_handle_drop (GtkWidget *widget,
}
target_uri = NULL;
- if (drag_info->target_location != NULL) {
- target_uri = g_file_get_uri (drag_info->target_location);
+ if (drag_info->target_file != NULL) {
+ target_uri = nautilus_file_get_uri (drag_info->target_file);
} else if (target_slot != NULL) {
target_uri = nautilus_window_slot_get_current_uri (target_slot);
}
@@ -316,7 +316,7 @@ slot_proxy_drag_data_received (GtkWidget *widget,
void
nautilus_drag_slot_proxy_init (GtkWidget *widget,
- GFile *target_location,
+ NautilusFile *target_file,
NautilusWindowSlot *target_slot)
{
NautilusDragSlotProxyInfo *drag_info;
@@ -334,8 +334,8 @@ nautilus_drag_slot_proxy_init (GtkWidget *widget,
g_object_set_data_full (G_OBJECT (widget), "drag-slot-proxy-data", drag_info,
drag_info_free);
- if (target_location != NULL)
- drag_info->target_location = g_object_ref (target_location);
+ if (target_file != NULL)
+ drag_info->target_file = g_object_ref (target_file);
if (target_slot != NULL)
drag_info->target_slot = g_object_ref (target_slot);
diff --git a/src/nautilus-window-slot-dnd.h b/src/nautilus-window-slot-dnd.h
index 0b4805c..86b8166 100644
--- a/src/nautilus-window-slot-dnd.h
+++ b/src/nautilus-window-slot-dnd.h
@@ -35,7 +35,7 @@
#include "nautilus-window-slot.h"
void nautilus_drag_slot_proxy_init (GtkWidget *widget,
- GFile *target_location,
+ NautilusFile *target_file,
NautilusWindowSlot *target_slot);
#endif /* __NAUTILUS_WINDOW_SLOT_DND_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]