- Do not show Unmount when showing Eject/Safe removal
This commit is contained in:
parent
17f7805e6e
commit
2d9e6650c2
92
nautilus-2.30.1-hide-unmount-when-eject.patch
Normal file
92
nautilus-2.30.1-hide-unmount-when-eject.patch
Normal file
@ -0,0 +1,92 @@
|
||||
From 9bdd0ef925a1e660031917746f8914a38e352576 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Tue, 30 Mar 2010 16:33:51 +0000
|
||||
Subject: Do not show Unmount when showing Eject/Safe removal
|
||||
|
||||
Having three menu entries (unmount/eject/safe removal) in a volume/drive menu
|
||||
entry is too confusing. Unmount only really makes sense for internal drives,
|
||||
for external ones it is pretty much a "geek" option. Geeks can use palimpsest
|
||||
or "unmount /media/foo" from the CLI if they really want to, for everyone else
|
||||
it is just an unintuitive and hard to to explain menu entry.
|
||||
|
||||
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=598690
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/453072
|
||||
(cherry picked from commit 0a5cc4c4e5b01eb8aa38dfae926502ce920efc94)
|
||||
---
|
||||
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
|
||||
index d8b9050..361b994 100644
|
||||
--- a/src/file-manager/fm-directory-view.c
|
||||
+++ b/src/file-manager/fm-directory-view.c
|
||||
@@ -7782,10 +7782,6 @@ file_should_show_foreach (NautilusFile *file,
|
||||
*show_eject = TRUE;
|
||||
}
|
||||
|
||||
- if (nautilus_file_can_unmount (file)) {
|
||||
- *show_unmount = TRUE;
|
||||
- }
|
||||
-
|
||||
if (nautilus_file_can_mount (file)) {
|
||||
*show_mount = TRUE;
|
||||
|
||||
@@ -7805,6 +7801,12 @@ file_should_show_foreach (NautilusFile *file,
|
||||
*show_stop = TRUE;
|
||||
}
|
||||
|
||||
+ /* Dot not show both Unmount and Eject/Safe Removal; too confusing to
|
||||
+ * have too many menu entries */
|
||||
+ if (nautilus_file_can_unmount (file) && !*show_eject && !*show_stop) {
|
||||
+ *show_unmount = TRUE;
|
||||
+ }
|
||||
+
|
||||
if (nautilus_file_can_poll_for_media (file) && !nautilus_file_is_media_check_automatic (file)) {
|
||||
*show_poll = TRUE;
|
||||
}
|
||||
@@ -7852,10 +7854,6 @@ file_should_show_self (NautilusFile *file,
|
||||
*show_eject = TRUE;
|
||||
}
|
||||
|
||||
- if (nautilus_file_can_unmount (file)) {
|
||||
- *show_unmount = TRUE;
|
||||
- }
|
||||
-
|
||||
if (nautilus_file_can_mount (file)) {
|
||||
*show_mount = TRUE;
|
||||
}
|
||||
@@ -7874,6 +7872,12 @@ file_should_show_self (NautilusFile *file,
|
||||
*show_stop = TRUE;
|
||||
}
|
||||
|
||||
+ /* Dot not show both Unmount and Eject/Safe Removal; too confusing to
|
||||
+ * have too many menu entries */
|
||||
+ if (nautilus_file_can_unmount (file) && !*show_eject && !*show_stop) {
|
||||
+ *show_unmount = TRUE;
|
||||
+ }
|
||||
+
|
||||
if (nautilus_file_can_poll_for_media (file) && !nautilus_file_is_media_check_automatic (file)) {
|
||||
*show_poll = TRUE;
|
||||
}
|
||||
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
|
||||
index 95c06eb..6dc2df7 100644
|
||||
--- a/src/nautilus-places-sidebar.c
|
||||
+++ b/src/nautilus-places-sidebar.c
|
||||
@@ -1317,7 +1317,7 @@ check_unmount_and_eject (GMount *mount,
|
||||
}
|
||||
if (mount != NULL) {
|
||||
*show_eject |= g_mount_can_eject (mount);
|
||||
- *show_unmount = g_mount_can_unmount (mount);
|
||||
+ *show_unmount = g_mount_can_unmount (mount) && !*show_eject;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1349,6 +1349,9 @@ check_visibility (GMount *mount,
|
||||
|
||||
*show_start = g_drive_can_start (drive) || g_drive_can_start_degraded (drive);
|
||||
*show_stop = g_drive_can_stop (drive);
|
||||
+
|
||||
+ if (*show_stop)
|
||||
+ *show_unmount = FALSE;
|
||||
}
|
||||
|
||||
if (volume != NULL) {
|
||||
--
|
||||
cgit v0.8.3.1
|
@ -15,7 +15,7 @@
|
||||
Name: nautilus
|
||||
Summary: File manager for GNOME
|
||||
Version: 2.30.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
Group: User Interface/Desktops
|
||||
Source: http://download.gnome.org/sources/%{name}/2.30/%{name}-%{version}.tar.bz2
|
||||
@ -87,6 +87,8 @@ Patch10: nautilus-gvfs-desktop-key-2.patch
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=519743
|
||||
Patch17: nautilus-filetype-symlink-fix.patch
|
||||
|
||||
# from upstream
|
||||
Patch18: nautilus-2.30.1-hide-unmount-when-eject.patch
|
||||
|
||||
%description
|
||||
Nautilus is the file manager and graphical shell for the GNOME desktop
|
||||
@ -126,6 +128,7 @@ for developing nautilus extensions.
|
||||
# %patch8 -p1 -b .hide-white-screen
|
||||
%patch10 -p1 -b .gvfs-desktop-key
|
||||
%patch17 -p0 -b .symlink
|
||||
%patch18 -p1 -b .hide-unmount
|
||||
|
||||
%build
|
||||
|
||||
@ -258,6 +261,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 26 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.30.1-2
|
||||
- Do not show Unmount when showing Eject/Safe removal
|
||||
|
||||
* Mon Apr 26 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.30.1-1
|
||||
- Update to 2.30.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user