[nautilus/wip/antoniof/gtk4-pre-switch-regressions: 42/50] general: Disable Drag-and-drop




commit ad8981e6b750d537e3514468308b14b2af60b546
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 17 15:09:20 2021 +0000

    general: Disable Drag-and-drop
    
    GTK 4 changes how DND is implemented compared to GTK 3.
    
    Disable this code before the switch. It shall be reimplemented
    once we are building against GTK 4.

 src/nautilus-canvas-container.c    |  9 ++++++++-
 src/nautilus-canvas-dnd.c          |  2 ++
 src/nautilus-canvas-dnd.h          |  3 +++
 src/nautilus-canvas-private.h      |  2 ++
 src/nautilus-canvas-view.c         | 10 ++++++++++
 src/nautilus-dnd.c                 |  6 +++++-
 src/nautilus-dnd.h                 |  6 +++++-
 src/nautilus-files-view-dnd.c      |  2 ++
 src/nautilus-files-view-dnd.h      |  3 ++-
 src/nautilus-list-model.c          |  4 ++++
 src/nautilus-list-model.h          |  4 +++-
 src/nautilus-list-view-dnd.c       |  2 ++
 src/nautilus-list-view-dnd.h       |  2 ++
 src/nautilus-list-view-private.h   |  4 ++++
 src/nautilus-list-view.c           | 12 ++++++++++++
 src/nautilus-location-entry.c      |  7 ++++++-
 src/nautilus-notebook.c            |  2 ++
 src/nautilus-pathbar.c             |  2 ++
 src/nautilus-properties-window.c   | 10 ++++++++--
 src/nautilus-tree-view-drag-dest.c |  2 ++
 src/nautilus-tree-view-drag-dest.h |  4 +++-
 src/nautilus-window-slot-dnd.c     |  2 ++
 src/nautilus-window-slot-dnd.h     |  4 +++-
 src/nautilus-window.c              |  4 ++++
 src/nautilus-window.h              |  2 ++
 25 files changed, 100 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index 44b637166..5fe0f5275 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -3168,7 +3168,9 @@ realize (GtkWidget *widget)
     container = NAUTILUS_CANVAS_CONTAINER (widget);
 
     /* Set up DnD.  */
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_canvas_dnd_init (container);
+#endif
 
     hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (widget));
     g_signal_connect (hadj, "value-changed",
@@ -3186,7 +3188,9 @@ unrealize (GtkWidget *widget)
 
     container = NAUTILUS_CANVAS_CONTAINER (widget);
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_canvas_dnd_fini (container);
+#endif
 
     GTK_WIDGET_CLASS (nautilus_canvas_container_parent_class)->unrealize (widget);
 }
@@ -3491,8 +3495,10 @@ button_release_event (GtkWidget      *widget,
                 }
                 else
                 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
                     nautilus_canvas_dnd_end_drag (container);
                     DEBUG ("Ending drag from canvas container");
+#endif
                 }
             }
             break;
@@ -3556,13 +3562,14 @@ motion_notify_event (GtkWidget      *widget,
                               | GDK_ACTION_MOVE
                               | GDK_ACTION_LINK
                               | GDK_ACTION_ASK;
-
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
                     nautilus_canvas_dnd_begin_drag (container,
                                                     actions,
                                                     details->drag_button,
                                                     event,
                                                     canvas_x,
                                                     canvas_y);
+#endif
                     DEBUG ("Beginning drag from canvas container");
                 }
             }
diff --git a/src/nautilus-canvas-dnd.c b/src/nautilus-canvas-dnd.c
index 9522f321c..fa3ca48a4 100644
--- a/src/nautilus-canvas-dnd.c
+++ b/src/nautilus-canvas-dnd.c
@@ -28,6 +28,7 @@
  */
 
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <config.h>
 #include <math.h>
 #include <src/nautilus-window.h>
@@ -1831,3 +1832,4 @@ nautilus_canvas_dnd_fini (NautilusCanvasContainer *container)
         container->details->dnd_info = NULL;
     }
 }
