summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chat.cpp2
-rw-r--r--src/gui/setup.cpp11
-rw-r--r--src/gui/setup.h4
-rw-r--r--src/gui/setup_colors.cpp5
-rw-r--r--src/gui/skill.cpp2
-rw-r--r--src/gui/table.cpp1
-rw-r--r--src/gui/window.cpp2
7 files changed, 6 insertions, 21 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 44e08052..098d4e46 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -109,8 +109,6 @@ ChatWindow::~ChatWindow()
config.setValue("PartyPrefix", partyPrefix);
config.setValue("ReturnToggles", mReturnToggles ? "1" : "0");
delete mRecorder;
- delete mItemLinkHandler;
- delete mParty;
}
void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index b24aeb5d..4798f598 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -65,9 +65,9 @@ Setup::Setup():
btn->setPosition(x, height - btn->getHeight() - 5);
add(btn);
- // Store this button, as it needs to be enabled/disabled
+ // Disable this button when the windows aren't created yet
if (!strcmp(*curBtn, "Reset Windows"))
- mResetWindows = btn;
+ btn->setEnabled(statusWindow != NULL);
}
TabbedArea *panel = new TabbedArea();
@@ -102,8 +102,6 @@ Setup::Setup():
add(panel);
setLocationRelativeTo(getParent());
-
- setInGame(false);
}
Setup::~Setup()
@@ -143,8 +141,3 @@ void Setup::action(const gcn::ActionEvent &event)
tradeWindow->resetToDefaultSize();
}
}
-
-void Setup::setInGame(bool inGame)
-{
- mResetWindows->setEnabled(inGame);
-} \ No newline at end of file
diff --git a/src/gui/setup.h b/src/gui/setup.h
index d798162c..9f1bafc7 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -32,7 +32,6 @@
#include "../guichanfwd.h"
class SetupTab;
-class Button;
/**
* The setup dialog.
@@ -52,8 +51,6 @@ class Setup : public Window, public gcn::ActionListener
*/
~Setup();
- void setInGame(bool inGame);
-
/**
* Event handling method.
*/
@@ -61,7 +58,6 @@ class Setup : public Window, public gcn::ActionListener
private:
std::list<SetupTab*> mTabs;
- gcn::Button *mResetWindows;
};
#endif
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index ecb5bcf7..31b56b51 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -57,8 +57,9 @@ Setup_Colors::Setup_Colors() :
mPreview = new BrowserBox(BrowserBox::AUTO_WRAP);
mPreview->setOpaque(false);
- // don't do anything with links
- mPreview->setLinkHandler(NULL);
+ // Replace this later with a more appropriate link handler. For now, this'll
+ // do, as it'll do nothing when clicked on.
+ mPreview->setLinkHandler(new ItemLinkHandler());
mPreviewBox = new ScrollArea(mPreview);
mPreviewBox->setHeight(20);
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index c29b70ab..a8250fce 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -162,7 +162,7 @@ SkillDialog::SkillDialog():
SkillDialog::~SkillDialog()
{
- delete_all(mSkillList);
+ delete mTable;
}
void SkillDialog::action(const gcn::ActionEvent &event)
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 7d0fd48a..b2571495 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -99,7 +99,6 @@ GuiTable::GuiTable(TableModel *initial_model, gcn::Color background,
GuiTable::~GuiTable(void)
{
- uninstallActionListeners();
delete mModel;
}
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index b0bf1c59..bf1ec01c 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -130,8 +130,6 @@ Window::~Window()
delete(w);
}
- removeWidgetListener(this);
-
instances--;
// Clean up static resources