[patch] Bug #95116 'Empty Trash' should only appear in the Trash View
- From: Jan Arne Petersen <jpetersen gnome-de org>
- To: "nautilus-list [ML]" <nautilus-list gnome org>
- Subject: [patch] Bug #95116 'Empty Trash' should only appear in the Trash View
- Date: 02 Nov 2002 23:31:52 +0100
Hi again,
this patch shows "File->Empty Trash" only in the "trash:" folder.
Jan Arne Petersen
Index: file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.554
diff -u -r1.554 fm-directory-view.c
--- file-manager/fm-directory-view.c 11 Oct 2002 22:22:46 -0000 1.554
+++ file-manager/fm-directory-view.c 2 Nov 2002 22:24:06 -0000
@@ -4394,6 +5127,15 @@
nautilus_bonobo_set_sensitive (view->details->ui,
FM_DIRECTORY_VIEW_COMMAND_EMPTY_TRASH,
!nautilus_trash_monitor_is_empty ());
+ uri = nautilus_file_get_uri (view->details->directory_as_file);
+ /* It's probably OK that this only works for local
+ * items, since the trash we care about is on the desktop.
+ */
+ nautilus_bonobo_set_hidden (view->details->ui,
+ FM_DIRECTORY_VIEW_COMMAND_EMPTY_TRASH,
+ strcmp (uri, "trash:"));
+ g_free (uri);
+
nautilus_bonobo_set_sensitive (view->details->ui,
NAUTILUS_COMMAND_SELECT_ALL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]