+#endif
diff --git a/src/nautilus-canvas-dnd.h b/src/nautilus-canvas-dnd.h
index 0e8b980e3..3ba25c2cd 100644
--- a/src/nautilus-canvas-dnd.h
+++ b/src/nautilus-canvas-dnd.h
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
+
 #include "nautilus-canvas-container.h"
 #include "nautilus-dnd.h"
 
@@ -54,3 +56,4 @@ void   nautilus_canvas_dnd_end_drag              (NautilusCanvasContainer *conta
 
 NautilusDragInfo* nautilus_canvas_dnd_get_drag_source_data (NautilusCanvasContainer *container,
                                                             GdkDragContext          *context);
+#endif
diff --git a/src/nautilus-canvas-private.h b/src/nautilus-canvas-private.h
index e60e86299..d1f5958a3 100644
--- a/src/nautilus-canvas-private.h
+++ b/src/nautilus-canvas-private.h
@@ -168,9 +168,11 @@ struct NautilusCanvasContainerDetails {
        /* Align idle id */
        guint align_idle_id;
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
        /* DnD info. */
        NautilusCanvasDndInfo *dnd_info;
        NautilusDragInfo *dnd_source_info;
+#endif
 
        /* zoom level */
        int zoom_level;
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index b3e07cf19..9c2d7368f 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1431,8 +1431,10 @@ canvas_view_handle_uri_list (NautilusCanvasContainer *container,
                              GdkDragAction            action,
                              NautilusCanvasView      *view)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_files_view_handle_uri_list_drop (NAUTILUS_FILES_VIEW (view),
                                               item_uris, target_uri, action);
+#endif
 }
 
 /* Handles an URL received from Mozilla */
@@ -1443,8 +1445,10 @@ canvas_view_handle_netscape_url (NautilusCanvasContainer *container,
                                  GdkDragAction            action,
                                  NautilusCanvasView      *view)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_files_view_handle_netscape_url_drop (NAUTILUS_FILES_VIEW (view),
                                                   encoded_url, target_uri, action);
+#endif
 }
 
 static void
@@ -1454,8 +1458,10 @@ canvas_view_handle_text (NautilusCanvasContainer *container,
                          GdkDragAction            action,
                          NautilusCanvasView      *view)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_files_view_handle_text_drop (NAUTILUS_FILES_VIEW (view),
                                           text, target_uri, action);
+#endif
 }
 
 static void
@@ -1467,8 +1473,10 @@ canvas_view_handle_raw (NautilusCanvasContainer *container,
                         GdkDragAction            action,
                         NautilusCanvasView      *view)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_files_view_handle_raw_drop (NAUTILUS_FILES_VIEW (view),
                                          raw_data, length, target_uri, direct_save_uri, action);
+#endif
 }
 
 static void
@@ -1476,7 +1484,9 @@ canvas_view_handle_hover (NautilusCanvasContainer *container,
                           const char              *target_uri,
                           NautilusCanvasView      *view)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_files_view_handle_hover (NAUTILUS_FILES_VIEW (view), target_uri);
+#endif
 }
 
 static char *
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c
index 067bc27ec..f419fd27c 100644
--- a/src/nautilus-dnd.c
+++ b/src/nautilus-dnd.c
@@ -21,6 +21,8 @@
  *           Ettore Perazzoli <ettore gnu org>
  */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
+
 #include <config.h>
 #include "nautilus-dnd.h"
 
