Merge pull request #1022 from PhenomRetroShare/Fix_MoveSharedFilesDialog

Move SharedFilesDialog to /gui/FileTransfer/
This commit is contained in:
csoler 2017-09-09 14:48:02 +02:00 committed by GitHub
commit 1bc9ef6f62
10 changed files with 15 additions and 184 deletions

View File

@ -32,20 +32,17 @@
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
#include "SharedFilesDialog.h" #include "SharedFilesDialog.h"
#include "settings/AddFileAssociationDialog.h" #include "gui/notifyqt.h"
#include "util/RsAction.h" #include "gui/RemoteDirModel.h"
#include "msgs/MessageComposer.h" #include "gui/RetroShareLink.h"
#include "settings/rsharesettings.h" #include "gui/ShareManager.h"
#ifdef RS_USE_LINKS #include "gui/common/PeerDefs.h"
#include "AddLinksDialog.h"
#endif
#include "RetroShareLink.h"
#include "ShareManager.h"
#include "RemoteDirModel.h"
#include "common/PeerDefs.h"
#include "util/QtVersion.h"
#include "gui/common/RsCollectionFile.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 <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include <retroshare/rsfiles.h> #include <retroshare/rsfiles.h>
@ -213,12 +210,6 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD
connect( copylinkhtmlAct , SIGNAL( triggered() ), this, SLOT( copyLinkhtml() ) ); connect( copylinkhtmlAct , SIGNAL( triggered() ), this, SLOT( copyLinkhtml() ) );
sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this ); sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this );
connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) ); 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) ; collCreateAct= new QAction(QIcon(IMAGE_COLLCREATE), tr("Create Collection..."), this) ;
connect(collCreateAct,SIGNAL(triggered()),this,SLOT(collCreate())) ; connect(collCreateAct,SIGNAL(triggered()),this,SLOT(collCreate())) ;
@ -672,31 +663,6 @@ void SharedFilesDialog::sendLinkTo()
/* window will destroy itself! */ /* 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() void SharedFilesDialog::collCreate()
{ {
QModelIndexList lst = getSelected(); QModelIndexList lst = getSelected();
@ -1057,11 +1023,6 @@ void LocalSharedFilesDialog::spawnCustomPopupMenu( QPoint point )
contextMnu.addSeparator() ;//------------------------------------ contextMnu.addSeparator() ;//------------------------------------
contextMnu.addMenu(&collectionMenu) ; contextMnu.addMenu(&collectionMenu) ;
contextMnu.addSeparator() ;//------------------------------------ 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())) ; contextMnu.addAction(QIcon(IMAGE_MSG), tr("Recommend in a message to"), this, SLOT(recommendFilesToMsg())) ;
break ; break ;

View File

@ -62,10 +62,6 @@ private slots:
void copyLink(); void copyLink();
void copyLinkhtml(); void copyLinkhtml();
void sendLinkTo(); void sendLinkTo();
#ifdef RS_USE_LINKS
void sendLinkToCloud();
void addLinkToCloud();
#endif
void collCreate(); void collCreate();
void collModif(); void collModif();
@ -118,10 +114,6 @@ protected:
/** Defines the actions for the context menu for QTreeWidget */ /** Defines the actions for the context menu for QTreeWidget */
QAction* copylinkAct; QAction* copylinkAct;
QAction* sendlinkAct; QAction* sendlinkAct;
#ifdef RS_USE_LINKS
QAction* sendlinkCloudAct;
QAction* addlinkCloudAct;
#endif
QAction* sendchatlinkAct; QAction* sendchatlinkAct;
QAction* copylinkhtmlAct; QAction* copylinkhtmlAct;

View File

@ -46,7 +46,7 @@
#include "ULListDelegate.h" #include "ULListDelegate.h"
#include "FileTransferInfoWidget.h" #include "FileTransferInfoWidget.h"
#include <gui/FileTransfer/SearchDialog.h> #include <gui/FileTransfer/SearchDialog.h>
#include <gui/SharedFilesDialog.h> #include <gui/FileTransfer/SharedFilesDialog.h>
#include "xprogressbar.h" #include "xprogressbar.h"
#include <gui/settings/rsharesettings.h> #include <gui/settings/rsharesettings.h>
#include "util/misc.h" #include "util/misc.h"

