Commit c5a15f82 authored by Philip Van Hoof's avatar Philip Van Hoof
Browse files

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.
parent bcd46bfc
......@@ -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 (); (); ();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment