From 4336a4ad46f716277b591e09f142154d25b4977b Mon Sep 17 00:00:00 2001 From: Phenom Date: Thu, 7 Sep 2017 19:37:53 +0200 Subject: [PATCH] Move SharedFilesDialog to /gui/FileTransfer/ And remove old DEFINE because very olds files are deleted. --- .../{ => FileTransfer}/SharedFilesDialog.cpp | 59 ++++--------------- .../{ => FileTransfer}/SharedFilesDialog.h | 8 --- .../{ => FileTransfer}/SharedFilesDialog.ui | 0 .../src/gui/FileTransfer/TransfersDialog.cpp | 2 +- retroshare-gui/src/gui/MainWindow.cpp | 33 +---------- retroshare-gui/src/gui/MainWindow.h | 24 -------- retroshare-gui/src/gui/NewsFeed.cpp | 20 ------- retroshare-gui/src/gui/notifyqt.h | 1 - retroshare-gui/src/main.cpp | 1 - retroshare-gui/src/retroshare-gui.pro | 51 +--------------- 10 files changed, 15 insertions(+), 184 deletions(-) rename retroshare-gui/src/gui/{ => FileTransfer}/SharedFilesDialog.cpp (96%) rename retroshare-gui/src/gui/{ => FileTransfer}/SharedFilesDialog.h (97%) rename retroshare-gui/src/gui/{ => FileTransfer}/SharedFilesDialog.ui (100%) diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp similarity index 96% rename from retroshare-gui/src/gui/SharedFilesDialog.cpp rename to retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index 1ca474d3a..c2fac3652 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -32,20 +32,17 @@ #include #include "SharedFilesDialog.h" -#include "settings/AddFileAssociationDialog.h" -#include "util/RsAction.h" -#include "msgs/MessageComposer.h" -#include "settings/rsharesettings.h" -#ifdef RS_USE_LINKS -#include "AddLinksDialog.h" -#endif -#include "RetroShareLink.h" -#include "ShareManager.h" -#include "RemoteDirModel.h" -#include "common/PeerDefs.h" -#include "util/QtVersion.h" +#include "gui/notifyqt.h" +#include "gui/RemoteDirModel.h" +#include "gui/RetroShareLink.h" +#include "gui/ShareManager.h" +#include "gui/common/PeerDefs.h" #include "gui/common/RsCollectionFile.h" -#include "notifyqt.h" +#include "gui/msgs/MessageComposer.h" +#include "gui/settings/AddFileAssociationDialog.h" +#include "gui/settings/rsharesettings.h" +#include "util/QtVersion.h" +#include "util/RsAction.h" #include #include @@ -213,12 +210,6 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD connect( copylinkhtmlAct , SIGNAL( triggered() ), this, SLOT( copyLinkhtml() ) ); sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this ); connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) ); -#ifdef RS_USE_LINKS - sendlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links to Cloud" ), this ); - connect( sendlinkCloudAct , SIGNAL( triggered() ), this, SLOT( sendLinkToCloud( ) ) ); - addlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Add Links to Cloud" ), this ); - connect( addlinkCloudAct , SIGNAL( triggered() ), this, SLOT( addLinkToCloud( ) ) ); -#endif collCreateAct= new QAction(QIcon(IMAGE_COLLCREATE), tr("Create Collection..."), this) ; connect(collCreateAct,SIGNAL(triggered()),this,SLOT(collCreate())) ; @@ -672,31 +663,6 @@ void SharedFilesDialog::sendLinkTo() /* window will destroy itself! */ } -#ifdef RS_USE_LINKS -void SharedFilesDialog::sendLinkToCloud() -{ - copyLink(); - - AddLinksDialog *nAddLinksDialog = new AddLinksDialog(QApplication::clipboard()->text()); - - nAddLinksDialog->addLinkComment(); - nAddLinksDialog->close(); - - /* window will destroy itself! */ -} - -void SharedFilesDialog::addLinkToCloud() -{ - copyLink(); - - AddLinksDialog *nAddLinksDialog = new AddLinksDialog(QApplication::clipboard()->text()); - - nAddLinksDialog->show(); - - /* window will destroy itself! */ -} -#endif - void SharedFilesDialog::collCreate() { QModelIndexList lst = getSelected(); @@ -1057,11 +1023,6 @@ void LocalSharedFilesDialog::spawnCustomPopupMenu( QPoint point ) contextMnu.addSeparator() ;//------------------------------------ contextMnu.addMenu(&collectionMenu) ; contextMnu.addSeparator() ;//------------------------------------ -#ifdef RS_USE_LINKS - contextMnu.addAction(sendlinkCloudAct) ; - contextMnu.addAction(addlinkCloudAct) ; - contextMnu.addSeparator() ;//------------------------------------ -#endif contextMnu.addAction(QIcon(IMAGE_MSG), tr("Recommend in a message to"), this, SLOT(recommendFilesToMsg())) ; break ; diff --git a/retroshare-gui/src/gui/SharedFilesDialog.h b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.h similarity index 97% rename from retroshare-gui/src/gui/SharedFilesDialog.h rename to retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.h index 82dfc8d63..e7ec1e2b0 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.h +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.h @@ -62,10 +62,6 @@ private slots: void copyLink(); void copyLinkhtml(); void sendLinkTo(); -#ifdef RS_USE_LINKS - void sendLinkToCloud(); - void addLinkToCloud(); -#endif void collCreate(); void collModif(); @@ -118,10 +114,6 @@ protected: /** Defines the actions for the context menu for QTreeWidget */ QAction* copylinkAct; QAction* sendlinkAct; -#ifdef RS_USE_LINKS - QAction* sendlinkCloudAct; - QAction* addlinkCloudAct; -#endif QAction* sendchatlinkAct; QAction* copylinkhtmlAct; diff --git a/retroshare-gui/src/gui/SharedFilesDialog.ui b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui similarity index 100% rename from retroshare-gui/src/gui/SharedFilesDialog.ui rename to retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index 80576b9aa..50b73fb5b 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -46,7 +46,7 @@ #include "ULListDelegate.h" #include "FileTransferInfoWidget.h" #include -#include +#include #include "xprogressbar.h" #include #include "util/misc.h" diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index f33c04191..73d2c1f0d 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -29,10 +29,6 @@ #include #include -#ifdef BLOGS -#include "gui/unfinished/blogs/BlogsDialog.h" -#endif - #include #include @@ -43,9 +39,9 @@ #include "HomePage.h" #include "NetworkDialog.h" #include "gui/FileTransfer/SearchDialog.h" +#include "gui/FileTransfer/SharedFilesDialog.h" #include "gui/FileTransfer/TransfersDialog.h" #include "MessagesDialog.h" -#include "SharedFilesDialog.h" #include "PluginsPage.h" #include "NewsFeed.h" #include "ShareManager.h" @@ -379,10 +375,6 @@ void MainWindow::initStackedPage() addPage(wikiDialog = new WikiDialog(ui->stackPages), grp, ¬ify); #endif -#ifdef BLOGS - addPage(blogsFeed = new BlogsDialog(ui->stackPages), grp, NULL); -#endif - std::cerr << "Looking for interfaces in existing plugins:" << std::endl; for(int i = 0;inbPlugins();++i) { @@ -915,11 +907,6 @@ void SetForegroundWindowInternal(HWND hWnd) case Forums: _instance->ui->stackPages->setCurrentPage( _instance->gxsforumDialog ); return true ; -#ifdef BLOGS - case Blogs: - Page = _instance->blogsFeed; - return true ; -#endif case Posted: _instance->ui->stackPages->setCurrentPage( _instance->postedDialog ); return true ; @@ -960,11 +947,6 @@ void SetForegroundWindowInternal(HWND hWnd) if (page == _instance->messagesDialog) { return Messages; } -#ifdef RS_USE_LINKS - if (page == _instance->linksDialog) { - return Links; - } -#endif #if 0 if (page == _instance->channelFeed) { return Channels; @@ -973,11 +955,6 @@ void SetForegroundWindowInternal(HWND hWnd) return Forums; } #endif -#ifdef BLOGS - if (page == _instance->blogsFeed) { - return Blogs; - } -#endif return Network; } @@ -1009,20 +986,12 @@ void SetForegroundWindowInternal(HWND hWnd) return _instance->transfersDialog->searchDialog; case Messages: return _instance->messagesDialog; -#ifdef RS_USE_LINKS - case Links: - return _instance->linksDialog; -#endif case Channels: return _instance->gxschannelDialog; case Forums: return _instance->gxsforumDialog; case Posted: return _instance->postedDialog; -#ifdef BLOGS - case Blogs: - return _instance->blogsFeed; -#endif } return NULL; diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index 27864e29f..9b7d9d08e 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -59,7 +59,6 @@ class NetworkDialog; class SearchDialog; class TransfersDialog; class MessagesDialog; -class SharedFilesDialog; class MessengerWindow; class PluginsPage; class HomePage; @@ -69,14 +68,6 @@ class MainPage; class NewsFeed; class UserNotify; -#ifdef RS_USE_LINKS -class LinksDialog; -#endif - -#ifdef BLOGS -class BlogsDialog; -#endif - #ifdef UNFINISHED class ApplicationWindow; #endif @@ -98,12 +89,6 @@ public: Channels = 6, /** Channels page. */ Forums = 7, /** Forums page. */ Search = 8, /** Search page. */ -#ifdef BLOGS - Blogs = 9, /** Blogs page. */ -#endif -#ifdef RS_USE_LINKS - Links = 10, /** Links page. */ -#endif Posted = 11, /** Posted links */ People = 12, /** People page. */ Options = 13 /** People page. */ @@ -163,7 +148,6 @@ public: ChatLobbyWidget *chatLobbyDialog; MessagesDialog *messagesDialog; SettingsPage *settingsDialog; - SharedFilesDialog *sharedfilesDialog; GxsChannelDialog *gxschannelDialog ; GxsForumsDialog *gxsforumDialog ; PostedDialog *postedDialog; @@ -172,14 +156,6 @@ public: // ChannelFeed *channelFeed; Idle *idle; -#ifdef RS_USE_LINKS - LinksDialog *linksDialog; -#endif - -#ifdef BLOGS - BlogsDialog *blogsFeed; -#endif - #ifdef UNFINISHED ApplicationWindow *applicationWindow; #endif diff --git a/retroshare-gui/src/gui/NewsFeed.cpp b/retroshare-gui/src/gui/NewsFeed.cpp index eae3c5af4..5da89940a 100644 --- a/retroshare-gui/src/gui/NewsFeed.cpp +++ b/retroshare-gui/src/gui/NewsFeed.cpp @@ -35,10 +35,6 @@ #include #include "feeds/ChatMsgItem.h" -#ifdef BLOGS -#include "feeds/BlogNewItem.h" -#include "feeds/BlogMsgItem.h" -#endif #include "feeds/GxsCircleItem.h" #include "feeds/GxsChannelGroupItem.h" #include "feeds/GxsChannelPostItem.h" @@ -1480,15 +1476,7 @@ void NewsFeed::addFeedItemPostedMsg(const RsFeedItem &fi) #if 0 void NewsFeed::addFeedItemBlogNew(const RsFeedItem &fi) { -#ifdef BLOGS - /* make new widget */ - BlogNewItem *bni = new BlogNewItem(this, NEWSFEED_BLOGNEWLIST, fi.mId1, false, true); - - /* add to layout */ - addFeedItem(bni); -#else Q_UNUSED(fi); -#endif #ifdef NEWS_DEBUG std::cerr << "NewsFeed::addFeedItemBlogNew()"; @@ -1498,15 +1486,7 @@ void NewsFeed::addFeedItemBlogNew(const RsFeedItem &fi) void NewsFeed::addFeedItemBlogMsg(const RsFeedItem &fi) { -#ifdef BLOGS - /* make new widget */ - BlogMsgItem *bm = new BlogMsgItem(this, NEWSFEED_BLOGMSGLIST, fi.mId1, fi.mId2, false); - - /* add to layout */ - addFeedItem(bm); -#else Q_UNUSED(fi); -#endif #ifdef NEWS_DEBUG std::cerr << "NewsFeed::addFeedItemBlogMsg()"; diff --git a/retroshare-gui/src/gui/notifyqt.h b/retroshare-gui/src/gui/notifyqt.h index 4acbda23c..b179d9999 100644 --- a/retroshare-gui/src/gui/notifyqt.h +++ b/retroshare-gui/src/gui/notifyqt.h @@ -15,7 +15,6 @@ class QTimer; class NetworkDialog; class FriendsDialog; -class SharedFilesDialog; class TransfersDialog; class ChatDialog; class MessagesDialog; diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 08c651fcd..2430a1984 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -32,7 +32,6 @@ #include "gui/NetworkView.h" #include "gui/QuickStartWizard.h" #include "gui/RetroShareLink.h" -#include "gui/SharedFilesDialog.h" #include "gui/SoundManager.h" #include "gui/StartDialog.h" #include "gui/chat/ChatDialog.h" diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 57533898f..b7bc361ce 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -351,7 +351,6 @@ HEADERS += rshare.h \ gui/RemoteDirModel.h \ gui/RetroShareLink.h \ gui/SearchTreeWidget.h \ - gui/SharedFilesDialog.h \ gui/ShareManager.h \ # gui/ShareDialog.h \ # gui/SFListDelegate.h \ @@ -360,6 +359,7 @@ HEADERS += rshare.h \ gui/LogoBar.h \ gui/common/AvatarDialog.h \ gui/FileTransfer/SearchDialog.h \ + gui/FileTransfer/SharedFilesDialog.h \ gui/FileTransfer/xprogressbar.h \ gui/FileTransfer/DetailsDialog.h \ gui/FileTransfer/FileTransferInfoWidget.h \ @@ -595,11 +595,11 @@ FORMS += gui/StartDialog.ui \ gui/FileTransfer/TransfersDialog.ui \ gui/FileTransfer/DetailsDialog.ui \ gui/FileTransfer/SearchDialog.ui \ + gui/FileTransfer/SharedFilesDialog.ui \ gui/MainWindow.ui \ gui/NetworkView.ui \ gui/MessengerWindow.ui \ gui/FriendsDialog.ui \ - gui/SharedFilesDialog.ui \ gui/ShareManager.ui \ # gui/ShareDialog.ui \ gui/MessagesDialog.ui \ @@ -723,7 +723,6 @@ SOURCES += main.cpp \ gui/RsAutoUpdatePage.cpp \ gui/RetroShareLink.cpp \ gui/SearchTreeWidget.cpp \ - gui/SharedFilesDialog.cpp \ gui/ShareManager.cpp \ # gui/ShareDialog.cpp \ # gui/SFListDelegate.cpp \ @@ -735,6 +734,7 @@ SOURCES += main.cpp \ gui/help/browser/helpbrowser.cpp \ gui/help/browser/helptextbrowser.cpp \ gui/FileTransfer/SearchDialog.cpp \ + gui/FileTransfer/SharedFilesDialog.cpp \ gui/FileTransfer/TransfersDialog.cpp \ gui/FileTransfer/FileTransferInfoWidget.cpp \ gui/FileTransfer/DLListDelegate.cpp \ @@ -996,51 +996,6 @@ pluginmgr { } -#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 \ -# gui/unfinished/blogs/BlogDetails.h \ -# gui/feeds/BlogNewItem.h \ -# gui/feeds/BlogMsgItem.h \ -# -#FORMS += gui/unfinished/blogs/BlogsDialog.ui \ -# gui/unfinished/blogs/CreateBlog.ui \ -# gui/unfinished/blogs/CreateBlogMsg.ui \ -# gui/unfinished/blogs/BlogsMsgItem.ui \ -# gui/unfinished/blogs/BlogDetails.ui \ -# gui/feeds/BlogNewItem.ui \ -# gui/feeds/BlogMsgItem.ui \ -# -#SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \ -# gui/unfinished/blogs/CreateBlog.cpp \ -# gui/unfinished/blogs/CreateBlogMsg.cpp \ -# gui/unfinished/blogs/BlogsMsgItem.cpp \ -# gui/unfinished/blogs/BlogDetails.cpp \ -# gui/feeds/BlogNewItem.cpp \ -# gui/feeds/BlogMsgItem.cpp \ -# -#DEFINES += BLOGS -#} - -# use_links { -# HEADERS += gui/AddLinksDialog.h \ -# gui/LinksDialog.h -# -# FORMS += gui/AddLinksDialog.ui \ -# gui/LinksDialog.ui -# -# SOURCES += gui/AddLinksDialog.cpp \ -# gui/LinksDialog.cpp -# -# DEFINES += RS_USE_LINKS -# } - - idle { HEADERS += idle/idle.h