[nautilus/wip/csoriano/destktop-split2] file: rename get_drop_target_uri
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/destktop-split2] file: rename get_drop_target_uri
- Date: Thu, 31 Mar 2016 16:28:10 +0000 (UTC)
commit b3f92c28f6f624749f16d8b6af9c9a49a70d92e8
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Mar 31 18:21:04 2016 +0200
file: rename get_drop_target_uri
This get target uri is used for those which we have special handling on
the activation uri, instead of the usual glib attribute
G_FILE_ATTRIBUTE_STANDARD_TARGET_URI. So it behaves like a supergroup
of those which have G_FILE_ATTRIBUTE_STANDARD_TARGET_URI, but we use
it in the same way.
We use for handling special files like desktop links on drag and drop,
etc.
However, this is useful for other parts of nautilus, and we will use it
in a upcoming patch, so we can rename it in order to communicate the
wide nature of the function.
libnautilus-private/nautilus-desktop-icon-file.c | 4 ++--
libnautilus-private/nautilus-file.c | 10 +++++-----
libnautilus-private/nautilus-file.h | 4 ++--
libnautilus-private/nautilus-tree-view-drag-dest.c | 2 +-
src/nautilus-canvas-view.c | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-icon-file.c
b/libnautilus-private/nautilus-desktop-icon-file.c
index 4032d0c..2c326d6 100644
--- a/libnautilus-private/nautilus-desktop-icon-file.c
+++ b/libnautilus-private/nautilus-desktop-icon-file.c
@@ -346,7 +346,7 @@ nautilus_desktop_icon_file_eject (NautilusFile *file,
}
static char*
-real_get_drop_target_uri (NautilusFile *file)
+real_get_target_uri (NautilusFile *file)
{
char *uri = NULL;
GFile *location;
@@ -512,7 +512,7 @@ nautilus_desktop_icon_file_class_init (NautilusDesktopIconFileClass *klass)
file_class->eject = nautilus_desktop_icon_file_eject;
file_class->can_rename = real_can_rename;
file_class->rename = real_rename;
- file_class->get_drop_target_uri = real_get_drop_target_uri;
+ file_class->get_target_uri = real_get_target_uri;
file_class->drag_can_accept_files = real_drag_can_accept_files;
file_class->invalidate_attributes_internal = real_invalidate_attributes_internal;
file_class->opens_in_view = real_opens_in_view;
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 4b9548d..41dcc35 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -3861,20 +3861,20 @@ nautilus_file_get_activation_location (NautilusFile *file)
char *
-nautilus_file_get_drop_target_uri (NautilusFile *file)
+nautilus_file_get_target_uri (NautilusFile *file)
{
- return NAUTILUS_FILE_CLASS (G_OBJECT_GET_CLASS (file))->get_drop_target_uri (file);
+ return NAUTILUS_FILE_CLASS (G_OBJECT_GET_CLASS (file))->get_target_uri (file);
}
static char *
-real_get_drop_target_uri (NautilusFile *file)
+real_get_target_uri (NautilusFile *file)
{
char *uri, *target_uri;
GFile *location;
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
- uri = nautilus_file_get_uri (file);
+ uri = nautilus_file_get_activation_uri (file);
/* Check for Nautilus link */
if (nautilus_file_is_nautilus_link (file)) {
@@ -8016,7 +8016,7 @@ nautilus_file_class_init (NautilusFileClass *class)
class->set_metadata_as_list = real_set_metadata_as_list;
class->can_rename = real_can_rename;
class->rename = real_rename;
- class->get_drop_target_uri = real_get_drop_target_uri;
+ class->get_target_uri = real_get_target_uri;
class->drag_can_accept_files = real_drag_can_accept_files;
class->invalidate_attributes_internal = real_invalidate_attributes_internal;
class->opens_in_view = real_opens_in_view;
diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h
index e25cdf4..8045016 100644
--- a/libnautilus-private/nautilus-file.h
+++ b/libnautilus-private/nautilus-file.h
@@ -443,7 +443,7 @@ gboolean nautilus_file_has_activation_uri (Nautilu
char * nautilus_file_get_activation_uri (NautilusFile
*file);
GFile * nautilus_file_get_activation_location (NautilusFile
*file);
-char * nautilus_file_get_drop_target_uri (NautilusFile
*file);
+char * nautilus_file_get_target_uri (NautilusFile
*file);
GIcon * nautilus_file_get_gicon (NautilusFile
*file,
NautilusFileIconFlags
flags);
@@ -601,7 +601,7 @@ typedef struct {
NautilusFileOperationCallback callback,
gpointer callback_data);
- char* (* get_drop_target_uri) (NautilusFile *file);
+ char* (* get_target_uri) (NautilusFile *file);
gboolean (* drag_can_accept_files) (NautilusFile *drop_target_item);
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c
b/libnautilus-private/nautilus-tree-view-drag-dest.c
index 5b0813b..af7c011 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -426,7 +426,7 @@ get_drop_target_uri_for_path (NautilusTreeViewDragDest *dest,
dest->details->drag_type,
dest->details->drag_list);
if (can) {
- target = nautilus_file_get_drop_target_uri (file);
+ target = nautilus_file_get_target_uri (file);
}
nautilus_file_unref (file);
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 955c1b0..5fda1fb 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1447,7 +1447,7 @@ get_icon_drop_target_uri_callback (NautilusCanvasContainer *container,
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
g_return_val_if_fail (NAUTILUS_IS_CANVAS_VIEW (canvas_view), NULL);
- return nautilus_file_get_drop_target_uri (file);
+ return nautilus_file_get_target_uri (file);
}
/* Preferences changed callbacks */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]