[gnome-disk-utility] Uncheck "Perform write-benchmark" if a device is in use
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Uncheck "Perform write-benchmark" if a device is in use
- Date: Mon, 26 Nov 2012 19:25:57 +0000 (UTC)
commit dbf23244358db32e3fef15a05d3308b79c856042
Author: David Zeuthen <zeuthen gmail com>
Date: Mon Nov 26 14:24:05 2012 -0500
Uncheck "Perform write-benchmark" if a device is in use
This is a much better default. See bug 689088 for rationale.
https://bugzilla.gnome.org/show_bug.cgi?id=689088
Signed-off-by: David Zeuthen <zeuthen gmail com>
data/ui/benchmark-dialog.ui | 16 ++++++++--------
src/disks/gdubenchmarkdialog.c | 6 ++++++
2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/data/ui/benchmark-dialog.ui b/data/ui/benchmark-dialog.ui
index d9c15be..701fbff 100644
--- a/data/ui/benchmark-dialog.ui
+++ b/data/ui/benchmark-dialog.ui
@@ -313,13 +313,6 @@
<action-widget response="-7">button1</action-widget>
</action-widgets>
</object>
- <object class="GtkAdjustment" id="num-access-samples-adjustment">
- <property name="lower">2</property>
- <property name="upper">10000</property>
- <property name="value">1000</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
<object class="GtkDialog" id="dialog2">
<property name="can_focus">False</property>
<property name="border_width">12</property>
@@ -458,7 +451,7 @@
</child>
<child>
<object class="GtkCheckButton" id="write-checkbutton">
- <property name="label" translatable="yes">Also perform _write-benchmark</property>
+ <property name="label" translatable="yes">Perform _write-benchmark</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -614,6 +607,13 @@ If not checked, the write-part of the benchmark will not be done but on the othe
<action-widget response="-5">button3</action-widget>
</action-widgets>
</object>
+ <object class="GtkAdjustment" id="num-access-samples-adjustment">
+ <property name="lower">2</property>
+ <property name="upper">10000</property>
+ <property name="value">1000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkAdjustment" id="num-samples-adjustment">
<property name="lower">2</property>
<property name="upper">1000</property>
diff --git a/src/disks/gdubenchmarkdialog.c b/src/disks/gdubenchmarkdialog.c
index d5673c4..e6e549b 100644
--- a/src/disks/gdubenchmarkdialog.c
+++ b/src/disks/gdubenchmarkdialog.c
@@ -1509,6 +1509,12 @@ start_benchmark (DialogData *data)
gtk_widget_set_sensitive (write_checkbutton, FALSE);
}
+ /* If the device is currently in use, uncheck the "perform write-test" check-button */
+ if (gdu_utils_is_in_use (gdu_window_get_client (data->window), data->object))
+ {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (write_checkbutton), FALSE);
+ }
+
/* and scene... */
response = gtk_dialog_run (GTK_DIALOG (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]