[nautilus/wip/csoriano/flow: 33/55] file: rename get_drop_target_uri



commit e4e04f116d876958d8dcb8da7b8574fa9880fa45
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-file.c                |    8 ++++----
 libnautilus-private/nautilus-file.h                |    4 ++--
 libnautilus-private/nautilus-tree-view-drag-dest.c |    2 +-
 src/nautilus-canvas-view.c                         |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 4fc0a4d..0f46ab7 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -3847,13 +3847,13 @@ 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;
@@ -8018,7 +8018,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;
 
        signals[CHANGED] =
                g_signal_new ("changed",
diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h
index e7ed6b9..40d060b 100644
--- a/libnautilus-private/nautilus-file.h
+++ b/libnautilus-private/nautilus-file.h
@@ -422,7 +422,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);
@@ -568,7 +568,7 @@ typedef struct {
                                                           NautilusFileOperationCallback   callback,
                                                           gpointer                        callback_data);
 
-       char*                 (* get_drop_target_uri)     (NautilusFile                   *file);
+       char*                 (* get_target_uri)          (NautilusFile                   *file);
 } NautilusFileClass;
 
 #endif /* NAUTILUS_FILE_H */
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c 
b/libnautilus-private/nautilus-tree-view-drag-dest.c
index 72268ee..41d1666 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -425,7 +425,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 cac260c..1380d5e 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1449,7 +1449,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]