[gnome-disk-utility/kailueke/show-full-dialog-from-nautilus] Always show other filesystem format choices



commit 7f735af9694671cd8f2642305e4eebad965ee7ec
Author: Kai Lüke <kailueke riseup net>
Date:   Thu Apr 16 23:50:21 2020 +0200

    Always show other filesystem format choices
    
    The decision to hide the option to use other filesystems than the standard
    choices when invoked from Nautilus often was a source of confusion because
    users had seen this option before when they were using GNOME Disks directly
    or they were searching for the filesystem they needed but it was hidden and
    they never considered opening GNOME Disks directly.
    
    Always display the choice to select any other filesystem to resolve this
    confusion. (This is particularly important when people have to use the exFAT
    filesystem for, e.g., their camera SDXC cards. Currently I don't have such
    a device to see how we could autodetect it and suggest it automatically
    among the standard choices. But anyway, the other filesystems should be
    available through Nautilus, too.)

 src/disks/gduapplication.c          | 4 ++--
 src/disks/gducreatefilesystempage.c | 5 +----
 src/disks/gducreatefilesystempage.h | 1 -
 src/disks/gducreateformatdialog.c   | 3 +--
 src/disks/gducreateformatdialog.h   | 1 -
 src/disks/gduwindow.c               | 3 +--
 6 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/disks/gduapplication.c b/src/disks/gduapplication.c
index c4697fe3..b904ac72 100644
--- a/src/disks/gduapplication.c
+++ b/src/disks/gduapplication.c
@@ -258,14 +258,14 @@ gdu_application_command_line (GApplication            *_app,
           gdu_window_select_object (app->window, object_to_select);
           if (opt_format)
             gdu_create_format_show (app->client, GTK_WINDOW (app->window), object_to_select,
-                                    FALSE, FALSE, 0, 0, NULL, NULL);
+                                    FALSE, 0, 0, NULL, NULL);
         }
     }
   else if (opt_format)
     {
       g_application_hold (_app);
       gdu_create_format_show (app->client, NULL, object_to_select,
-                              FALSE, FALSE, 0, 0, (GCallback) g_application_release, _app);
+                              FALSE, 0, 0, (GCallback) g_application_release, _app);
     }
 
   if (opt_restore_disk_image != NULL)
diff --git a/src/disks/gducreatefilesystempage.c b/src/disks/gducreatefilesystempage.c
index 8bf4c2e1..326bd761 100644
--- a/src/disks/gducreatefilesystempage.c
+++ b/src/disks/gducreatefilesystempage.c
@@ -173,7 +173,7 @@ on_fs_type_changed (GtkToggleButton *object, gpointer user_data)
 }
 
 GduCreateFilesystemPage *
-gdu_create_filesystem_page_new (UDisksClient *client, gboolean show_custom, UDisksDrive *drive)
+gdu_create_filesystem_page_new (UDisksClient *client, UDisksDrive *drive)
 {
   GduCreateFilesystemPage *page;
   GduCreateFilesystemPagePrivate *priv;
@@ -189,9 +189,6 @@ gdu_create_filesystem_page_new (UDisksClient *client, gboolean show_custom, UDis
 
   g_object_bind_property (priv->internal_radiobutton, "active", priv->internal_encrypt_checkbutton, 
"sensitive", G_BINDING_SYNC_CREATE);
 
-  if (!show_custom)
-    gtk_widget_hide (GTK_WIDGET (priv->other_radiobutton));
-
   /* Default to FAT or NTFS for removable drives... */
   if (drive != NULL && udisks_drive_get_removable (drive))
     {
diff --git a/src/disks/gducreatefilesystempage.h b/src/disks/gducreatefilesystempage.h
index af38c055..e6a399f6 100644
--- a/src/disks/gducreatefilesystempage.h
+++ b/src/disks/gducreatefilesystempage.h
@@ -18,7 +18,6 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (GduCreateFilesystemPage, gdu_create_filesystem_page, GDU, CREATE_FILESYSTEM_PAGE, 
GtkGrid)
 
 GduCreateFilesystemPage *gdu_create_filesystem_page_new          (UDisksClient *client,
-                                                                  gboolean      show_custom,
                                                                   UDisksDrive  *drive);
 
 const gchar *            gdu_create_filesystem_page_get_name     (GduCreateFilesystemPage *page);
diff --git a/src/disks/gducreateformatdialog.c b/src/disks/gducreateformatdialog.c
index 626b9489..c93f3e01 100644
--- a/src/disks/gducreateformatdialog.c
+++ b/src/disks/gducreateformatdialog.c
@@ -396,7 +396,6 @@ void
 gdu_create_format_show (UDisksClient *client,
                         GtkWindow    *parent_window,
                         UDisksObject *object,
-                        gboolean      show_custom,  /* e.g. hide custom format page from nautilus */
                         gboolean      add_partition, /* format vs add partition and format */
                         guint64       add_partition_offset,
                         guint64       add_partition_maxsize,
@@ -440,7 +439,7 @@ gdu_create_format_show (UDisksClient *client,
       data->partition_page = NULL;
     }
 
-  data->filesystem_page = gdu_create_filesystem_page_new (data->client, show_custom, data->drive);
+  data->filesystem_page = gdu_create_filesystem_page_new (data->client, data->drive);
   gtk_stack_add_titled (data->stack, GTK_WIDGET (data->filesystem_page), FORMAT_PAGE, _("Format Volume"));
   g_signal_connect (data->filesystem_page, "notify::complete", G_CALLBACK (update_dialog), data);
   data->other_page = gdu_create_other_page_new (data->client);
diff --git a/src/disks/gducreateformatdialog.h b/src/disks/gducreateformatdialog.h
index c3864aab..8c4689c1 100644
--- a/src/disks/gducreateformatdialog.h
+++ b/src/disks/gducreateformatdialog.h
@@ -17,7 +17,6 @@ G_BEGIN_DECLS
 void gdu_create_format_show (UDisksClient *client,
                              GtkWindow    *parent_window,
                              UDisksObject *object,
-                             gboolean      show_custom,
                              gboolean      add_partition,
                              guint64       add_partition_offset,
                              guint64       add_partition_maxsize,
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index da7652ec..70e8f6d2 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -3266,7 +3266,7 @@ on_volume_menu_item_format_volume (GSimpleAction *action,
 
   object = gdu_volume_grid_get_selected_device (GDU_VOLUME_GRID (window->volume_grid));
   g_assert (object != NULL);
-  gdu_create_format_show (gdu_window_get_client (window), GTK_WINDOW (window), object, TRUE, FALSE, 0, 0, 
NULL, NULL);
+  gdu_create_format_show (gdu_window_get_client (window), GTK_WINDOW (window), object, FALSE, 0, 0, NULL, 
NULL);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -3718,7 +3718,6 @@ on_partition_create_tool_button_clicked (GtkToolButton *button, gpointer user_da
                           GTK_WINDOW (window),
                           object,
                           TRUE,
-                          TRUE,
                           gdu_volume_grid_get_selected_offset (GDU_VOLUME_GRID (window->volume_grid)),
                           gdu_volume_grid_get_selected_size (GDU_VOLUME_GRID (window->volume_grid)),
                           NULL, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]