[nautilus] files-view: remove unused code
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: remove unused code
- Date: Thu, 17 Mar 2016 15:39:06 +0000 (UTC)
commit eca941d4cb72a4907951961baa9680ae5789ce46
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Mar 17 16:30:42 2016 +0100
files-view: remove unused code
We just make always sensitive the open and open with another application
action, and let nautilus try to do it and show a dialog in case it fails
src/nautilus-files-view.c | 20 ++------------------
1 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 10be0ad..4e3f11d 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -6268,11 +6268,9 @@ real_update_actions_state (NautilusFilesView *view)
gboolean can_copy_files;
gboolean can_link_from_copied_files;
gboolean can_paste_files_into;
- gboolean show_app, show_run;
gboolean item_opens_in_view;
gboolean is_read_only;
GAction *action;
- GAppInfo *app;
gboolean show_properties;
GActionGroup *view_action_group;
gboolean show_mount;
@@ -6357,36 +6355,22 @@ real_update_actions_state (NautilusFilesView *view)
selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
selection_count = g_list_length (selection);
- show_app = show_run = item_opens_in_view = selection_count != 0;
+ item_opens_in_view = selection_count != 0;
for (l = selection; l != NULL; l = l->next) {
NautilusFile *file;
file = NAUTILUS_FILE (selection->data);
- if (!nautilus_mime_file_opens_in_external_app (file)) {
- show_app = FALSE;
- }
-
- if (!nautilus_mime_file_launches (file)) {
- show_run = FALSE;
- }
-
if (!nautilus_mime_file_opens_in_view (file)) {
item_opens_in_view = FALSE;
}
- if (!show_app && !show_run && !item_opens_in_view) {
+ if (!item_opens_in_view) {
break;
}
}
- /* Open With <App> menu item */
- app = NULL;
- if (show_app) {
- app = nautilus_mime_get_default_application_for_files (selection);
- }
-
action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
"open-with-default-application");
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), selection_count != 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]