[nautilus/wip/antoniof/gnome-42: 54/72] Revert "general: Disable clipboard"
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gnome-42: 54/72] Revert "general: Disable clipboard"
- Date: Fri, 11 Feb 2022 19:28:01 +0000 (UTC)
commit b0d1e3c93de4c626decc59e30495e7b24d30133c
Author: Ondrej Holy <oholy redhat com>
Date: Fri Feb 11 14:25:36 2022 +0100
Revert "general: Disable clipboard"
This reverts commit 87f6d9ae5b6a872a9639eb8523bdd29e9f224e2a.
src/nautilus-clipboard.c | 2 --
src/nautilus-clipboard.h | 2 --
src/nautilus-files-view.c | 32 --------------------------------
src/nautilus-list-view.c | 14 --------------
4 files changed, 50 deletions(-)
---
diff --git a/src/nautilus-clipboard.c b/src/nautilus-clipboard.c
index 8dee3e6dc..02bf05497 100644
--- a/src/nautilus-clipboard.c
+++ b/src/nautilus-clipboard.c
@@ -24,7 +24,6 @@
* Darin Adler <darin bentspoon com>
*/
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
#include <config.h>
#include "nautilus-clipboard.h"
#include "nautilus-file-utilities.h"
@@ -328,4 +327,3 @@ nautilus_clipboard_get_atom (void)
return copied_files_atom;
}
-#endif
diff --git a/src/nautilus-clipboard.h b/src/nautilus-clipboard.h
index c46bcabaf..1dd26d7c2 100644
--- a/src/nautilus-clipboard.h
+++ b/src/nautilus-clipboard.h
@@ -21,7 +21,6 @@
*/
#pragma once
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
#include <gtk/gtk.h>
@@ -34,4 +33,3 @@ void nautilus_clipboard_prepare_for_files (GtkClipboard *clipboard,
GList *files,
gboolean cut);
GdkAtom nautilus_clipboard_get_atom (void);
-#endif
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 0ff80b1c7..0e2094bd4 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -309,11 +309,9 @@ static void trash_or_delete_files (GtkWindow *parent_window,
NautilusFilesView *view);
static void load_directory (NautilusFilesView *view,
NautilusDirectory *directory);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void on_clipboard_owner_changed (GtkClipboard *clipboard,
GdkEvent *event,
gpointer user_data);
-#endif
static void schedule_update_context_menus (NautilusFilesView *view);
static void remove_update_context_menus_timeout_callback (NautilusFilesView *view);
static void schedule_update_status (NautilusFilesView *view);
@@ -2598,7 +2596,6 @@ action_open_item_new_window (GSimpleAction *action,
nautilus_file_list_free (selection);
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void
handle_clipboard_data (NautilusFilesView *view,
GtkSelectionData *selection_data,
@@ -2666,12 +2663,10 @@ paste_clipboard_received_callback (GtkClipboard *clipboard,
g_object_unref (view);
}
-#endif
static void
paste_files (NautilusFilesView *view)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
GtkClipboard *clipboard;
clipboard = nautilus_clipboard_get (GTK_WIDGET (view));
@@ -2684,7 +2679,6 @@ paste_files (NautilusFilesView *view)
nautilus_clipboard_get_atom (),
paste_clipboard_received_callback,
view);
-#endif
}
static void
@@ -2721,7 +2715,6 @@ action_paste_files_accel (GSimpleAction *action,
}
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void
create_links_clipboard_received_callback (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
@@ -2745,14 +2738,12 @@ create_links_clipboard_received_callback (GtkClipboard *clipboard,
g_object_unref (view);
}
-#endif
static void
action_create_links (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
NautilusFilesView *view;
g_assert (NAUTILUS_IS_FILES_VIEW (user_data));
@@ -2764,7 +2755,6 @@ action_create_links (GSimpleAction *action,
nautilus_clipboard_get_atom (),
create_links_clipboard_received_callback,
view);
-#endif
}
static void
@@ -3171,9 +3161,7 @@ nautilus_files_view_dispose (GObject *object)
{
NautilusFilesView *view;
NautilusFilesViewPrivate *priv;
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
GtkClipboard *clipboard;
-#endif
GList *node, *next;
view = NAUTILUS_FILES_VIEW (object);
@@ -3254,10 +3242,8 @@ nautilus_files_view_dispose (GObject *object)
g_signal_handlers_disconnect_by_func (nautilus_trash_monitor_get (),
nautilus_files_view_trash_state_changed_callback, view);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
g_signal_handlers_disconnect_by_func (clipboard, on_clipboard_owner_changed, view);
-#endif
nautilus_file_unref (priv->directory_as_file);
priv->directory_as_file = NULL;
@@ -5941,7 +5927,6 @@ action_copy (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
NautilusFilesView *view;
GtkClipboard *clipboard;
GList *selection;
@@ -5953,7 +5938,6 @@ action_copy (GSimpleAction *action,
nautilus_clipboard_prepare_for_files (clipboard, selection, FALSE);
nautilus_file_list_free (selection);
-#endif
}
static void
@@ -5961,7 +5945,6 @@ action_cut (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
NautilusFilesView *view;
GList *selection;
GtkClipboard *clipboard;
@@ -5973,7 +5956,6 @@ action_cut (GSimpleAction *action,
nautilus_clipboard_prepare_for_files (clipboard, selection, TRUE);
nautilus_file_list_free (selection);
-#endif
}
static void
@@ -6029,7 +6011,6 @@ action_move_to (GSimpleAction *action,
copy_or_move_selection (view, TRUE);
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
typedef struct
{
NautilusFilesView *view;
@@ -6084,14 +6065,12 @@ paste_into (NautilusFilesView *view,
paste_into_clipboard_received_callback,
data);
}
-#endif
static void
action_paste_files_into (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
NautilusFilesView *view;
g_autolist (NautilusFile) selection = NULL;
@@ -6101,7 +6080,6 @@ action_paste_files_into (GSimpleAction *action,
{
paste_into (view, NAUTILUS_FILE (selection->data));
}
-#endif
}
static void
@@ -7108,7 +7086,6 @@ can_paste_into_file (NautilusFile *file)
return FALSE;
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void
on_clipboard_contents_received (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
@@ -7208,7 +7185,6 @@ on_clipboard_targets_received (GtkClipboard *clipboard,
g_object_unref (view);
}
-#endif
static void
file_should_show_foreach (NautilusFile *file,
@@ -7309,7 +7285,6 @@ can_restore_from_trash (GList *files)
return can_restore;
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void
on_clipboard_owner_changed (GtkClipboard *clipboard,
GdkEvent *event,
@@ -7320,7 +7295,6 @@ on_clipboard_owner_changed (GtkClipboard *clipboard,
/* Update paste menu item */
nautilus_files_view_update_context_menus (self);
}
-#endif
static gboolean
can_delete_all (GList *files)
@@ -7765,7 +7739,6 @@ real_update_actions_state (NautilusFilesView *view)
!selection_contains_starred &&
priv->templates_menu != NULL);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
/* Actions that are related to the clipboard need request, request the data
* and update them once we have the data */
g_object_ref (view); /* Need to keep the object alive until we get the reply */
@@ -7778,7 +7751,6 @@ real_update_actions_state (NautilusFilesView *view)
nautilus_clipboard_get_atom (),
on_clipboard_contents_received,
view);
-#endif
action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
"select-all");
@@ -9552,9 +9524,7 @@ nautilus_files_view_init (NautilusFilesView *view)
NautilusDirectory *scripts_directory;
NautilusDirectory *templates_directory;
gchar *templates_uri;
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
GtkClipboard *clipboard;
-#endif
GApplication *app;
const gchar *open_accels[] =
{
@@ -9743,12 +9713,10 @@ nautilus_files_view_init (NautilusFilesView *view)
g_signal_connect_object (nautilus_trash_monitor_get (), "trash-state-changed",
G_CALLBACK (nautilus_files_view_trash_state_changed_callback), view, 0);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
/* React to clipboard changes */
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
g_signal_connect (clipboard, "owner-change",
G_CALLBACK (on_clipboard_owner_changed), view);
-#endif
/* Register to menu provider extension signal managing menu updates */
g_signal_connect_object (nautilus_signaller_get_current (), "popup-menu-changed",
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 639eb8540..75876b5f2 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -97,11 +97,9 @@ static char **get_visible_columns (NautilusListView *list_view);
static char **get_default_visible_columns (NautilusListView *list_view);
static char **get_column_order (NautilusListView *list_view);
static char **get_default_column_order (NautilusListView *list_view);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void on_clipboard_owner_changed (GtkClipboard *clipboard,
GdkEvent *event,
gpointer user_data);
-#endif
static void popup_column_header_menu (NautilusListView *list_view,
gdouble x,
gdouble y);
@@ -3549,9 +3547,7 @@ static void
nautilus_list_view_dispose (GObject *object)
{
NautilusListView *list_view;
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
GtkClipboard *clipboard;
-#endif
list_view = NAUTILUS_LIST_VIEW (object);
@@ -3569,10 +3565,8 @@ nautilus_list_view_dispose (GObject *object)
}
#endif
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
g_signal_handlers_disconnect_by_func (clipboard, on_clipboard_owner_changed, list_view);
-#endif
g_signal_handlers_disconnect_by_func (nautilus_preferences,
default_sort_order_changed_callback,
list_view);
@@ -3717,7 +3711,6 @@ list_view_scroll_to_file (NautilusFilesView *view,
}
}
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
static void
on_clipboard_contents_received (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
@@ -3769,15 +3762,12 @@ on_clipboard_owner_changed (GtkClipboard *clipboard,
{
update_clipboard_status (NAUTILUS_LIST_VIEW (user_data));
}
-#endif
static void
nautilus_list_view_end_loading (NautilusFilesView *view,
gboolean all_files_seen)
{
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
update_clipboard_status (NAUTILUS_LIST_VIEW (view));
-#endif
}
static guint
@@ -3999,9 +3989,7 @@ static void
nautilus_list_view_init (NautilusListView *list_view)
{
GActionGroup *view_action_group;
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
GtkClipboard *clipboard;
-#endif
list_view->details = g_new0 (NautilusListViewDetails, 1);
@@ -4039,12 +4027,10 @@ nautilus_list_view_init (NautilusListView *list_view)
G_CALLBACK (default_column_order_changed_callback),
list_view);
-#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
/* React to clipboard changes */
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
g_signal_connect (clipboard, "owner-change",
G_CALLBACK (on_clipboard_owner_changed), list_view);
-#endif
nautilus_list_view_click_policy_changed (NAUTILUS_FILES_VIEW (list_view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]