@@ -398,6 +400,7 @@ source_is_deletable (GFile *file)
 NautilusDragInfo *
 nautilus_drag_get_source_data (GdkDragContext *context)
 {
+    return NULL;
     GtkWidget *source_widget;
     NautilusDragInfo *source_data;
 
@@ -406,7 +409,6 @@ nautilus_drag_get_source_data (GdkDragContext *context)
     {
         return NULL;
     }
-
     if (NAUTILUS_IS_CANVAS_CONTAINER (source_widget))
     {
         source_data = nautilus_canvas_dnd_get_drag_source_data (NAUTILUS_CANVAS_CONTAINER (source_widget),
@@ -978,3 +980,5 @@ nautilus_drag_autoscroll_stop (NautilusDragInfo *drag_info)
         drag_info->auto_scroll_timeout_id = 0;
     }
 }
+
+#endif
diff --git a/src/nautilus-dnd.h b/src/nautilus-dnd.h
index 0bb5e732f..e9342cf39 100644
--- a/src/nautilus-dnd.h
+++ b/src/nautilus-dnd.h
@@ -27,6 +27,8 @@
 #include <gtk/gtk.h>
 #include "nautilus-file.h"
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
+
 #define HOVER_TIMEOUT 500
 
 /* Drag & Drop target names. */
@@ -139,4 +141,6 @@ void                            nautilus_drag_autoscroll_stop               
(NautilusDragInfo                     *drag_info);
 
 NautilusDragInfo *          nautilus_drag_get_source_data                 (GdkDragContext                    
 *context);
 
-GList *                     nautilus_drag_file_list_from_selection_list   (const GList                       
 *selection_list);
+GList *                     nautilus_drag_file_list_from_selection_list   (const GList
+                                                                           *selection_list);
+#endif
diff --git a/src/nautilus-files-view-dnd.c b/src/nautilus-files-view-dnd.c
index 9c803b54d..fbb0e2ee7 100644
--- a/src/nautilus-files-view-dnd.c
+++ b/src/nautilus-files-view-dnd.c
@@ -23,6 +23,7 @@
  *          Pavel Cisler <pavel eazel com>
  */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <config.h>
 
 #include "nautilus-files-view-dnd.h"
@@ -407,3 +408,4 @@ nautilus_files_view_handle_hover (NautilusFilesView *view,
     g_object_unref (location);
     nautilus_file_unref (target_file);
 }
+#endif
diff --git a/src/nautilus-files-view-dnd.h b/src/nautilus-files-view-dnd.h
index 73b9263a7..7cfdb53b0 100644
--- a/src/nautilus-files-view-dnd.h
+++ b/src/nautilus-files-view-dnd.h
@@ -25,7 +25,7 @@
  */
 
 #pragma once
-
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include "nautilus-files-view.h"
 
 void nautilus_files_view_handle_uri_list_drop     (NautilusFilesView *view,
@@ -53,3 +53,4 @@ void nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
                                                    const GList       *uris,
                                                    const char        *target_location,
                                                    GdkDragAction      action);
+#endif
diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c
index ebafcebf8..e828ab5b5 100644
--- a/src/nautilus-list-model.c
+++ b/src/nautilus-list-model.c
@@ -105,11 +105,13 @@ G_DEFINE_TYPE_WITH_CODE (NautilusListModel, nautilus_list_model, G_TYPE_OBJECT,
                                                 nautilus_list_model_sortable_init)
                          G_ADD_PRIVATE (NautilusListModel));
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 static const GtkTargetEntry drag_types [] =
 {
     { NAUTILUS_ICON_DND_GNOME_ICON_LIST_TYPE, 0, NAUTILUS_ICON_DND_GNOME_ICON_LIST },
     { NAUTILUS_ICON_DND_URI_LIST_TYPE, 0, NAUTILUS_ICON_DND_URI_LIST },
 };
+#endif
 
 static void
 file_entry_free (FileEntry *file_entry)
@@ -1625,6 +1627,7 @@ nautilus_list_model_get_drag_view (NautilusListModel *model,
     return priv->drag_view;
 }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 GtkTargetList *
 nautilus_list_model_get_drag_target_list ()
 {
@@ -1635,6 +1638,7 @@ nautilus_list_model_get_drag_target_list ()
 
     return target_list;
 }
