summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2008-07-23 17:23:30 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2008-07-23 17:23:30 +0000
commit88af5cb15a02a26f4a5990ba3ef4df46e572bff4 (patch)
tree2048504328935423b0e4aa02cc58b5265c24d432 /src/gui
parentc17120c9838665fd546c6ae7a1d81de79659d429 (diff)
downloadmana-88af5cb15a02a26f4a5990ba3ef4df46e572bff4.tar.gz
mana-88af5cb15a02a26f4a5990ba3ef4df46e572bff4.tar.bz2
mana-88af5cb15a02a26f4a5990ba3ef4df46e572bff4.tar.xz
mana-88af5cb15a02a26f4a5990ba3ef4df46e572bff4.zip
Remember windows visibility.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buy.cpp1
-rw-r--r--src/gui/itemshortcutwindow.cpp2
-rw-r--r--src/gui/sell.cpp1
-rw-r--r--src/gui/window.cpp2
4 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 259fcfd9..4dee6813 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -42,6 +42,7 @@ BuyDialog::BuyDialog(Network *network):
Window("Buy"), mNetwork(network),
mMoney(0), mAmountItems(0), mMaxItems(0)
{
+ setWindowName("Buy");
setResizable(true);
setMinWidth(260);
setMinHeight(230);
diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp
index 3724516a..de1a23a1 100644
--- a/src/gui/itemshortcutwindow.cpp
+++ b/src/gui/itemshortcutwindow.cpp
@@ -30,7 +30,7 @@ static const int SCROLL_PADDING = 0;
ItemShortcutWindow::ItemShortcutWindow()
{
- setWindowName("itemShortcut");
+ setWindowName("ItemShortcut");
// no title presented, title bar is padding so window can be moved.
gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
setShowTitle(false);
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 82d340fb..d13be2db 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -48,6 +48,7 @@ SellDialog::SellDialog(Network *network):
mNetwork(network),
mMaxItems(0), mAmountItems(0)
{
+ setWindowName("Sell");
setResizable(true);
setMinWidth(260);
setMinHeight(230);
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 4ce167cd..1c5072f5 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -137,6 +137,7 @@ Window::~Window()
// Saving X, Y and Width and Height for resizables in the config
config.setValue(name + "WinX", getX());
config.setValue(name + "WinY", getY());
+ config.setValue(name + "Visible", isVisible());
if (mGrip)
{
@@ -476,6 +477,7 @@ Window::loadWindowState()
setPosition((int) config.getValue(name + "WinX", mDefaultX),
(int) config.getValue(name + "WinY", mDefaultY));
+ setVisible((bool) config.getValue(name + "Visible", false));
if (mGrip)
{