[gnome-disk-utility] disk-image-mounter: make the "Set up read-only mount" check-button work



commit 46fcb71d93075e3b57e40d65759ed01a1a4a386f
Author: David Zeuthen <davidz redhat com>
Date:   Wed May 2 17:28:16 2012 -0400

    disk-image-mounter: make the "Set up read-only mount" check-button work
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 src/disk-image-mounter/main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/disk-image-mounter/main.c b/src/disk-image-mounter/main.c
index 01d0e1e..4cfb990 100644
--- a/src/disk-image-mounter/main.c
+++ b/src/disk-image-mounter/main.c
@@ -125,8 +125,8 @@ do_filechooser (void)
 
   /* Add a RO check button that defaults to RO */
   ro_checkbutton = gtk_check_button_new_with_mnemonic (_("Set up _read-only mount"));
-  gtk_widget_set_tooltip_markup (ro_checkbutton, _("If checked, the mounts will be read-only. This is useful if you don't want the underlying disk image to be modified"));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ro_checkbutton), TRUE);
+  gtk_widget_set_tooltip_markup (ro_checkbutton, _("If checked, the mount will be read-only. This is useful if you don't want the underlying disk image to be modified"));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ro_checkbutton), !opt_writable);
   gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
   gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), ro_checkbutton);
 
@@ -135,6 +135,7 @@ do_filechooser (void)
     goto out;
 
   ret = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (dialog));
+  opt_writable = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ro_checkbutton));
 
  out:
   gtk_widget_destroy (dialog);



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