[nautilus] properties-window: Show "Open with" tab in Trash
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] properties-window: Show "Open with" tab in Trash
- Date: Mon, 21 May 2018 08:08:41 +0000 (UTC)
commit 11b91e6113b528fd26dfe335571be6512f8c28e0
Author: George Mocanu <mocanu geo98 gmail com>
Date: Sat May 19 20:50:44 2018 +0300
properties-window: Show "Open with" tab in Trash
Although nautilus allows opening files from Trash, properties
window doesn't show "Open with" option.
This patch solves this by adding "Open with" option in the
properties window of trashed files.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/432
src/nautilus-properties-window.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index d3adcfc1f..86978c028 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -4863,16 +4863,6 @@ file_changed_callback (NautilusFile *file,
}
}
-static gboolean
-is_a_special_file (NautilusFile *file)
-{
- gboolean is_special;
-
- is_special = file == NULL || nautilus_file_is_in_trash (file);
-
- return is_special;
-}
-
static gboolean
should_show_open_with (NautilusPropertiesWindow *window)
{
@@ -4903,7 +4893,7 @@ should_show_open_with (NautilusPropertiesWindow *window)
{
file = NAUTILUS_FILE (l->data);
app_info = nautilus_mime_get_default_application_for_file (file);
- if (nautilus_file_is_directory (file) || !app_info || is_a_special_file (file))
+ if (nautilus_file_is_directory (file) || !app_info || file == NULL)
{
return FALSE;
}
@@ -4918,7 +4908,7 @@ should_show_open_with (NautilusPropertiesWindow *window)
file = get_target_file (window);
app_info = nautilus_mime_get_default_application_for_file (file);
- if (nautilus_file_is_directory (file) || !app_info || is_a_special_file (file))
+ if (nautilus_file_is_directory (file) || !app_info || file == NULL)
{
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]