[nautilus-open-terminal] Properly append terminal items for desktop & remote non-SSH locations (#590607).



commit e3ae47c07585de2edb35560f1e89e82c500657de
Author: Christian Neumair <cnmeumair gnome org>
Date:   Mon Aug 3 16:25:40 2009 +0200

    Properly append terminal items for desktop & remote non-SSH locations (#590607).
    
    The recent ~/.gvfs back-mapping changes introduced a flaw: Remote non-SSH locations
    and the desktop never had any terminal menu items. Thanks to Biru Ionut
    <biru ionut gmail com>, #590607.

 src/nautilus-open-terminal.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-open-terminal.c b/src/nautilus-open-terminal.c
index b452195..84e7d25 100644
--- a/src/nautilus-open-terminal.c
+++ b/src/nautilus-open-terminal.c
@@ -504,13 +504,19 @@ 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);
 
-	if (terminal_file_info == FILE_INFO_SFTP || uri_has_local_path (uri)) {
+	if (terminal_file_info == FILE_INFO_SFTP ||
+	    terminal_file_info == FILE_INFO_DESKTOP ||
+	    uri_has_local_path (uri)) {
+		/* local locations or SSH */
 		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)) {
+	if ((terminal_file_info == FILE_INFO_SFTP ||
+	     terminal_file_info == FILE_INFO_OTHER) &&
+	    uri_has_local_path (uri)) {
+		/* remote locations that offer local back-mapping */
 		item = open_terminal_menu_item_new (file_info, terminal_file_info, gtk_widget_get_screen (window),
 						    NULL, FALSE, FALSE);
 		items = g_list_append (items, item);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]