added for blogs own define to project file and set on MainWindow the defines for Blogs, added to function for Messages icon

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2423 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-25 13:12:18 +00:00
parent 7d8026d76b
commit 1ee9a6ae0d
4 changed files with 59 additions and 21 deletions

View File

@ -508,6 +508,28 @@ newsettings {
}
blogs {
DEPENDPATH += gui/unfinished \
HEADERS += gui/unfinished/blogs/BlogsDialog.h \
gui/unfinished/blogs/CreateBlog.h \
gui/unfinished/blogs/CreateBlogMsg.h \
gui/unfinished/blogs/BlogsMsgItem.h
FORMS += gui/unfinished/blogs/BlogsDialog.ui \
gui/unfinished/blogs/CreateBlog.ui \
gui/unfinished/blogs/CreateBlogMsg.ui \
gui/unfinished/blogs/BlogsMsgItem.ui
SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \
gui/unfinished/blogs/CreateBlog.cpp \
gui/unfinished/blogs/CreateBlogMsg.cpp \
gui/unfinished/blogs/BlogsMsgItem.cpp
DEFINES *= BLOGS
}
unfinished {
@ -523,11 +545,7 @@ HEADERS += gui/unfinished/ApplicationWindow.h \
gui/unfinished/PhotoDialog.h \
gui/unfinished/PhotoShow.h \
gui/unfinished/StatisticDialog.h \
gui/unfinished/TransferFeed.h \
gui/unfinished/blogs/BlogsDialog.h \
gui/unfinished/blogs/CreateBlog.h \
gui/unfinished/blogs/CreateBlogMsg.h \
gui/unfinished/blogs/BlogsMsgItem.h
gui/unfinished/TransferFeed.h
FORMS += gui/unfinished/ApplicationWindow.ui \
gui/unfinished/BlogDialog.ui \
@ -539,11 +557,7 @@ FORMS += gui/unfinished/ApplicationWindow.ui \
gui/unfinished/PhotoDialog.ui \
gui/unfinished/PhotoShow.ui \
gui/unfinished/StatisticDialog.ui \
gui/unfinished/TransferFeed.ui \
gui/unfinished/blogs/BlogsDialog.ui \
gui/unfinished/blogs/CreateBlog.ui \
gui/unfinished/blogs/CreateBlogMsg.ui \
gui/unfinished/blogs/BlogsMsgItem.ui
gui/unfinished/TransferFeed.ui
SOURCES += gui/unfinished/ApplicationWindow.cpp \
gui/unfinished/BlogDialog.cpp \
@ -555,11 +569,7 @@ SOURCES += gui/unfinished/ApplicationWindow.cpp \
gui/unfinished/PhotoDialog.cpp \
gui/unfinished/PhotoShow.cpp \
gui/unfinished/StatisticDialog.cpp \
gui/unfinished/TransferFeed.cpp \
gui/unfinished/blogs/BlogsDialog.cpp \
gui/unfinished/blogs/CreateBlog.cpp \
gui/unfinished/blogs/CreateBlogMsg.cpp \
gui/unfinished/blogs/BlogsMsgItem.cpp
gui/unfinished/TransferFeed.cpp
DEFINES *= UNFINISHED
}

View File

@ -34,7 +34,7 @@
#include "ForumsDialog.h"
#include "NewsFeed.h"
#ifdef UNFINISHED
#ifdef BLOGS
#include "gui/unfinished/blogs/BlogsDialog.h"
#endif
@ -110,6 +110,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
{
/* Invoke the Qt Designer generated QObject setup routine */
ui.setupUi(this);
updateToolBaricons();
/* Create RshareSettings object */
_settings = new RshareSettings();
@ -181,7 +183,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
createPageAction(QIcon(MessageIcon), tr("Messages"), grp));
#ifndef RS_RELEASE_VERSION
ChannelFeed *channelFeed = NULL;
@ -189,7 +191,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
#endif
#ifdef UNFINISHED
#ifdef BLOGS
BlogsDialog *blogsFeed = NULL;
ui.stackPages->add(blogsFeed = new BlogsDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_BLOGS), tr("Blogs"), grp));
@ -645,3 +647,26 @@ void MainWindow::setStyle()
qApp->setStyleSheet(/*widgetSheet + */toolSheet + menuSheet);
}
void MainWindow::updateToolBaricons()
{
std::list<MsgInfoSummary> msgList;
std::list<MsgInfoSummary>::const_iterator it;
rsMsgs -> getMessageSummaries(msgList);
for(it = msgList.begin(); it != msgList.end(); it++)
{
if ((it -> msgflags & RS_MSG_NEW) == RS_MSG_NEW)
{
MessageIcon.addPixmap(QPixmap(":/images/messages_new.png"), QIcon::Normal, QIcon::On );
}
else
{
MessageIcon.addPixmap(QPixmap(":/images/evolution.png"), QIcon::Normal, QIcon::On );
}
}
}

View File

@ -103,7 +103,9 @@ public slots:
void showWindow(Page page);
void updateHashingInfo(const QString&) ;
void displayErrorMessage(int,int,const QString&) ;
void displayErrorMessage(int,int,const QString&) ;
void updateToolBaricons();
protected:
void closeEvent(QCloseEvent *);
@ -147,7 +149,6 @@ private slots:
void on_actionQuick_Start_Wizard_activated();
private:
/** Create the actions on the tray menu or menubar */
@ -188,6 +189,8 @@ private:
RatesStatus *ratesstatus;
QLabel *_hashing_info_label ;
QIcon MessageIcon;
/** Qt Designer generated object */
Ui::MainWindow ui;

View File

@ -112,7 +112,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
connect( ui.actionHide_Offline_Friends, SIGNAL(triggered()), this, SLOT(insertPeers()));
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
connect(ui.statuscomboBox, SIGNAL(clicked()), this, SLOT(savestatus()));
//connect(ui.statuscomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(savestatus()));
/* to hide the header */
ui.messengertreeWidget->header()->hide();