[tracker] tracker-preferences: Workaround for gtk+ bug setting scalers to max default
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-preferences: Workaround for gtk+ bug setting scalers to max default
- Date: Mon, 5 Apr 2010 09:03:42 +0000 (UTC)
commit c5a15f8231c63488605d799b9670aba01898fde4
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Apr 5 11:01:03 2010 +0200
tracker-preferences: Workaround for gtk+ bug setting scalers to max default
The scaler type in gtk+ seems to be setting the scaler's value to its max
default when the scaler is in a tab, the tab isn't open and
gtk_widget_show_all is called for. It also signals when this happens the
changed signal. In the signal handler we set the config object. If the tab
is never activated that means that we've written the config value with some-
thing the user didn't ask for (the default max value). I workaround-fixed
this by only setting the config object on apply-click.
src/tracker-preferences/tracker-preferences.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-preferences/tracker-preferences.vala b/src/tracker-preferences/tracker-preferences.vala
index 7b44f8a..3691df4 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -105,8 +105,6 @@ public static void checkbutton_index_optical_discs_toggled_cb (CheckButton sourc
}
public static string hscale_disk_space_limit_format_value_cb (Scale source, double value) {
- config.low_disk_space_limit = (int) value;
-
if (((int) value) == -1) {
return _("Disabled");
}
@@ -115,7 +113,6 @@ public static string hscale_disk_space_limit_format_value_cb (Scale source, doub
}
public static string hscale_throttle_format_value_cb (Scale source, double value) {
- config.throttle = (int) value;
return _("%d/20").printf ((int) value);
}
@@ -273,6 +270,9 @@ public static void button_apply_clicked_cb (Button source) {
config.ignored_directories_with_content = model_to_slist (liststore_gnored_directories_with_content);
config.index_recursive_directories = model_to_slist (liststore_index_recursively);
+ config.low_disk_space_limit = (int) hscale_disk_space_limit.get_value ();
+ config.throttle = (int) hscale_throttle.get_value ();
+
config.save ();
icon_config.save ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]