+#endif
 
 int
 nautilus_list_model_add_column (NautilusListModel *model,
diff --git a/src/nautilus-list-model.h b/src/nautilus-list-model.h
index ba771b8c2..cb430cfc1 100644
--- a/src/nautilus-list-model.h
+++ b/src/nautilus-list-model.h
@@ -96,7 +96,9 @@ GtkTreeView *     nautilus_list_model_get_drag_view (NautilusListModel *model,
                                                     int *drag_begin_x,
                                                     int *drag_begin_y);
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 GtkTargetList *   nautilus_list_model_get_drag_target_list (void);
+#endif
 
 int               nautilus_list_model_compare_func (NautilusListModel *model,
                                                    NautilusFile *file1,
@@ -110,4 +112,4 @@ void              nautilus_list_model_subdirectory_done_loading (NautilusListMod
                                                                 NautilusDirectory *directory);
 
 void              nautilus_list_model_set_highlight_for_files (NautilusListModel *model,
-                                                              GList *files);
\ No newline at end of file
+                                                              GList *files);
diff --git a/src/nautilus-list-view-dnd.c b/src/nautilus-list-view-dnd.c
index 21910060f..9941642bd 100644
--- a/src/nautilus-list-view-dnd.c
+++ b/src/nautilus-list-view-dnd.c
@@ -16,6 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <config.h>
 
 #include "nautilus-list-view-dnd.h"
@@ -303,3 +304,4 @@ nautilus_list_view_dnd_drag_begin (NautilusListView *list_view,
                                          -1);
     }
 }
+#endif
diff --git a/src/nautilus-list-view-dnd.h b/src/nautilus-list-view-dnd.h
index 03e102ed3..97a7d2112 100644
--- a/src/nautilus-list-view-dnd.h
+++ b/src/nautilus-list-view-dnd.h
@@ -17,6 +17,7 @@
  */
 
 #pragma once
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 
 #include <gdk/gdk.h>
 
