~ubuntu-branches/ubuntu/vivid/manaplus/vivid-proposed

« back to all changes in this revision

Viewing changes to src/gui/widgets/tabs/gmtab.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Andrei Karas, Patrick Matthäi
  • Date: 2014-10-27 18:15:40 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20141027181540-jvyjufjo9igruklh
Tags: 1.4.10.25-1
[ Andrei Karas ]
* Updated debian/copyright.

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  The ManaPlus Client
3
 
 *  Copyright (C) 2013-2014  The ManaPlus Developers
4
 
 *
5
 
 *  This file is part of The ManaPlus Client.
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; either version 2 of the License, or
10
 
 *  any later version.
11
 
 *
12
 
 *  This program is distributed in the hope that it will be useful,
13
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 *  GNU General Public License for more details.
16
 
 *
17
 
 *  You should have received a copy of the GNU General Public License
18
 
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 
 */
20
 
 
21
 
#include "gui/widgets/tabs/gmtab.h"
22
 
 
23
 
#include "chatlogger.h"
24
 
 
25
 
#include "utils/gettext.h"
26
 
 
27
 
#include "debug.h"
28
 
 
29
 
GmTab *gmChatTab = nullptr;
30
 
 
31
 
GmTab::GmTab(const Widget2 *const widget) :
32
 
    // TRANSLATORS: gb tab name
33
 
    ChatTab(widget, _("GM"), "")
34
 
{
35
 
    setTabColor(&getThemeColor(Theme::GM_CHAT_TAB),
36
 
        &getThemeColor(Theme::GM_CHAT_TAB_OUTLINE));
37
 
    setHighlightedTabColor(&getThemeColor(Theme::GM_CHAT_TAB_HIGHLIGHTED),
38
 
        &getThemeColor(Theme::GM_CHAT_TAB_HIGHLIGHTED_OUTLINE));
39
 
    setSelectedTabColor(&getThemeColor(Theme::GM_CHAT_TAB_SELECTED),
40
 
        &getThemeColor(Theme::GM_CHAT_TAB_SELECTED_OUTLINE));
41
 
}
42
 
 
43
 
GmTab::~GmTab()
44
 
{
45
 
}
46
 
 
47
 
void GmTab::handleInput(const std::string &msg)
48
 
{
49
 
    ChatTab::handleInput("@wgm " + msg);
50
 
}
51
 
 
52
 
void GmTab::handleCommand(const std::string &msg A_UNUSED)
53
 
{
54
 
}
55
 
 
56
 
void GmTab::saveToLogFile(const std::string &msg) const
57
 
{
58
 
    if (chatLogger)
59
 
        chatLogger->log("#GM", msg);
60
 
}
61
 
 
62
 
void GmTab::getAutoCompleteList(StringVect &names A_UNUSED) const
63
 
{
64
 
}