summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiberiu Lepadatu <tiberiulepadatu14@gmail.com>2017-04-09 14:00:19 +0300
committerAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-07-13 13:28:52 +0100
commitb729dcfd0aeec2be516facb30fdee59223a58124 (patch)
tree9470da4cdc16db48e77a4d52f47c328a3461aa82
parent11cbe223a554549dc1b42d0c91a3d5b569bc3971 (diff)
downloadnautilus-b729dcfd0aeec2be516facb30fdee59223a58124.tar.gz
files-view: disable create-link when the clipboard is empty
'Create Link' button does nothing when the clipboard is empty. In order to fix that, disable the button when the clipboard is empty. https://bugzilla.gnome.org/show_bug.cgi?id=781095
-rw-r--r--src/nautilus-files-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 1874d8b11..89edede36 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7098,7 +7098,8 @@ on_clipboard_contents_received (GtkClipboard *clipboard,
is_read_only = nautilus_files_view_is_read_only (view);
selection_contains_recent = showing_recent_directory (view);
can_link_from_copied_files = !nautilus_clipboard_is_cut_from_selection_data (selection_data) &&
- !selection_contains_recent && !is_read_only;
+ !selection_contains_recent && !is_read_only &&
+ gtk_selection_data_get_length (selection_data) > 0;
action = g_action_map_lookup_action (G_ACTION_MAP (priv->view_action_group),
"create-link");