@@ -32,3 +33,4 @@ void nautilus_list_view_dnd_drag_begin (NautilusListView *list_view,
 NautilusDragInfo *
 nautilus_list_view_dnd_get_drag_source_data (NautilusListView *list_view,
                                              GdkDragContext   *context);
+#endif
diff --git a/src/nautilus-list-view-private.h b/src/nautilus-list-view-private.h
index 5ec3b9f5a..66346bb99 100644
--- a/src/nautilus-list-view-private.h
+++ b/src/nautilus-list-view-private.h
@@ -38,7 +38,9 @@ struct NautilusListViewDetails {
 
   NautilusListZoomLevel zoom_level;
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
   NautilusTreeViewDragDest *drag_dest;
+#endif
 
   GtkTreePath *first_click_path; /* Both clicks in a double click need to be on the same row */
 
@@ -56,7 +58,9 @@ struct NautilusListViewDetails {
   gboolean drag_started;
   gboolean row_selected_on_button_down;
   gboolean active;
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
   NautilusDragInfo *drag_source_info;
+#endif
 
   GHashTable *columns;
   GtkWidget *column_editor;
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 06e51ee9f..fae543eed 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1221,6 +1221,7 @@ sort_column_changed_callback (GtkTreeSortable  *sortable,
     view->details->last_sort_attr = sort_attr;
 }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 static char *
 get_root_uri_callback (NautilusTreeViewDragDest *dest,
                        gpointer                  user_data)
@@ -1305,6 +1306,7 @@ move_copy_items_callback (NautilusTreeViewDragDest *dest,
                                          target_uri,
                                          action);
 }
+#endif
 
 static void
 column_header_menu_toggled (GtkCheckMenuItem *menu_item,
@@ -1962,7 +1964,9 @@ on_tree_view_drag_gesture_drag_begin (GtkGestureDrag *gesture,
                                       gdouble         start_y,
                                       gpointer        user_data)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_list_view_dnd_init (NAUTILUS_LIST_VIEW (user_data));
+#endif
 }
 
 static void
@@ -1971,6 +1975,7 @@ on_tree_view_drag_gesture_drag_update (GtkGestureDrag *gesture,
                                        gdouble         offset_y,
                                        gpointer        user_data)
 {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     GdkEventSequence *sequence;
     const GdkEvent *event;
     NautilusListView *list_view;
@@ -1980,6 +1985,7 @@ on_tree_view_drag_gesture_drag_update (GtkGestureDrag *gesture,
     list_view = NAUTILUS_LIST_VIEW (user_data);
 
     nautilus_list_view_dnd_drag_begin (list_view, offset_x, offset_y, event);
+#endif
 }
 
 static void
@@ -2014,8 +2020,10 @@ create_and_set_up_tree_view (NautilusListView *view)
                                                     NULL);
     gtk_tree_view_set_enable_search (view->details->tree_view, FALSE);
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     view->details->drag_dest =
         nautilus_tree_view_drag_dest_new (view->details->tree_view);
+#endif
 
     /* Stop the tree view from performing select-all actions.
      * It is desireable that the action is disabled while directory
@@ -2024,6 +2032,7 @@ create_and_set_up_tree_view (NautilusListView *view)
     g_signal_connect (view->details->tree_view, "select-all",
                       G_CALLBACK (g_signal_stop_emission_by_name), "select-all");
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     g_signal_connect_object (view->details->drag_dest,
                              "get-root-uri",
                              G_CALLBACK (get_root_uri_callback),
@@ -2044,6 +2053,7 @@ create_and_set_up_tree_view (NautilusListView *view)
                              G_CALLBACK (list_view_handle_raw), view, 0);
     g_signal_connect_object (view->details->drag_dest, "handle-hover",
                              G_CALLBACK (list_view_handle_hover), view, 0);
+#endif
 
     g_signal_connect_object (gtk_tree_view_get_selection (view->details->tree_view),
                              "changed",
@@ -3560,11 +3570,13 @@ nautilus_list_view_dispose (GObject *object)
         list_view->details->model = NULL;
     }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     if (list_view->details->drag_dest)
     {
         g_object_unref (list_view->details->drag_dest);
         list_view->details->drag_dest = NULL;
     }
+#endif
 
     clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
     g_signal_handlers_disconnect_by_func (clipboard, on_clipboard_owner_changed, list_view);
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index dfdc2a6fe..37cfe93c5 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -44,6 +44,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #define NAUTILUS_DND_URI_LIST_TYPE        "text/uri-list"
 #define NAUTILUS_DND_TEXT_PLAIN_TYPE      "text/plain"
 
@@ -59,6 +60,7 @@ static const GtkTargetEntry drop_types [] =
     { NAUTILUS_DND_URI_LIST_TYPE, 0, NAUTILUS_DND_URI_LIST },
     { NAUTILUS_DND_TEXT_PLAIN_TYPE, 0, NAUTILUS_DND_TEXT_PLAIN },
 };
+#endif
 
 typedef struct _NautilusLocationEntryPrivate
 {
@@ -228,6 +230,7 @@ nautilus_location_entry_set_location (NautilusLocationEntry *entry,
     g_free (formatted_uri);
 }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 typedef struct
 {
     NautilusLocationEntry *self;
@@ -400,7 +403,7 @@ drag_data_get_callback (GtkWidget        *widget,
     g_free (uri);
     g_object_unref (location);
 }
-
+#endif
 
 static void
 set_prefix_dimming (GtkCellRenderer *completion_cell,
@@ -940,6 +943,7 @@ nautilus_location_entry_init (NautilusLocationEntry *entry)
     g_signal_connect (priv->completer, "got-completion-data",
                       G_CALLBACK (got_completion_data_callback), entry);
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     /* Drag source */
     g_signal_connect_object (entry, "drag-data-get",
                              G_CALLBACK (drag_data_get_callback), entry, 0);
@@ -951,6 +955,7 @@ nautilus_location_entry_init (NautilusLocationEntry *entry)
                        GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
     g_signal_connect (entry, "drag-data-received",
                       G_CALLBACK (drag_data_received_callback), NULL);
+#endif
 
     g_signal_connect_object (entry, "activate",
                              G_CALLBACK (editable_activate_callback), entry, G_CONNECT_AFTER);
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 7a7212945..ad4945d65 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -389,7 +389,9 @@ build_tab_label (NautilusNotebook   *notebook,
     gtk_widget_show (close_button);
 
     g_object_set_data (G_OBJECT (box), "nautilus-notebook-tab", GINT_TO_POINTER (1));
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_drag_slot_proxy_init (box, NULL, slot);
+#endif
 
     g_object_set_data (G_OBJECT (box), "label", label);
     g_object_set_data (G_OBJECT (box), "spinner", spinner);
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 4dea6168f..93842c5eb 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1197,7 +1197,9 @@ make_button_data (NautilusPathBar *self,
     g_signal_connect (button_data->multi_press_gesture, "pressed",
                       G_CALLBACK (on_multi_press_gesture_pressed), button_data);
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     nautilus_drag_slot_proxy_init (button_data->button, button_data->file, NULL);
+#endif
 
     g_object_unref (path);
 
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 7cb39e499..b581ce546 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -256,6 +256,7 @@ typedef struct
 
 /* drag and drop definitions */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 enum
 {
     TARGET_URI_LIST,
@@ -267,6 +268,7 @@ static const GtkTargetEntry target_table[] =
     { "text/uri-list", 0, TARGET_URI_LIST },
     { "x-special/gnome-icon-list", 0, TARGET_GNOME_URI_LIST },
 };
+#endif
 
 #define DIRECTORY_CONTENTS_UPDATE_INTERVAL      200 /* milliseconds */
 #define FILES_UPDATE_INTERVAL                   200 /* milliseconds */
@@ -466,6 +468,7 @@ update_properties_window_icon (NautilusPropertiesWindow *self)
     gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon_button_image), pixbuf);
 }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 /* utility to test if a uri refers to a local image */
 static gboolean
 uri_is_local_image (const char *uri)
@@ -488,7 +491,7 @@ uri_is_local_image (const char *uri)
 
     return TRUE;
 }
