summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@redhat.com>2018-07-26 19:20:12 +0200
committerCarlos Soriano <csoriano@redhat.com>2018-07-26 19:25:15 +0200
commita4fa624abcc99bd53943f4b8bb1982d7aedcc03d (patch)
tree6aa1536ad1273bd8d04001129e260a2ec85a9eb3
parent1554177c7060802afaa76815446b60a5aeb3cb22 (diff)
downloadnautilus-a4fa624abcc99bd53943f4b8bb1982d7aedcc03d.tar.gz
general: Remove trash shortcut changed handling
It was introduced in 3.14, most probably everyone is in a newer version already... Time to clean up!
-rw-r--r--data/org.gnome.nautilus.gschema.xml5
-rw-r--r--src/nautilus-files-view.c46
-rw-r--r--src/nautilus-global-preferences.h5
-rw-r--r--src/resources/nautilus.gresource.xml1
-rw-r--r--src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui23
5 files changed, 1 insertions, 79 deletions
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index 3dc5f7deb..4b393f83f 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -131,11 +131,6 @@
<summary>Show the package installer for unknown MIME types</summary>
<description>Whether to show the user a package installer dialog in case an unknown MIME type is opened, in order to search for an application to handle it.</description>
</key>
- <key type="b" name="show-move-to-trash-shortcut-changed-dialog">
- <default>true</default>
- <summary>Show a warning dialog for the change of the shortcut for move to the Trash</summary>
- <description>Show a warning dialog for the change of the shortcut for move to the Trash from Control + Delete to just Delete.</description>
- </key>
<key type="b" name="mouse-use-extra-buttons">
<default>true</default>
<summary>Use extra mouse button events in Nautilus’ browser window</summary>
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 89dfd16b7..f0e50cb7a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1377,46 +1377,6 @@ action_open_file_and_close_window (GSimpleAction *action,
}
static void
-got_it_clicked (GtkDialog *dialog,
- gint response_id,
- gpointer user_data)
-{
- g_settings_set_boolean (nautilus_preferences,
- NAUTILUS_PREFERENCES_SHOW_MOVE_TO_TRASH_SHORTCUT_CHANGED_DIALOG,
- FALSE);
-}
-
-static void
-action_show_move_to_trash_shortcut_changed_dialog (GSimpleAction *action,
- GVariant *state,
- gpointer user_data)
-{
- NautilusFilesView *view;
- GtkWindow *dialog;
- GtkBuilder *builder;
- gboolean show_dialog_preference;
-
- view = NAUTILUS_FILES_VIEW (user_data);
- show_dialog_preference = g_settings_get_boolean (nautilus_preferences,
- NAUTILUS_PREFERENCES_SHOW_MOVE_TO_TRASH_SHORTCUT_CHANGED_DIALOG);
- if (show_dialog_preference)
- {
- builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-move-to-trash-shortcut-changed.ui");
- dialog = GTK_WINDOW (gtk_builder_get_object (builder, "move_to_trash_shortcut_changed_dialog"));
-
- gtk_window_set_transient_for (dialog, GTK_WINDOW (nautilus_files_view_get_window (view)));
- g_signal_connect (dialog, "response",
- G_CALLBACK (got_it_clicked),
- view);
-
- gtk_widget_show (GTK_WIDGET (dialog));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog));
-
- g_object_unref (builder);
- }
-}
-static void
action_open_item_location (GSimpleAction *action,
GVariant *state,
gpointer user_data)
@@ -7052,8 +7012,6 @@ const GActionEntry view_entries[] =
{ "select-pattern", action_select_pattern },
{ "invert-selection", action_invert_selection },
{ "open-file-and-close-window", action_open_file_and_close_window },
- /* Warning dialog for the change of the shorcut to move to trash */
- { "show-move-to-trash-shortcut-changed-dialog", action_show_move_to_trash_shortcut_changed_dialog }
};
static gboolean
@@ -9868,10 +9826,6 @@ nautilus_files_view_init (NautilusFilesView *view)
nautilus_application_set_accelerator (app, "view.invert-selection", "<shift><control>i");
nautilus_application_set_accelerator (app, "view.open-file-and-close-window", "<control><shift>Down");
- /* Show a warning dialog to inform the user that the shorcut for move to trash
- * changed */
- nautilus_application_set_accelerator (app, "view.show-move-to-trash-shortcut-changed-dialog", "<control>Delete");
-
priv->starred_cancellable = g_cancellable_new ();
priv->tag_manager = nautilus_tag_manager_get ();
diff --git a/src/nautilus-global-preferences.h b/src/nautilus-global-preferences.h
index 0ccc1937b..87a79e706 100644
--- a/src/nautilus-global-preferences.h
+++ b/src/nautilus-global-preferences.h
@@ -140,9 +140,6 @@ typedef enum
/* Recent files */
#define NAUTILUS_PREFERENCES_RECENT_FILES_ENABLED "remember-recent-files"
-/* Move to trash shorcut changed dialog */
-#define NAUTILUS_PREFERENCES_SHOW_MOVE_TO_TRASH_SHORTCUT_CHANGED_DIALOG "show-move-to-trash-shortcut-changed-dialog"
-
/* Default view when searching */
#define NAUTILUS_PREFERENCES_SEARCH_VIEW "search-view"
@@ -168,4 +165,4 @@ extern GSettings *gnome_lockdown_preferences;
extern GSettings *gnome_background_preferences;
extern GSettings *gnome_interface_preferences;
-G_END_DECLS \ No newline at end of file
+G_END_DECLS
diff --git a/src/resources/nautilus.gresource.xml b/src/resources/nautilus.gresource.xml
index 32db2cd6f..b1c0b9bbb 100644
--- a/src/resources/nautilus.gresource.xml
+++ b/src/resources/nautilus.gresource.xml
@@ -13,7 +13,6 @@
<file>ui/nautilus-rename-file-popover.ui</file>
<file>ui/nautilus-files-view-context-menus.ui</file>
<file>ui/nautilus-progress-info-widget.ui</file>
- <file>ui/nautilus-move-to-trash-shortcut-changed.ui</file>
<file>ui/nautilus-window.ui</file>
<file>ui/nautilus-no-search-results.ui</file>
<file>ui/nautilus-folder-is-empty.ui</file>
diff --git a/src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui b/src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui
deleted file mode 100644
index 6de8b2b08..000000000
--- a/src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
-<interface>
- <requires lib="gtk+" version="3.12"/>
- <object class="GtkMessageDialog" id="move_to_trash_shortcut_changed_dialog">
- <property name="resizable">False</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
- <property name="text" translatable="yes">Delete Shortcuts Have Changed</property>
- <property name="secondary_text" translatable="yes">With the latest version of Files, you no longer need to hold Ctrl to delete — the Delete key will work when pressed on its own.</property>
- <child type="action">
- <object class="GtkButton" id="button_got_it">
- <property name="label" translatable="yes">Got it</property>
- <property name="visible">True</property>
- </object>
- </child>
- <action-widgets>
- <action-widget response="ok">button_got_it</action-widget>
- </action-widgets>
- </object>
-</interface>