From 75188fb6f0d022e903ef5cf489efdaac8b99e258 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 26 Apr 2014 16:32:33 +0000 Subject: [PATCH] moved forums and channels into main window git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7304 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MainWindow.cpp | 18 +++++++++++++----- retroshare-gui/src/gui/MainWindow.h | 17 +++++++++++------ retroshare-gui/src/gui/gxs/GxsIdChooser.cpp | 3 ++- .../src/gui/unfinished/ApplicationWindow.cpp | 3 ++- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 02a8af6b0..9b049f8cf 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -90,6 +90,9 @@ #include #include +#include "gui/gxschannels/ChannelDialog.h" +#include "gui/gxsforums/GxsForumsDialog.h" + #include "gui/connect/ConnectFriendWizard.h" #include "util/rsguiversion.h" #include "settings/rsettingswin.h" @@ -154,6 +157,8 @@ #define IMAGE_BLOGS ":/images/kblogger.png" #define IMAGE_DHT ":/images/dht16.png" #define IMAGE_CHATLOBBY ":/images/chat_32.png" +#define IMAGE_GXSCHANNELS ":/images/channels.png" +#define IMAGE_GXSFORUMS ":/images/konversation.png" /*static*/ MainWindow *MainWindow::_instance = NULL; @@ -267,11 +272,14 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags) action = createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp)); notify.push_back(QPair(messagesDialog, action)); -#if 0 - ui->stackPages->add(channelFeed = new ChannelFeed(ui->stackPages), - action = createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp)); - notify.push_back(QPair(channelFeed, action)); -#endif + ui->stackPages->add(gxschannelDialog = new ChannelDialog(ui->stackPages), + action = createPageAction(QIcon(IMAGE_GXSCHANNELS), tr("Channels"), grp)); + gxschannelDialog->setup(); + notify.push_back(QPair(gxschannelDialog, action)); + + ui->stackPages->add(gxsforumDialog = new GxsForumsDialog(ui->stackPages), + action = createPageAction(QIcon(IMAGE_GXSFORUMS), tr("Forums"), grp)); + notify.push_back(QPair(gxsforumDialog, action)); #ifdef BLOGS ui->stackPages->add(blogsFeed = new BlogsDialog(ui->stackPages), createPageAction(QIcon(IMAGE_BLOGS), tr("Blogs"), grp)); diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index 166a23d13..ec4133997 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -36,6 +36,8 @@ class QLabel; class QActionGroup; class Idle; class PeerStatus; +class ChannelDialog ; +class GxsForumsDialog ; class NATStatus; class RatesStatus; class DiscStatus; @@ -123,12 +125,15 @@ public: // NetworkDialog *networkDialog; // SearchDialog *searchDialog; - NewsFeed *newsFeed; - FriendsDialog *friendsDialog; - TransfersDialog *transfersDialog; - ChatLobbyWidget *chatLobbyDialog; - MessagesDialog *messagesDialog; - SharedFilesDialog *sharedfilesDialog; + NewsFeed *newsFeed; + FriendsDialog *friendsDialog; + TransfersDialog *transfersDialog; + ChatLobbyWidget *chatLobbyDialog; + MessagesDialog *messagesDialog; + SharedFilesDialog *sharedfilesDialog; + ChannelDialog *gxschannelDialog ; + GxsForumsDialog *gxsforumDialog ; + // ForumsDialog *forumsDialog; // ChannelFeed *channelFeed; Idle *idle; diff --git a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp index ed7dd1187..2126500dd 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp @@ -38,8 +38,9 @@ /** Constructor */ GxsIdChooser::GxsIdChooser(QWidget *parent) -: QComboBox(parent), mFlags(IDCHOOSER_ANON_DEFAULT), mDefaultId("") +: QComboBox(parent), mFlags(IDCHOOSER_ANON_DEFAULT) { + mDefaultId.clear() ; mTimer = NULL; mTimerCount = 0; diff --git a/retroshare-gui/src/gui/unfinished/ApplicationWindow.cpp b/retroshare-gui/src/gui/unfinished/ApplicationWindow.cpp index 79b0787fc..3a546a1c3 100644 --- a/retroshare-gui/src/gui/unfinished/ApplicationWindow.cpp +++ b/retroshare-gui/src/gui/unfinished/ApplicationWindow.cpp @@ -120,7 +120,7 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WindowFlags flags) WikiDialog *wikiDialog = NULL; ui.stackPages->add(wikiDialog = new WikiDialog(ui.stackPages), createPageAction(QIcon(IMAGE_WIKI), tr("Wiki Pages"), grp)); - +#if 0 GxsForumsDialog *gxsforumsDialog = NULL; ui.stackPages->add(gxsforumsDialog = new GxsForumsDialog(ui.stackPages), createPageAction(QIcon(IMAGE_GXSFORUMS), tr("GxsForums"), grp)); @@ -129,6 +129,7 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WindowFlags flags) ui.stackPages->add(gxschannelDialog = new ChannelDialog(ui.stackPages), createPageAction(QIcon(IMAGE_GXSCHANNELS), tr("GxsChannels"), grp)); gxschannelDialog->setup(); +#endif // THESE HAVE TO BE CONVERTED TO VEG FORMAT #if USE_VEG_SERVICE