-
+#endif
 
 static void
 reset_icon (NautilusPropertiesWindow *self)
@@ -507,7 +510,7 @@ reset_icon (NautilusPropertiesWindow *self)
     }
 }
 
-
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 static void
 nautilus_properties_window_drag_data_received (GtkWidget        *widget,
                                                GdkDragContext   *context,
@@ -564,6 +567,7 @@ nautilus_properties_window_drag_data_received (GtkWidget        *widget,
         }
     }
 }
+#endif
 
 static void
 setup_image_widget (NautilusPropertiesWindow *self,
@@ -573,6 +577,7 @@ setup_image_widget (NautilusPropertiesWindow *self,
 
     if (is_customizable)
     {
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
         /* prepare the image to receive dropped objects to assign custom images */
         gtk_drag_dest_set (self->icon_button_image,
                            GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
@@ -581,6 +586,7 @@ setup_image_widget (NautilusPropertiesWindow *self,
 
         g_signal_connect (self->icon_button_image, "drag-data-received",
                           G_CALLBACK (nautilus_properties_window_drag_data_received), NULL);
+#endif
         g_signal_connect (self->icon_button, "clicked",
                           G_CALLBACK (select_image_button_callback), self);
         gtk_stack_set_visible_child (self->icon_stack, self->icon_button);
diff --git a/src/nautilus-tree-view-drag-dest.c b/src/nautilus-tree-view-drag-dest.c
index cd87f187f..ffe897480 100644
--- a/src/nautilus-tree-view-drag-dest.c
+++ b/src/nautilus-tree-view-drag-dest.c
@@ -24,6 +24,7 @@
  *                                 contain a hierarchy of files
  */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <config.h>
 
 #include "nautilus-tree-view-drag-dest.h"
@@ -1301,3 +1302,4 @@ nautilus_tree_view_drag_dest_new (GtkTreeView *tree_view)
 
     return dest;
 }
+#endif
diff --git a/src/nautilus-tree-view-drag-dest.h b/src/nautilus-tree-view-drag-dest.h
index b2134c681..288eec348 100644
--- a/src/nautilus-tree-view-drag-dest.h
+++ b/src/nautilus-tree-view-drag-dest.h
@@ -26,6 +26,7 @@
 
 #pragma once
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <gtk/gtk.h>
 
 #include "nautilus-file.h"
@@ -93,4 +94,5 @@ struct _NautilusTreeViewDragDestClass {
 GType                     nautilus_tree_view_drag_dest_get_type (void);
 NautilusTreeViewDragDest *nautilus_tree_view_drag_dest_new      (GtkTreeView *tree_view);
 
-G_END_DECLS
\ No newline at end of file
+G_END_DECLS
+#endif
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index 8f5bd3383..8c3c0e46d 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -23,6 +23,7 @@
  *      Ettore Perazzoli <ettore gnu org>
  */
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <config.h>
 
 #include "nautilus-notebook.h"
@@ -559,3 +560,4 @@ nautilus_drag_slot_proxy_init (GtkWidget          *widget,
                       G_CALLBACK (slot_proxy_drag_leave),
                       drag_info);
 }
+#endif
diff --git a/src/nautilus-window-slot-dnd.h b/src/nautilus-window-slot-dnd.h
index 2b7b05f37..0988dffb2 100644
--- a/src/nautilus-window-slot-dnd.h
+++ b/src/nautilus-window-slot-dnd.h
@@ -25,6 +25,7 @@
 
 #pragma once
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 #include <gio/gio.h>
 #include <gtk/gtk.h>
 
@@ -34,4 +35,5 @@
 
 void nautilus_drag_slot_proxy_init (GtkWidget *widget,
                                     NautilusFile *target_file,
-                                    NautilusWindowSlot *target_slot);
\ No newline at end of file
+                                    NautilusWindowSlot *target_slot);
+#endif
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index eb442ad16..094c92236 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -942,6 +942,7 @@ places_sidebar_show_starred_location (NautilusWindow     *window,
     g_object_unref (location);
 }
 
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 static GList *
 build_selection_list_from_gfile_list (GList *gfile_list)
 {
@@ -1081,6 +1082,7 @@ places_sidebar_drag_perform_drop_cb (GtkPlacesSidebar *sidebar,
     g_free (dest_uri);
     g_list_free_full (source_uri_list, g_free);
 }
+#endif
 
 /* Callback used in the "empty trash" menu item from the places sidebar */
 static void
@@ -1311,12 +1313,14 @@ nautilus_window_set_up_sidebar (NautilusWindow *window)
                               G_CALLBACK (open_location_cb), window);
     g_signal_connect (window->places_sidebar, "show-error-message",
                       G_CALLBACK (places_sidebar_show_error_message_cb), window);
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
     g_signal_connect (window->places_sidebar, "drag-action-requested",
                       G_CALLBACK (places_sidebar_drag_action_requested_cb), window);
     g_signal_connect (window->places_sidebar, "drag-action-ask",
                       G_CALLBACK (places_sidebar_drag_action_ask_cb), window);
     g_signal_connect (window->places_sidebar, "drag-perform-drop",
                       G_CALLBACK (places_sidebar_drag_perform_drop_cb), window);
+#endif
     g_signal_connect (window->places_sidebar, "populate-popup",
                       G_CALLBACK (places_sidebar_populate_popup_cb), window);
     g_signal_connect (window->places_sidebar, "unmount",
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index 6341d865f..dfb810ae5 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -97,10 +97,12 @@ void nautilus_window_sync_title            (NautilusWindow *window,
 void nautilus_window_show_operation_notification (NautilusWindow *window,
                                                   gchar          *main_label,
                                                   GFile          *folder_to_open);
+#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
 void nautilus_window_start_dnd (NautilusWindow *window,
                                 GdkDragContext *context);
 void nautilus_window_end_dnd (NautilusWindow *window,
                               GdkDragContext *context);
+#endif
 
 void nautilus_window_search (NautilusWindow *window,
                              NautilusQuery  *query);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]