[nautilus-open-terminal] Do not add any menu items for remote locations if ~/.gvfs back-mapping is not available
- From: Christian Neumair <cneumair src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-open-terminal] Do not add any menu items for remote locations if ~/.gvfs back-mapping is not available
- Date: Tue, 2 Jun 2009 09:31:46 -0400 (EDT)
commit 95cc125413a6603bdb3ee0496f35a2138761c046
Author: Christian Neumair <cnmeumair gnome org>
Date: Tue Jun 2 02:33:42 2009 +0200
Do not add any menu items for remote locations if ~/.gvfs back-mapping is not available
Previously, when a remote location was displayed that is no SFTP location, we always displayed the "Open in Terminal"
location opening a local terminal (back-mapped through ~/.gvfs). However, this should only be done if FUSE support
is compiled in, and the URI can therefore be mapped to ~/.gvfs.
---
src/nautilus-open-terminal.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/nautilus-open-terminal.c b/src/nautilus-open-terminal.c
index 1d5760a..f0e2c0a 100644
--- a/src/nautilus-open-terminal.c
+++ b/src/nautilus-open-terminal.c
@@ -504,9 +504,11 @@ nautilus_open_terminal_get_background_items (NautilusMenuProvider *provider,
uri = nautilus_file_info_get_activation_uri (file_info);
terminal_file_info = get_terminal_file_info (uri);
- item = open_terminal_menu_item_new (file_info, terminal_file_info, gtk_widget_get_screen (window),
- NULL, terminal_file_info == FILE_INFO_SFTP, FALSE);
- items = g_list_append (items, item);
+ if (terminal_file_info == FILE_INFO_SFTP || uri_has_local_path (uri)) {
+ item = open_terminal_menu_item_new (file_info, terminal_file_info, gtk_widget_get_screen (window),
+ NULL, terminal_file_info == FILE_INFO_SFTP, FALSE);
+ items = g_list_append (items, item);
+ }
if (terminal_file_info == FILE_INFO_SFTP && uri_has_local_path (uri)) {
item = open_terminal_menu_item_new (file_info, terminal_file_info, gtk_widget_get_screen (window),
@@ -556,9 +558,11 @@ nautilus_open_terminal_get_file_items (NautilusMenuProvider *provider,
case FILE_INFO_LOCAL:
case FILE_INFO_SFTP:
case FILE_INFO_OTHER:
- item = open_terminal_menu_item_new (files->data, terminal_file_info, gtk_widget_get_screen (window),
- NULL, terminal_file_info == FILE_INFO_SFTP, TRUE);
- items = g_list_append (items, item);
+ if (terminal_file_info == FILE_INFO_SFTP || uri_has_local_path (uri)) {
+ item = open_terminal_menu_item_new (files->data, terminal_file_info, gtk_widget_get_screen (window),
+ NULL, terminal_file_info == FILE_INFO_SFTP, TRUE);
+ items = g_list_append (items, item);
+ }
if (terminal_file_info == FILE_INFO_SFTP &&
uri_has_local_path (uri)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]