[gnome-disk-utility] createfilesystempage: Check for vfat support
- From: Kai Lüke <kailueke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] createfilesystempage: Check for vfat support
- Date: Mon, 4 Apr 2022 19:56:10 +0000 (UTC)
commit 15462f9c87c08c5af77a31993c1d87cb34d04861
Author: Manuel Wassermann <manuel wassermann97 gmail com>
Date: Sun Mar 13 20:04:43 2022 +0100
createfilesystempage: Check for vfat support
Fixes: #242
src/disks/gducreatefilesystempage.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/disks/gducreatefilesystempage.c b/src/disks/gducreatefilesystempage.c
index 845d336a..5e50c522 100644
--- a/src/disks/gducreatefilesystempage.c
+++ b/src/disks/gducreatefilesystempage.c
@@ -193,20 +193,22 @@ gdu_create_filesystem_page_new (UDisksClient *client, UDisksDrive *drive)
if (drive != NULL && udisks_drive_get_removable (drive))
{
/* default FAT for flash and disks/media smaller than 20G (assumed to be flash cards) */
- if (gdu_utils_is_flash (drive) ||
+ if (gdu_utils_can_format (client, "vfat", FALSE, NULL) &&
+ (gdu_utils_is_flash (drive) ||
udisks_drive_get_size (drive) < 20UL * 1000UL*1000UL*1000UL ||
- !gdu_utils_can_format (client, "ntfs", FALSE, NULL)
+ !gdu_utils_can_format (client, "ntfs", FALSE, NULL))
)
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->all_radiobutton), TRUE);
}
- else
+ else if (gdu_utils_can_format (client, "ntfs", FALSE, NULL))
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->windows_radiobutton), TRUE);
}
}
gtk_widget_set_sensitive (GTK_WIDGET (priv->windows_radiobutton), gdu_utils_can_format (client, "ntfs",
FALSE, NULL));
+ gtk_widget_set_sensitive (GTK_WIDGET (priv->all_radiobutton), gdu_utils_can_format (client, "vfat", FALSE,
NULL));
return page;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]