Skip to content

Commit

Permalink
tpreferences: always apply suffix to bound status labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 21, 2016
1 parent 4f6be87 commit 8952ca0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/gui/dialogs/preferences_dialog.cpp
Expand Up @@ -274,7 +274,7 @@ void tpreferences::bind_status_label(T& parent, const std::string& label_id,

parent.set_callback_state_change(boost::bind(
&tpreferences::status_label_callback<T>,
this, boost::ref(parent), boost::ref(label)));
this, boost::ref(parent), boost::ref(label), ""));
}

void tpreferences::bind_status_label(tslider& parent, const std::string& label_id,
Expand All @@ -285,7 +285,7 @@ void tpreferences::bind_status_label(tslider& parent, const std::string& label_i

connect_signal_notify_modified(parent, boost::bind(
&tpreferences::status_label_callback<tslider>,
this, boost::ref(parent), boost::ref(label)));
this, boost::ref(parent), boost::ref(label), suffix));
}

void tpreferences::setup_friends_list(twindow& window)
Expand Down Expand Up @@ -962,9 +962,9 @@ void tpreferences::simple_combobox_callback(const tcombobox& widget,

template <typename T>
void tpreferences::status_label_callback(T& parent_widget,
tcontrol& label_widget)
tcontrol& label_widget, const std::string& suffix)
{
label_widget.set_label(disambiguate_widget_value(parent_widget));
label_widget.set_label(disambiguate_widget_value(parent_widget) + suffix);
}

// Special fullsceen callback
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/preferences_dialog.hpp
Expand Up @@ -180,7 +180,7 @@ class tpreferences : public tdialog

template <typename T>
void status_label_callback(T& parent_widget,
tcontrol& label_widget);
tcontrol& label_widget, const std::string& suffix = "");

typedef std::pair<ttoggle_button*, int> lobby_radio_toggle;
std::vector<lobby_radio_toggle> lobby_joins_;
Expand Down

0 comments on commit 8952ca0

Please sign in to comment.