summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-01-01 04:17:05 +0300
committerAndrei Karas <akaras@inbox.ru>2018-01-01 17:20:41 +0300
commitc508209585cc7153d77d22ddb7b4ce6a291d00de (patch)
tree124338089a53a9aafd32851743f8e90be33123b1 /src
parentcec43b2dca390a30ee71154a372f03ab498e18c2 (diff)
downloadplus-c508209585cc7153d77d22ddb7b4ce6a291d00de.tar.gz
plus-c508209585cc7153d77d22ddb7b4ce6a291d00de.tar.bz2
plus-c508209585cc7153d77d22ddb7b4ce6a291d00de.tar.xz
plus-c508209585cc7153d77d22ddb7b4ce6a291d00de.zip
Replace some status methods usage from member pointers to static member calls.
Diffstat (limited to 'src')
-rw-r--r--src/gui/theme.cpp8
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/label.cpp2
-rw-r--r--src/gui/widgets/listbox.cpp2
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/skillrectanglelistbox.h2
-rw-r--r--src/gui/widgets/staticbrowserbox.cpp2
-rw-r--r--src/gui/widgets/tabs/tab.cpp2
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/gui/widgets/window.cpp2
-rw-r--r--src/gui/windowmenu.cpp2
-rw-r--r--src/input/touch/touchmanager.cpp2
-rw-r--r--src/progs/dyecmd/client.cpp2
-rw-r--r--src/progs/manaplus/client.cpp2
-rw-r--r--src/test/testlauncher.cpp2
23 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 171415ec0..3a8691f6b 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1098,7 +1098,7 @@ void Theme::loadRect(ImageRect &image,
Skin *const skin = load(name,
name2,
false,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
loadGrid();
@@ -1115,7 +1115,7 @@ Skin *Theme::loadSkinRect(ImageRect &image,
Skin *const skin = load(name,
name2,
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
loadGrid();
return skin;
@@ -1141,7 +1141,7 @@ Image *Theme::getImageFromThemeXml(const std::string &name,
Skin *const skin = theme->load(name,
name2,
false,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
const ImageRect &rect = skin->getBorder();
@@ -1167,7 +1167,7 @@ ImageSet *Theme::getImageSetFromThemeXml(const std::string &name,
Skin *const skin = theme->load(name,
name2,
false,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
const ImageRect &rect = skin->getBorder();
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index fc9ae9698..258089365 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -104,7 +104,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mSkin = theme->load(skin,
"browserbox.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (mInstances == 0)
{
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index f8ddbc8f4..df71b5263 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -363,7 +363,7 @@ void Button::init()
Skin *const skin = theme->load(data[mode],
"button.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
button[mode] = skin;
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 81daf7cad..f61287b4f 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -120,7 +120,7 @@ CheckBox::CheckBox(const Widget2 *const widget,
mSkin = theme->load("checkbox.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
updateAlpha();
}
}
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 7a56035fb..1c66f3410 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -69,7 +69,7 @@ Desktop::Desktop(const Widget2 *const widget) :
mSkin = theme->load("desktop.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (mSkin != nullptr)
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 1f8b54bc1..9641c6e03 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -92,7 +92,7 @@ DropDown::DropDown(const Widget2 *const widget,
Skin *const skin = theme->load(dropdownFiles[i],
"dropdown.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
if (i == 0)
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 19d3a30b3..0d2472277 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -237,7 +237,7 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mName(),
mShowMatrix(nullptr),
mSkin(theme != nullptr ? theme->load("itemcontainer.xml", "",
- true, theme->getThemePath()) : nullptr),
+ true, Theme::getThemePath()) : nullptr),
mVertexes(new ImageCollection),
mEquipedColor(getThemeColor(ThemeColorId::ITEM_EQUIPPED, 255U)),
mEquipedColor2(getThemeColor(ThemeColorId::ITEM_EQUIPPED_OUTLINE, 255U)),
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index 6fb3ae39e..6c05aa8b6 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -135,7 +135,7 @@ void Label::init()
mSkin = theme->load("label.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
}
mInstances ++;
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index dcb0c4c9c..293a01f02 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -122,7 +122,7 @@ ListBox::ListBox(const Widget2 *const widget,
mSkin = theme->load(skin,
"listbox.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (mSkin != nullptr)
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 0ab2c27c8..0f6a7aa04 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -65,7 +65,7 @@ Popup::Popup(const std::string &name,
mSkin = theme->load(skin,
"popup.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (mSkin != nullptr)
{
setPadding(mSkin->getPadding());
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 0e01876f5..8289cbf6c 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -86,7 +86,7 @@ ProgressBar::ProgressBar(const Widget2 *const widget,
mSkin = theme->load(skin,
"progressbar.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (mSkin != nullptr)
{
setPadding(mSkin->getPadding());
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 62b5bae48..d7f2cf910 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -124,7 +124,7 @@ RadioButton::RadioButton(const Widget2 *const widget,
mSkin = theme->load("radio.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
updateAlpha();
}
}
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index a99d5cc3c..bdbddb929 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -238,7 +238,7 @@ void ScrollArea::init(std::string skinName)
skin = theme->load(buttonFiles[i],
"scrollbuttons.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (skin != nullptr)
{
diff --git a/src/gui/widgets/skillrectanglelistbox.h b/src/gui/widgets/skillrectanglelistbox.h
index 56f2982fd..014ef6393 100644
--- a/src/gui/widgets/skillrectanglelistbox.h
+++ b/src/gui/widgets/skillrectanglelistbox.h
@@ -77,7 +77,7 @@ class SkillRectangleListBox final : public Widget,
mSkin = theme->load("skillrectanglelistbox.xml",
"listbox.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (mSkin != nullptr)
diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp
index cd252cce1..ab3e4463c 100644
--- a/src/gui/widgets/staticbrowserbox.cpp
+++ b/src/gui/widgets/staticbrowserbox.cpp
@@ -99,7 +99,7 @@ StaticBrowserBox::StaticBrowserBox(const Widget2 *const widget,
mSkin = theme->load(skin,
"browserbox.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
if (mInstances == 0)
{
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 9dc6c4068..a1fe1607f 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -169,7 +169,7 @@ void Tab::init()
tabImg[mode] = theme->load(data[mode],
"tab.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
}
updateAlpha();
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 3feaf08c0..2d17ac54a 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -60,7 +60,7 @@ TextPreview::TextPreview(const Widget2 *const widget,
mSkin = theme->load("textpreview.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
}
}
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 704b30834..3e2e5a506 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -190,7 +190,7 @@ Window::Window(const std::string &caption,
mSkin = theme->load(skin,
"window.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (mSkin != nullptr)
{
setPadding(mSkin->getPadding());
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index ba4993954..da6b2a49f 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -53,7 +53,7 @@ WindowMenu::WindowMenu(const Widget2 *const widget) :
SelectionListener(),
MouseListener(),
mSkin(theme != nullptr ? theme->load("windowmenu.xml", "",
- true, theme->getThemePath()) : nullptr),
+ true, Theme::getThemePath()) : nullptr),
mPadding(mSkin != nullptr ? mSkin->getPadding() : 1),
mSpacing(mSkin != nullptr ? mSkin->getOption("spacing", 3) : 3),
mButtons(),
diff --git a/src/input/touch/touchmanager.cpp b/src/input/touch/touchmanager.cpp
index dda8cf938..d2d4161c2 100644
--- a/src/input/touch/touchmanager.cpp
+++ b/src/input/touch/touchmanager.cpp
@@ -434,7 +434,7 @@ void TouchManager::loadButtons() restrict2
Skin *const skin = theme->load("dbutton.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin != nullptr)
{
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index 199f91ecd..d63e16a90 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -358,7 +358,7 @@ void Client::gameInit()
mSkin = theme->load("windowmenu.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (mSkin != nullptr)
{
mButtonPadding = mSkin->getPadding();
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 89de4cb5b..ef47a418e 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -538,7 +538,7 @@ void Client::gameInit()
mSkin = theme->load("windowmenu.xml",
"",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (mSkin != nullptr)
{
mButtonPadding = mSkin->getPadding();
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 841ca4094..b331d07cf 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -737,7 +737,7 @@ int TestLauncher::testDraw()
Skin *skin = theme->load("button.xml",
"button.xml",
true,
- theme->getThemePath());
+ Theme::getThemePath());
if (skin == nullptr)
return 0;