View File

@ -29,10 +29,6 @@
#include <QUrl> #include <QUrl>
#include <QtDebug> #include <QtDebug>
#ifdef BLOGS
#include "gui/unfinished/blogs/BlogsDialog.h"
#endif
#include <retroshare/rsplugin.h> #include <retroshare/rsplugin.h>
#include <retroshare/rsconfig.h> #include <retroshare/rsconfig.h>
@ -43,9 +39,9 @@
#include "HomePage.h" #include "HomePage.h"
#include "NetworkDialog.h" #include "NetworkDialog.h"
#include "gui/FileTransfer/SearchDialog.h" #include "gui/FileTransfer/SearchDialog.h"
#include "gui/FileTransfer/SharedFilesDialog.h"
#include "gui/FileTransfer/TransfersDialog.h" #include "gui/FileTransfer/TransfersDialog.h"
#include "MessagesDialog.h" #include "MessagesDialog.h"
#include "SharedFilesDialog.h"
#include "PluginsPage.h" #include "PluginsPage.h"
#include "NewsFeed.h" #include "NewsFeed.h"
#include "ShareManager.h" #include "ShareManager.h"
@ -379,10 +375,6 @@ void MainWindow::initStackedPage()
addPage(wikiDialog = new WikiDialog(ui->stackPages), grp, &notify); addPage(wikiDialog = new WikiDialog(ui->stackPages), grp, &notify);
#endif #endif
#ifdef BLOGS
addPage(blogsFeed = new BlogsDialog(ui->stackPages), grp, NULL);
#endif
std::cerr << "Looking for interfaces in existing plugins:" << std::endl; std::cerr << "Looking for interfaces in existing plugins:" << std::endl;
for(int i = 0;i<rsPlugins->nbPlugins();++i) for(int i = 0;i<rsPlugins->nbPlugins();++i)
{ {
@ -915,11 +907,6 @@ void SetForegroundWindowInternal(HWND hWnd)
case Forums: case Forums:
_instance->ui->stackPages->setCurrentPage( _instance->gxsforumDialog ); _instance->ui->stackPages->setCurrentPage( _instance->gxsforumDialog );
return true ; return true ;
#ifdef BLOGS
case Blogs:
Page = _instance->blogsFeed;
return true ;
#endif
case Posted: case Posted:
_instance->ui->stackPages->setCurrentPage( _instance->postedDialog ); _instance->ui->stackPages->setCurrentPage( _instance->postedDialog );
return true ; return true ;
@ -960,11 +947,6 @@ void SetForegroundWindowInternal(HWND hWnd)
if (page == _instance->messagesDialog) { if (page == _instance->messagesDialog) {
return Messages; return Messages;
} }
#ifdef RS_USE_LINKS
if (page == _instance->linksDialog) {
return Links;
}
#endif
#if 0 #if 0
if (page == _instance->channelFeed) { if (page == _instance->channelFeed) {
return Channels; return Channels;
@ -973,11 +955,6 @@ void SetForegroundWindowInternal(HWND hWnd)
return Forums; return Forums;
} }
#endif #endif
#ifdef BLOGS
if (page == _instance->blogsFeed) {
return Blogs;
}
#endif
return Network; return Network;
} }
@ -1009,20 +986,12 @@ void SetForegroundWindowInternal(HWND hWnd)
return _instance->transfersDialog->searchDialog; return _instance->transfersDialog->searchDialog;
case Messages: case Messages:
return _instance->messagesDialog; return _instance->messagesDialog;
#ifdef RS_USE_LINKS
case Links:
return _instance->linksDialog;
#endif
case Channels: case Channels:
return _instance->gxschannelDialog; return _instance->gxschannelDialog;
case Forums: case Forums:
return _instance->gxsforumDialog; return _instance->gxsforumDialog;
case Posted: case Posted:
return _instance->postedDialog; return _instance->postedDialog;
#ifdef BLOGS
case Blogs:
return _instance->blogsFeed;
#endif
} }
return NULL; return NULL;

View File

