diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index 16b106405..0b7ba26ab 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -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 } diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 290cd7680..31c7f71ad 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -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 msgList; + std::list::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 ); + } + + } + +} diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index 593f7cde2..92288e289 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -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; diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index a7c53be5d..9f95f7ff1 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -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();