summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-22 22:22:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-22 23:21:10 +0300
commit6b92425b46de741d4cda35027083fd988ac4e942 (patch)
tree4ea1b96d494d267ed3ceb835d611d4b095bc51f7 /src/gui/widgets
parent0fcce97fe86721f4b426250a32f461ad951f6d99 (diff)
downloadmanaverse-6b92425b46de741d4cda35027083fd988ac4e942.tar.gz
manaverse-6b92425b46de741d4cda35027083fd988ac4e942.tar.bz2
manaverse-6b92425b46de741d4cda35027083fd988ac4e942.tar.xz
manaverse-6b92425b46de741d4cda35027083fd988ac4e942.zip
Add option to accept language messages in any languge.
This messages will be showed in language or general tab.
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;