@ -59,7 +59,6 @@ class NetworkDialog;
class SearchDialog; class SearchDialog;
class TransfersDialog; class TransfersDialog;
class MessagesDialog; class MessagesDialog;
class SharedFilesDialog;
class MessengerWindow; class MessengerWindow;
class PluginsPage; class PluginsPage;
class HomePage; class HomePage;
@ -69,14 +68,6 @@ class MainPage;
class NewsFeed; class NewsFeed;
class UserNotify; class UserNotify;
#ifdef RS_USE_LINKS
class LinksDialog;
#endif
#ifdef BLOGS
class BlogsDialog;
#endif
#ifdef UNFINISHED #ifdef UNFINISHED
class ApplicationWindow; class ApplicationWindow;
#endif #endif
@ -98,12 +89,6 @@ public:
Channels = 6, /** Channels page. */ Channels = 6, /** Channels page. */
Forums = 7, /** Forums page. */ Forums = 7, /** Forums page. */
Search = 8, /** Search 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 */ Posted = 11, /** Posted links */
People = 12, /** People page. */ People = 12, /** People page. */
Options = 13 /** People page. */ Options = 13 /** People page. */
@ -163,7 +148,6 @@ public:
ChatLobbyWidget *chatLobbyDialog; ChatLobbyWidget *chatLobbyDialog;
MessagesDialog *messagesDialog; MessagesDialog *messagesDialog;
SettingsPage *settingsDialog; SettingsPage *settingsDialog;
SharedFilesDialog *sharedfilesDialog;
GxsChannelDialog *gxschannelDialog ; GxsChannelDialog *gxschannelDialog ;
GxsForumsDialog *gxsforumDialog ; GxsForumsDialog *gxsforumDialog ;
PostedDialog *postedDialog; PostedDialog *postedDialog;
@ -172,14 +156,6 @@ public:
// ChannelFeed *channelFeed; // ChannelFeed *channelFeed;
Idle *idle; Idle *idle;
#ifdef RS_USE_LINKS
LinksDialog *linksDialog;
#endif
#ifdef BLOGS
BlogsDialog *blogsFeed;
#endif
#ifdef UNFINISHED #ifdef UNFINISHED
ApplicationWindow *applicationWindow; ApplicationWindow *applicationWindow;
#endif #endif

View File

@ -35,10 +35,6 @@
#include <retroshare/rsposted.h> #include <retroshare/rsposted.h>
#include "feeds/ChatMsgItem.h" #include "feeds/ChatMsgItem.h"
#ifdef BLOGS
#include "feeds/BlogNewItem.h"
#include "feeds/BlogMsgItem.h"
#endif
#include "feeds/GxsCircleItem.h" #include "feeds/GxsCircleItem.h"
#include "feeds/GxsChannelGroupItem.h" #include "feeds/GxsChannelGroupItem.h"
#include "feeds/GxsChannelPostItem.h" #include "feeds/GxsChannelPostItem.h"
@ -1480,15 +1476,7 @@ void NewsFeed::addFeedItemPostedMsg(const RsFeedItem &fi)
#if 0 #if 0
void NewsFeed::addFeedItemBlogNew(const RsFeedItem &fi) 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); Q_UNUSED(fi);
#endif
#ifdef NEWS_DEBUG #ifdef NEWS_DEBUG
std::cerr << "NewsFeed::addFeedItemBlogNew()"; std::cerr << "NewsFeed::addFeedItemBlogNew()";
@ -1498,15 +1486,7 @@ void NewsFeed::addFeedItemBlogNew(const RsFeedItem &fi)
void NewsFeed::addFeedItemBlogMsg(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); Q_UNUSED(fi);
#endif
#ifdef NEWS_DEBUG #ifdef NEWS_DEBUG
std::cerr << "NewsFeed::addFeedItemBlogMsg()"; std::cerr << "NewsFeed::addFeedItemBlogMsg()";

View File

@ -15,7 +15,6 @@
class QTimer; class QTimer;
class NetworkDialog; class NetworkDialog;
class FriendsDialog; class FriendsDialog;
class SharedFilesDialog;
class TransfersDialog; class TransfersDialog;
class ChatDialog; class ChatDialog;
class MessagesDialog; class MessagesDialog;

View File

