[gnome-disk-utility/udisks2-port] Make the "Attach Disk Image" dialog default to the Documents folder
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Make the "Attach Disk Image" dialog default to the Documents folder
- Date: Thu, 1 Dec 2011 17:29:37 +0000 (UTC)
commit 5bbcc420fddc057148b8b15657e21df96c2d3972
Author: David Zeuthen <davidz redhat com>
Date: Thu Dec 1 12:29:06 2011 -0500
Make the "Attach Disk Image" dialog default to the Documents folder
This is where we save Disk Images, by default, so makes sense to
default to loading them from there too.
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduwindow.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 1a8dabf..30d53e3 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -608,6 +608,7 @@ on_device_tree_attach_disk_image_button_clicked (GtkToolButton *button,
GUnixFDList *fd_list;
GVariantBuilder options_builder;
GtkWidget *ro_checkbutton;
+ const gchar *folder;
filename = NULL;
fd = -1;
@@ -632,6 +633,11 @@ on_device_tree_attach_disk_image_button_clicked (GtkToolButton *button,
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); /* adopts filter */
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+ /* Default to the "Documents" folder since that's where we save such images */
+ folder = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
+ if (folder != NULL)
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), folder);
+
/* Can't support non-local files because uid gets EPERM when doing fstat(2)
* an FD from the FUSE mount... it would be nice to support this, though
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]