Re: [PATCH] Allow to get properties of open folder



On Sat, 2004-05-08 at 15:04 +0200, Christian Neumair wrote:
> The attached patch allows the users to get the properties of the open
> folder if by the file menu (if nothing is selected) or by clicking the
> background.
> Fixes #126561.

The former patch prevented you from getting properties of items on the
desktop. Here comes the fixed version.

regs,
 Chris
? src/file-manager/.fm-directory-view.c.swp
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.619
diff -u -r1.619 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	7 Apr 2004 03:45:21 -0000	1.619
+++ src/file-manager/fm-directory-view.c	8 May 2004 14:23:07 -0000
@@ -1151,6 +1151,10 @@
         view = FM_DIRECTORY_VIEW (callback_data);
 	selection = fm_directory_view_get_selection (view);
 
+	if (selection == NULL) /* Display properties of the open folder */
+		selection = g_list_prepend (selection,
+					    fm_directory_view_get_directory_as_file (view));
+
 	fm_properties_window_present (selection, GTK_WIDGET (view));
 
         nautilus_file_list_free (selection);
@@ -5596,8 +5600,9 @@
 
 	nautilus_bonobo_set_sensitive (view->details->ui, 
 				       FM_DIRECTORY_VIEW_COMMAND_PROPERTIES,
-				       selection_count != 0
-			      		&& fm_directory_view_supports_properties (view));
+			      	       fm_directory_view_supports_properties (view) &&
+				       (selection_count != 0 ||
+				        !NAUTILUS_IS_DESKTOP_DIRECTORY (fm_directory_view_get_model (view))));
 
 	nautilus_bonobo_set_label
 		(view->details->ui,
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.63
diff -u -r1.63 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml	28 Jan 2004 07:36:16 -0000	1.63
+++ src/file-manager/nautilus-directory-view-ui.xml	8 May 2004 14:23:09 -0000
@@ -247,6 +247,11 @@
 			<placeholder name="Background Items" delimit="none">
 				<menuitem name="Use Default Background" verb="Reset Background"/>
 			</placeholder>
+			<placeholder name="Properties Items" delimit="top">
+				<menuitem name="Properties"
+					  pixtype="stock" pixname="gtk-properties"
+					  verb="Properties"/>
+			</placeholder>
 		</placeholder>
 	</popup>
 	


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