@ -32,7 +32,6 @@
#include "gui/NetworkView.h" #include "gui/NetworkView.h"
#include "gui/QuickStartWizard.h" #include "gui/QuickStartWizard.h"
#include "gui/RetroShareLink.h" #include "gui/RetroShareLink.h"
#include "gui/SharedFilesDialog.h"
#include "gui/SoundManager.h" #include "gui/SoundManager.h"
#include "gui/StartDialog.h" #include "gui/StartDialog.h"
#include "gui/chat/ChatDialog.h" #include "gui/chat/ChatDialog.h"

View File

@ -351,7 +351,6 @@ HEADERS += rshare.h \
gui/RemoteDirModel.h \ gui/RemoteDirModel.h \
gui/RetroShareLink.h \ gui/RetroShareLink.h \
gui/SearchTreeWidget.h \ gui/SearchTreeWidget.h \
gui/SharedFilesDialog.h \
gui/ShareManager.h \ gui/ShareManager.h \
# gui/ShareDialog.h \ # gui/ShareDialog.h \
# gui/SFListDelegate.h \ # gui/SFListDelegate.h \
@ -360,6 +359,7 @@ HEADERS += rshare.h \
gui/LogoBar.h \ gui/LogoBar.h \
gui/common/AvatarDialog.h \ gui/common/AvatarDialog.h \
gui/FileTransfer/SearchDialog.h \ gui/FileTransfer/SearchDialog.h \
gui/FileTransfer/SharedFilesDialog.h \
gui/FileTransfer/xprogressbar.h \ gui/FileTransfer/xprogressbar.h \
gui/FileTransfer/DetailsDialog.h \ gui/FileTransfer/DetailsDialog.h \
gui/FileTransfer/FileTransferInfoWidget.h \ gui/FileTransfer/FileTransferInfoWidget.h \
@ -595,11 +595,11 @@ FORMS += gui/StartDialog.ui \
gui/FileTransfer/TransfersDialog.ui \ gui/FileTransfer/TransfersDialog.ui \
gui/FileTransfer/DetailsDialog.ui \ gui/FileTransfer/DetailsDialog.ui \
gui/FileTransfer/SearchDialog.ui \ gui/FileTransfer/SearchDialog.ui \
gui/FileTransfer/SharedFilesDialog.ui \
gui/MainWindow.ui \ gui/MainWindow.ui \
gui/NetworkView.ui \ gui/NetworkView.ui \
gui/MessengerWindow.ui \ gui/MessengerWindow.ui \
gui/FriendsDialog.ui \ gui/FriendsDialog.ui \
gui/SharedFilesDialog.ui \
gui/ShareManager.ui \ gui/ShareManager.ui \
# gui/ShareDialog.ui \ # gui/ShareDialog.ui \
gui/MessagesDialog.ui \ gui/MessagesDialog.ui \
@ -723,7 +723,6 @@ SOURCES += main.cpp \
gui/RsAutoUpdatePage.cpp \ gui/RsAutoUpdatePage.cpp \
gui/RetroShareLink.cpp \ gui/RetroShareLink.cpp \
gui/SearchTreeWidget.cpp \ gui/SearchTreeWidget.cpp \
gui/SharedFilesDialog.cpp \
gui/ShareManager.cpp \ gui/ShareManager.cpp \
# gui/ShareDialog.cpp \ # gui/ShareDialog.cpp \
# gui/SFListDelegate.cpp \ # gui/SFListDelegate.cpp \
@ -735,6 +734,7 @@ SOURCES += main.cpp \
gui/help/browser/helpbrowser.cpp \ gui/help/browser/helpbrowser.cpp \
gui/help/browser/helptextbrowser.cpp \ gui/help/browser/helptextbrowser.cpp \
gui/FileTransfer/SearchDialog.cpp \ gui/FileTransfer/SearchDialog.cpp \
gui/FileTransfer/SharedFilesDialog.cpp \
gui/FileTransfer/TransfersDialog.cpp \ gui/FileTransfer/TransfersDialog.cpp \
gui/FileTransfer/FileTransferInfoWidget.cpp \ gui/FileTransfer/FileTransferInfoWidget.cpp \
gui/FileTransfer/DLListDelegate.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 { idle {
HEADERS += idle/idle.h HEADERS += idle/idle.h