summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/setupitem.cpp6
-rw-r--r--src/gui/widgets/setupitem.h2
-rw-r--r--src/gui/widgets/setuptabscroll.cpp7
-rw-r--r--src/gui/widgets/setuptabscroll.h2
4 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 0e9fa993c..fbb24d2b6 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -180,6 +180,12 @@ void SetupItem::fixFirstItemSize(gcn::Widget *const widget)
widget->setWidth(maxSize);
}
+void SetupItem::rereadValue()
+{
+ load();
+ toWidget();
+}
+
SetupItemCheckBox::SetupItemCheckBox(std::string text, std::string description,
std::string keyName,
SetupTabScroll *const parent,
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index f660500a8..d91f0ac2e 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -107,6 +107,8 @@ class SetupItem : public gcn::ActionListener,
void fixFirstItemSize(gcn::Widget *const widget);
+ void rereadValue();
+
protected:
std::string mText;
diff --git a/src/gui/widgets/setuptabscroll.cpp b/src/gui/widgets/setuptabscroll.cpp
index 89077dd8c..ec8f36eba 100644
--- a/src/gui/widgets/setuptabscroll.cpp
+++ b/src/gui/widgets/setuptabscroll.cpp
@@ -124,3 +124,10 @@ void SetupTabScroll::widgetResized(const gcn::Event &event A_UNUSED)
mScroll->setWidth(getWidth() - 12);
mScroll->setHeight(getHeight() - 12 - 12);
}
+
+void SetupTabScroll::reread(const std::string &name)
+{
+ SetupItem *const item = mItems[name + "Event"];
+ if (item)
+ item->rereadValue();
+}
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index e90ce28c2..2417bd400 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -62,6 +62,8 @@ class SetupTabScroll : public SetupTab
void widgetResized(const gcn::Event &event) override;
+ void reread(const std::string &name);
+
protected:
VertContainer *mContainer;
ScrollArea *mScroll;