summaryrefslogtreecommitdiff
path: root/src/gui/widgets/emoteshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-06 14:49:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-06 14:49:47 +0300
commitc649cf883480071c9b93909c4ea4ee5ec98155b2 (patch)
tree71022fd2db59c643c19c78c5524ffcd038e35a7f /src/gui/widgets/emoteshortcutcontainer.cpp
parent4cab6fc78e19799f223d951d5ccc9afb303b65f2 (diff)
downloadplus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.gz
plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.bz2
plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.xz
plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.zip
Remove some duplicate code.
Diffstat (limited to 'src/gui/widgets/emoteshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index 85e07e2b7..0d802034e 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -39,6 +39,7 @@
#include "resources/db/emotedb.h"
#include "utils/stringutils.h"
+#include "utils/delete2.h"
#include "debug.h"
@@ -53,13 +54,6 @@ EmoteShortcutContainer::EmoteShortcutContainer(Widget2 *const widget) :
{
mEmotePopup->postInit();
- addMouseListener(this);
- addWidgetListener(this);
-
- mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
- mBackgroundImg = Theme::getImageFromThemeXml(
- "item_shortcut_background.xml", "background.xml");
-
if (mBackgroundImg)
mBackgroundImg->setAlpha(settings.guiAlpha);
@@ -72,29 +66,11 @@ EmoteShortcutContainer::EmoteShortcutContainer(Widget2 *const widget) :
}
mMaxItems = MAX_ITEMS;
-
- if (mBackgroundImg)
- {
- mBoxHeight = mBackgroundImg->getHeight();
- mBoxWidth = mBackgroundImg->getWidth();
- }
- else
- {
- mBoxHeight = 1;
- mBoxWidth = 1;
- }
- mForegroundColor = getThemeColor(Theme::TEXT);
}
EmoteShortcutContainer::~EmoteShortcutContainer()
{
- delete mEmotePopup;
-
- if (mBackgroundImg)
- {
- mBackgroundImg->decRef();
- mBackgroundImg = nullptr;
- }
+ delete2(mEmotePopup);
}
void EmoteShortcutContainer::setWidget2(const Widget2 *const widget)