[gnome-disk-utility/udisks2-port] Don't show "Format Volume" menu item if there's no media
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Don't show "Format Volume" menu item if there's no media
- Date: Thu, 3 Nov 2011 12:48:05 +0000 (UTC)
commit e0026d3ed0dba4737bc48158981049936a0fc64d
Author: David Zeuthen <davidz redhat com>
Date: Thu Nov 3 08:47:57 2011 -0400
Don't show "Format Volume" menu item if there's no media
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduwindow.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 2008f6d..90b14e2 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1639,7 +1639,8 @@ update_device_page_for_block (GduWindow *window,
filesystem = udisks_object_peek_filesystem (object);
/* TODO: don't show on CD-ROM drives or RO media etc. */
- *show_flags |= SHOW_FLAGS_POPUP_MENU_FORMAT_VOLUME;
+ if (udisks_block_get_size (block) > 0)
+ *show_flags |= SHOW_FLAGS_POPUP_MENU_FORMAT_VOLUME;
/* Since /etc/fstab, /etc/crypttab and so on can reference
* any device regardless of its content ... we want to show
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]