Skip to content

Commit

Permalink
tpreferences: small simplification to Max Autosaves setup
Browse files Browse the repository at this point in the history
It's more consistent to keep the setter in the custom callback
  • Loading branch information
Vultraz committed Feb 16, 2016
1 parent 1505c33 commit 1f73f6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/dialogs/preferences_dialog.cpp
Expand Up @@ -465,12 +465,11 @@ void tpreferences::initialize_members(twindow& window)
delete_saves(), set_delete_saves, window);

/** MAX AUTO SAVES **/
setup_single_slider("max_saves_slider",
autosavemax(), set_autosavemax, window);

tslider& autosaves_slider = find_widget<tslider>(&window, "max_saves_slider", false);
tcontrol& autosaves_label = find_widget<tcontrol>(&window, "max_saves_value", false);

autosaves_slider.set_value(autosavemax());

autosaves_label.set_label(get_max_autosaves_status_label(autosaves_slider));
autosaves_label.set_use_markup(true);

Expand Down Expand Up @@ -978,6 +977,7 @@ void tpreferences::accl_speed_slider_callback(tslider& slider)
// Special Max Autosaves slider callback
void tpreferences::max_autosaves_slider_callback(tslider& slider, tcontrol& status_label)
{
set_autosavemax(slider.get_value());
status_label.set_label(get_max_autosaves_status_label(slider));
}

Expand Down

0 comments on commit 1f73f6b

Please sign in to comment.