2008-06-20 08:43:23 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Robert Fernie
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
#include <QtGui>
|
|
|
|
|
|
|
|
#include "NewsFeed.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "rsiface/rsnotify.h"
|
|
|
|
|
2008-07-04 10:41:24 -04:00
|
|
|
#include "feeds/ChanNewItem.h"
|
2008-06-20 08:43:23 -04:00
|
|
|
#include "feeds/ChanMsgItem.h"
|
|
|
|
#include "feeds/ForumNewItem.h"
|
|
|
|
#include "feeds/ForumMsgItem.h"
|
|
|
|
#include "feeds/PeerItem.h"
|
|
|
|
#include "feeds/BlogMsgItem.h"
|
2008-07-04 10:41:24 -04:00
|
|
|
#include "feeds/MsgItem.h"
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2009-12-14 12:13:10 -05:00
|
|
|
#include "settings/rsharesettings.h"
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
#include "GeneralMsgDialog.h"
|
|
|
|
|
|
|
|
|
|
|
|
const uint32_t NEWSFEED_PEERLIST = 0x0001;
|
|
|
|
const uint32_t NEWSFEED_FORUMNEWLIST = 0x0002;
|
|
|
|
const uint32_t NEWSFEED_FORUMMSGLIST = 0x0003;
|
|
|
|
const uint32_t NEWSFEED_CHANNEWLIST = 0x0004;
|
|
|
|
const uint32_t NEWSFEED_CHANMSGLIST = 0x0005;
|
|
|
|
const uint32_t NEWSFEED_BLOGMSGLIST = 0x0006;
|
2008-07-04 10:41:24 -04:00
|
|
|
const uint32_t NEWSFEED_MESSAGELIST = 0x0007;
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
/*****
|
|
|
|
* #define NEWS_DEBUG 1
|
|
|
|
****/
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
/** Constructor */
|
|
|
|
NewsFeed::NewsFeed(QWidget *parent)
|
|
|
|
: MainPage (parent)
|
|
|
|
{
|
|
|
|
/* Invoke the Qt Designer generated object setup routine */
|
|
|
|
setupUi(this);
|
|
|
|
|
|
|
|
|
|
|
|
QTimer *timer = new QTimer(this);
|
|
|
|
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateFeed()));
|
|
|
|
timer->start(1000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::updateFeed()
|
|
|
|
{
|
|
|
|
if (!rsNotify)
|
|
|
|
return;
|
|
|
|
|
2008-12-07 09:19:13 -05:00
|
|
|
/** A RshareSettings object used for saving/loading settings */
|
|
|
|
RshareSettings settings;
|
|
|
|
uint flags = settings.getNewsFeedFlags();
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
/* check for new messages */
|
|
|
|
RsFeedItem fi;
|
|
|
|
if (rsNotify->GetFeedItem(fi))
|
|
|
|
{
|
|
|
|
switch(fi.mType)
|
|
|
|
{
|
|
|
|
case RS_FEED_ITEM_PEER_CONNECT:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_PEER)
|
|
|
|
addFeedItemPeerConnect(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_PEER_DISCONNECT:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_PEER)
|
|
|
|
addFeedItemPeerDisconnect(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_PEER_NEW:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_PEER)
|
|
|
|
addFeedItemPeerNew(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_PEER_HELLO:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_PEER)
|
|
|
|
addFeedItemPeerHello(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RS_FEED_ITEM_CHAN_NEW:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_CHAN)
|
|
|
|
addFeedItemChanNew(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_CHAN_UPDATE:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_CHAN)
|
|
|
|
addFeedItemChanUpdate(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_CHAN_MSG:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_CHAN)
|
|
|
|
addFeedItemChanMsg(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RS_FEED_ITEM_FORUM_NEW:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_FORUM)
|
|
|
|
addFeedItemForumNew(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_FORUM_UPDATE:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_FORUM)
|
|
|
|
addFeedItemForumUpdate(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_FORUM_MSG:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_FORUM)
|
|
|
|
addFeedItemForumMsg(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RS_FEED_ITEM_BLOG_MSG:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_BLOG)
|
|
|
|
addFeedItemBlogMsg(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_CHAT_NEW:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_CHAT)
|
|
|
|
addFeedItemChatNew(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_MESSAGE:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_MSG)
|
|
|
|
addFeedItemMessage(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
case RS_FEED_ITEM_FILES_NEW:
|
2008-12-07 09:19:13 -05:00
|
|
|
if (flags & RS_FEED_TYPE_FILES)
|
|
|
|
addFeedItemFilesNew(fi);
|
2008-06-20 08:43:23 -04:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemPeerConnect(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
PeerItem *pi = new PeerItem(this, NEWSFEED_PEERLIST, fi.mId1, PEER_TYPE_CONNECT, false);
|
|
|
|
|
|
|
|
/* store */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(pi);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemPeerConnect()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemPeerDisconnect(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
PeerItem *pi = new PeerItem(this, NEWSFEED_PEERLIST, fi.mId1, PEER_TYPE_STD, false);
|
|
|
|
|
|
|
|
/* store */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(pi);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemPeerDisconnect()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemPeerHello(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
PeerItem *pi = new PeerItem(this, NEWSFEED_PEERLIST, fi.mId1, PEER_TYPE_HELLO, false);
|
|
|
|
|
|
|
|
/* store */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(pi);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemPeerHello()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemPeerNew(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
PeerItem *pi = new PeerItem(this, NEWSFEED_PEERLIST, fi.mId1, PEER_TYPE_NEW_FOF, false);
|
|
|
|
|
|
|
|
/* store */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(pi);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemPeerNew()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemChanNew(RsFeedItem &fi)
|
|
|
|
{
|
2008-07-04 10:41:24 -04:00
|
|
|
/* make new widget */
|
|
|
|
ChanNewItem *cni = new ChanNewItem(this, NEWSFEED_CHANNEWLIST, fi.mId1, false, true);
|
|
|
|
|
|
|
|
/* store in list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(cni);
|
2008-07-04 10:41:24 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemChanNew()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemChanUpdate(RsFeedItem &fi)
|
|
|
|
{
|
2008-07-04 10:41:24 -04:00
|
|
|
/* make new widget */
|
|
|
|
ChanNewItem *cni = new ChanNewItem(this, NEWSFEED_CHANNEWLIST, fi.mId1, false, false);
|
|
|
|
|
|
|
|
/* store in list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(cni);
|
2008-07-04 10:41:24 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemChanUpdate()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemChanMsg(RsFeedItem &fi)
|
|
|
|
{
|
2008-06-24 00:36:45 -04:00
|
|
|
/* make new widget */
|
|
|
|
ChanMsgItem *cm = new ChanMsgItem(this, NEWSFEED_CHANMSGLIST, fi.mId1, fi.mId2, false);
|
|
|
|
|
|
|
|
/* store in forum list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(cm);
|
2008-06-24 00:36:45 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemChanMsg()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemForumNew(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
ForumNewItem *fni = new ForumNewItem(this, NEWSFEED_FORUMNEWLIST, fi.mId1, false, true);
|
|
|
|
|
|
|
|
/* store in forum list */
|
|
|
|
mForumNewItems.push_back(fni);
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(fni);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemForumNew()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemForumUpdate(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
ForumNewItem *fni = new ForumNewItem(this, NEWSFEED_FORUMNEWLIST, fi.mId1, false, false);
|
|
|
|
|
|
|
|
/* store in forum list */
|
|
|
|
mForumNewItems.push_back(fni);
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(fni);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemForumUpdate()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemForumMsg(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
ForumMsgItem *fm = new ForumMsgItem(this, NEWSFEED_FORUMMSGLIST, fi.mId1, fi.mId2, false);
|
|
|
|
|
|
|
|
/* store in forum list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(fm);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemForumMsg()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemBlogMsg(RsFeedItem &fi)
|
|
|
|
{
|
|
|
|
/* make new widget */
|
|
|
|
BlogMsgItem *bm = new BlogMsgItem(this, NEWSFEED_BLOGMSGLIST, fi.mId1, fi.mId2, false);
|
|
|
|
|
|
|
|
/* store in forum list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(bm);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemBlogMsg()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemChatNew(RsFeedItem &fi)
|
|
|
|
{
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemChatNew()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
|
|
|
|
{
|
2008-07-04 10:41:24 -04:00
|
|
|
/* make new widget */
|
|
|
|
MsgItem *mi = new MsgItem(this, NEWSFEED_MESSAGELIST, fi.mId1, false);
|
|
|
|
|
|
|
|
/* store in list */
|
|
|
|
|
|
|
|
/* add to layout */
|
2010-02-07 10:47:30 -05:00
|
|
|
verticalLayout->addWidget(mi);
|
2008-07-04 10:41:24 -04:00
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemMessage()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NewsFeed::addFeedItemFilesNew(RsFeedItem &fi)
|
|
|
|
{
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::addFeedItemFilesNew()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* FeedHolder Functions (for FeedItem functionality) */
|
|
|
|
void NewsFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
|
|
|
{
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::deleteFeedItem()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void NewsFeed::openChat(std::string peerId)
|
|
|
|
{
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::openChat()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void NewsFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
|
|
|
{
|
2008-07-09 05:53:47 -04:00
|
|
|
#ifdef NEWS_DEBUG
|
2008-06-20 08:43:23 -04:00
|
|
|
std::cerr << "NewsFeed::openMsg()";
|
|
|
|
std::cerr << std::endl;
|
2008-07-09 05:53:47 -04:00
|
|
|
#endif
|
2008-06-20 08:43:23 -04:00
|
|
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
|
|
|
|
|
|
|
|
|
|
|
msgDialog->addDestination(type, grpId, inReplyTo);
|
|
|
|
|
|
|
|
msgDialog->show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|