~ubuntu-branches/ubuntu/precise/konversation/precise-updates

« back to all changes in this revision

Viewing changes to src/viewer/viewcontainer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-17 09:50:41 UTC
  • mfrom: (1.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091217095041-k5ssvxm2u8wgf0ll
Tags: 1.2.1+git20091217-0ubuntu1
* New upstream git snapshot:
  - Refresh all patches
  - Update initial Indicator patch to apply properly.
  - Remove docs and locale files from the install manifest; they aren't
    present in git snapshots. We will uncomment them for official (pre)
    releases with tarballs from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "urlcatcher.h"
23
23
#include "transferpanel.h"
24
24
#include "transfermanager.h"
25
 
#include "chat.h"
 
25
#include "chatcontainer.h"
26
26
#include "statuspanel.h"
27
27
#include "channel.h"
28
28
#include "query.h"
2156
2156
    return m_dccPanel;
2157
2157
}
2158
2158
 
2159
 
void ViewContainer::addDccChat(const QString& myNick,const QString& nick,const QStringList& arguments,bool listen)
 
2159
void ViewContainer::addDccChat(DCC::Chat* chat)
2160
2160
{
2161
 
    if (!listen) // Someone else initiated dcc chat
 
2161
    if (!chat->selfOpened()) // Someone else initiated dcc chat
2162
2162
    {
2163
2163
        Application* konv_app=static_cast<Application*>(KApplication::kApplication());
2164
 
        konv_app->notificationHandler()->dccChat(m_frontView, nick);
2165
 
    }
2166
 
 
2167
 
    if (m_frontServer)
2168
 
    {
2169
 
        DCC::Chat* dccChatPanel=listen
2170
 
            ? new DCC::Chat(m_tabWidget, listen, m_frontServer, myNick, nick )
2171
 
            : new DCC::Chat(m_tabWidget, listen, m_frontServer, myNick, nick, arguments[1], arguments[2].toInt() );
2172
 
 
2173
 
        connect(dccChatPanel, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)), this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
2174
 
 
2175
 
        // This needs to be here as addView will change m_frontServer if focus new tabs is enabled.
2176
 
        addView(dccChatPanel, dccChatPanel->getName());
2177
 
    }
 
2164
        konv_app->notificationHandler()->dccChat(m_frontView, chat->partnerNick());
 
2165
    }
 
2166
 
 
2167
    DCC::ChatContainer *chatcontainer = new DCC::ChatContainer(m_tabWidget,chat);
 
2168
    connect(chatcontainer, SIGNAL(updateTabNotification(ChatWindow*,const Konversation::TabNotifyType&)),
 
2169
            this, SLOT(setViewNotification(ChatWindow*,const Konversation::TabNotifyType&)));
 
2170
 
 
2171
    addView(chatcontainer, chatcontainer->getName());
2178
2172
}
2179
2173
 
2180
2174
StatusPanel* ViewContainer::addStatusView(Server* server)