Re: [Usability] Interacting with open folders



Am Montag, den 14.02.2005, 13:01 +0100 schrieb Reinout van Schouwen:
> On Sun, 13 Feb 2005, Christian Neumair wrote:
> > Calumn stated in a follow-up that a background context menu item that
> > allows display of the open folder's properties would be convenient.
> 
> Not just convenient, it is a real bug that this is currently impossible. 
> Hopefully we can get to a solution now.

What do you think about the attached patch? I know, it can't go into
2.10 (string freeze), but maybe it could be considered for 2.12.

-- 
Christian Neumair <chris gnome-de org>
? src/nautilus-spatial-window-SAVE.c
? src/file-manager/fmdirview.diff
Index: src/file-manager/fm-actions.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-actions.h,v
retrieving revision 1.4
diff -u -r1.4 fm-actions.h
--- src/file-manager/fm-actions.h	23 Jan 2005 19:03:56 -0000	1.4
+++ src/file-manager/fm-actions.h	14 Feb 2005 17:22:55 -0000
@@ -31,6 +31,7 @@
 #define FM_ACTION_OTHER_APPLICATION2 "OtherApplication2"
 #define FM_ACTION_NEW_FOLDER "New Folder"
 #define FM_ACTION_PROPERTIES "Properties"
+#define FM_ACTION_OPEN_FOLDER_PROPERTIES "OpenFolderProperties"
 #define FM_ACTION_PROPERTIES_ACCEL "PropertiesAccel"
 #define FM_ACTION_NO_TEMPLATES "No Templates"
 #define FM_ACTION_EMPTY_TRASH "Empty Trash"
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.660
diff -u -r1.660 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	9 Feb 2005 10:51:53 -0000	1.660
+++ src/file-manager/fm-directory-view.c	14 Feb 2005 17:23:16 -0000
@@ -1113,6 +1113,27 @@
         nautilus_file_list_free (selection);
 }
 
+static void
+action_open_folder_properties_callback (GtkAction *action,
+					gpointer callback_data)
+{
+        FMDirectoryView *view;
+	NautilusFile    *directory_file;
+        GList *files;
+        
+        g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
+
+        view = FM_DIRECTORY_VIEW (callback_data);
+
+	directory_file = fm_directory_view_get_directory_as_file (view);
+	files = g_list_append (NULL, nautilus_file_ref (directory_file));
+
+	fm_properties_window_present (files, GTK_WIDGET (view));
+
+        nautilus_file_list_free (files);
+}
+
+
 static gboolean
 all_files_in_trash (GList *files)
 {
@@ -1173,6 +1194,7 @@
 	}
 }
 
+
 /* Preferences changed callbacks */
 static void
 text_attribute_names_changed_callback (gpointer callback_data)
@@ -5722,6 +5744,10 @@
     N_("_Properties"), "<alt>Return",                /* label, accelerator */
     N_("View or modify the properties of each selected item"),                   /* tooltip */ 
     G_CALLBACK (action_properties_callback) },
+  { "OpenFolderProperties", GTK_STOCK_PROPERTIES,                  /* name, stock id */
+    N_("_Properties"), "",                /* label, accelerator */
+    N_("View or modify the properties of the open folder"),                   /* tooltip */ 
+    G_CALLBACK (action_open_folder_properties_callback) },
   { "PropertiesAccel", NULL,                  /* name, stock id */
     "PropertiesAccel", "<control>I",                /* label, accelerator */
     NULL,                   /* tooltip */ 
@@ -6307,6 +6333,12 @@
 	gtk_action_set_sensitive (action,
 				  selection_count != 0 &&
 				  fm_directory_view_supports_properties (view));
+	action = gtk_action_group_get_action (view->details->dir_action_group,
+					      FM_ACTION_OPEN_FOLDER_PROPERTIES);
+	gtk_action_set_sensitive (action,
+				  fm_directory_view_supports_properties (view));
+	gtk_action_set_visible (action,
+				!FM_IS_DESKTOP_ICON_VIEW (view));
 
 	action = gtk_action_group_get_action (view->details->dir_action_group,
 					      FM_ACTION_EMPTY_TRASH);
Index: src/file-manager/nautilus-directory-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v
retrieving revision 1.72
diff -u -r1.72 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml	23 Jan 2005 19:03:56 -0000	1.72
+++ src/file-manager/nautilus-directory-view-ui.xml	14 Feb 2005 17:23:16 -0000
@@ -92,6 +92,8 @@
 			<menuitem name="Paste" action="Paste"/>
 		</placeholder>
 	</placeholder>
+	<separator name="Properties Separator"/>
+	<menuitem name="OpenFolderProperties" action="OpenFolderProperties"/>
 </popup>
 <popup name="selection">
 	<placeholder name="Open Placeholder">


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