make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / protocols / irc / ircguiclient.cpp
blob757d84de123c86299890a8a641d9c2c0d5ebcd63
1 /*
2 ircguiclient.cpp
4 Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
5 Kopete (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
7 Kopete (c) 2003-2007 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 *************************************************************************
19 #include "ircguiclient.h"
20 #include "ircaccount.h"
21 #include "irccontact.h"
23 #include "kopetechatsession.h"
25 #include <kaction.h>
26 #include <kdebug.h>
27 #include <klocale.h>
29 #include <qdom.h>
30 #include <QList>
32 IRCGUIClient::IRCGUIClient(Kopete::ChatSession *parent)
33 : QObject(parent)
34 , KXMLGUIClient(parent)
35 // , m_contact(static_cast<IRCContact*>(parent->myself()))
37 Q_ASSERT(m_contact);
39 #ifdef __GNUC__
40 #warning FIXME: Why does not this work???? Have to use DOM hack below now...
41 #endif
43 setXMLFile("ircchatui.rc");
45 // setup();
46 unplugActionList( "irccontactactionlist" );
47 plugActionList( "irccontactactionlist", m_contact->customContextMenuActions( parent ) );
50 setXMLFile("ircchatui.rc");
52 QDomDocument doc = domDocument();
53 QDomNode menu = doc.documentElement().firstChild().firstChild();
54 QList<KAction *> *actions = m_contact->customContextMenuActions( parent );
55 for( KAction *actions, m_contact->customContextMenuActions( parent ))
57 actionCollection()->insert(action);
58 QDomElement newNode = doc.createElement( "Action" );
59 newNode.setAttribute( "name", action->name() );
60 menu.appendChild( newNode );
62 setDOMDocument( doc );
66 IRCGUIClient::~IRCGUIClient()
70 void IRCGUIClient::updateMenu()
72 unplugActionList( "irccontactactionlist" );
74 plugActionList( "irccontactactionlist", m_contact->customContextMenuActions( parent ) );
77 void IRCGUIClient::slotSelectCodec(QTextCodec *codec)
79 // m_contact->setCodec(codec);
82 #include "ircguiclient.moc"