Show both unmount and eject in menus. We need to show eject for a lot of

2009-04-11  Alexander Larsson  <alexl@redhat.com>

	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-tree-view.c:
	* src/nautilus-places-sidebar.c:
	Show both unmount and eject in menus. We need to show eject for
	a lot of devices (that we can't detect ahead of time) so we're
	enabling it much more generally. However, eject sometimes does
	things you don't want (like unmounting all volumes on a drive),
	so we also need to expose unmount.

	For discussion, see bug 574067 and bug 576587.


svn path=/trunk/; revision=15176
This commit is contained in:
Alexander Larsson 2009-04-11 18:45:38 +00:00 committed by Alexander Larsson
parent bca6fc7d2b
commit 16ffc26430
4 changed files with 28 additions and 17 deletions

View file

@ -1,3 +1,16 @@
2009-04-11 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-tree-view.c:
* src/nautilus-places-sidebar.c:
Show both unmount and eject in menus. We need to show eject for
a lot of devices (that we can't detect ahead of time) so we're
enabling it much more generally. However, eject sometimes does
things you don't want (like unmounting all volumes on a drive),
so we also need to expose unmount.
For discussion, see bug 574067 and bug 576587.
2009-04-09 Cosimo Cecchi <cosimoc@gnome.org>
* cut-n-paste-code/libegg/eggsmclient.c:

View file

@ -7119,7 +7119,9 @@ file_should_show_foreach (NautilusFile *file,
if (nautilus_file_can_eject (file)) {
*show_eject = TRUE;
} else if (nautilus_file_can_unmount (file)) {
}
if (nautilus_file_can_unmount (file)) {
*show_unmount = TRUE;
}
@ -7166,7 +7168,9 @@ file_should_show_self (NautilusFile *file,
if (nautilus_file_can_eject (file)) {
*show_eject = TRUE;
} else if (nautilus_file_can_unmount (file)) {
}
if (nautilus_file_can_unmount (file)) {
*show_unmount = TRUE;
}

View file

@ -735,12 +735,8 @@ button_pressed_callback (GtkTreeView *treeview, GdkEventButton *event,
mount = fm_tree_model_get_mount_for_root_node_file (view->details->child_model, view->details->popup_file);
if (mount) {
/* TODO: show both unmount and eject if there are more than one volume for the drive */
show_unmount = g_mount_can_unmount (mount);
show_eject = g_mount_can_eject (mount);
if (show_eject) {
show_unmount = FALSE;
}
}
if (show_unmount) {

View file

@ -1287,11 +1287,9 @@ check_unmount_and_eject (GMount *mount,
}
if (mount != NULL) {
*show_eject |= g_mount_can_eject (mount);
if (!*show_eject) {
*show_unmount = g_mount_can_unmount (mount);
}
}
}
static void
check_visibility (GMount *mount,