mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-29 16:53:31 -05:00
removed compilation of ShareDialog that is unused, and cleanup the editing in ShareManager
This commit is contained in:
parent
6890669820
commit
8adb91be91
@ -32,7 +32,6 @@
|
|||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
|
|
||||||
#include "ShareManager.h"
|
#include "ShareManager.h"
|
||||||
#include "ShareDialog.h"
|
|
||||||
#include "settings/rsharesettings.h"
|
#include "settings/rsharesettings.h"
|
||||||
#include "gui/common/GroupFlagsWidget.h"
|
#include "gui/common/GroupFlagsWidget.h"
|
||||||
#include "gui/common/GroupSelectionBox.h"
|
#include "gui/common/GroupSelectionBox.h"
|
||||||
@ -109,9 +108,16 @@ void ShareManager::handleCellChange(int row,int column)
|
|||||||
void ShareManager::editShareDirectory()
|
void ShareManager::editShareDirectory()
|
||||||
{
|
{
|
||||||
QTableWidget *listWidget = ui.shareddirList;
|
QTableWidget *listWidget = ui.shareddirList;
|
||||||
int row = listWidget -> currentRow();
|
int row = listWidget->currentRow();
|
||||||
|
int col = listWidget->currentColumn();
|
||||||
|
|
||||||
doubleClickedCell(row,COLUMN_PATH) ;
|
if(col == COLUMN_VIRTUALNAME)
|
||||||
|
{
|
||||||
|
QModelIndex index = ui.shareddirList->model()->index(row,col,QModelIndex());
|
||||||
|
ui.shareddirList->edit(index);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
doubleClickedCell(row,col) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShareManager::doubleClickedCell(int row,int column)
|
void ShareManager::doubleClickedCell(int row,int column)
|
||||||
@ -170,7 +176,18 @@ void ShareManager::shareddirListCustomPopupMenu( QPoint /*point*/ )
|
|||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
|
|
||||||
QAction *editAct = new QAction(QIcon(IMAGE_EDIT), tr( "Edit" ), &contextMnu );
|
int col = ui.shareddirList->currentColumn();
|
||||||
|
QString edit_text ;
|
||||||
|
|
||||||
|
switch(col)
|
||||||
|
{
|
||||||
|
case COLUMN_GROUPS: edit_text = tr("Change group visibility...") ; break ;
|
||||||
|
case COLUMN_PATH: edit_text = tr("Choose directory to share...") ; break;
|
||||||
|
case COLUMN_VIRTUALNAME: edit_text = tr("Choose visible name...") ; break;
|
||||||
|
default:
|
||||||
|
case COLUMN_SHARE_FLAGS: return ;
|
||||||
|
}
|
||||||
|
QAction *editAct = new QAction(QIcon(IMAGE_EDIT), edit_text, &contextMnu );
|
||||||
connect( editAct , SIGNAL( triggered() ), this, SLOT( editShareDirectory() ) );
|
connect( editAct , SIGNAL( triggered() ), this, SLOT( editShareDirectory() ) );
|
||||||
|
|
||||||
QAction *removeAct = new QAction(QIcon(IMAGE_CANCEL), tr( "Remove" ), &contextMnu );
|
QAction *removeAct = new QAction(QIcon(IMAGE_CANCEL), tr( "Remove" ), &contextMnu );
|
||||||
@ -363,13 +380,6 @@ void ShareManager::addShare()
|
|||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShareManager::showShareDialog()
|
|
||||||
{
|
|
||||||
ShareDialog sharedlg ("", this);
|
|
||||||
sharedlg.exec();
|
|
||||||
load();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShareManager::shareddirListCurrentCellChanged(int /*currentRow*/, int /*currentColumn*/, int /*previousRow*/, int /*previousColumn*/)
|
void ShareManager::shareddirListCurrentCellChanged(int /*currentRow*/, int /*currentColumn*/, int /*previousRow*/, int /*previousColumn*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,6 @@ private slots:
|
|||||||
void handleCellChange(int row,int column);
|
void handleCellChange(int row,int column);
|
||||||
void editShareDirectory();
|
void editShareDirectory();
|
||||||
|
|
||||||
void showShareDialog();
|
|
||||||
void removeShareDirectory();
|
void removeShareDirectory();
|
||||||
void updateFlags();
|
void updateFlags();
|
||||||
void applyAndClose() ;
|
void applyAndClose() ;
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "RetroShareLink.h"
|
#include "RetroShareLink.h"
|
||||||
#include "ShareManager.h"
|
#include "ShareManager.h"
|
||||||
#include "RemoteDirModel.h"
|
#include "RemoteDirModel.h"
|
||||||
#include "ShareDialog.h"
|
|
||||||
#include "common/PeerDefs.h"
|
#include "common/PeerDefs.h"
|
||||||
#include "util/QtVersion.h"
|
#include "util/QtVersion.h"
|
||||||
#include "gui/common/RsCollectionFile.h"
|
#include "gui/common/RsCollectionFile.h"
|
||||||
@ -250,8 +249,6 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent)
|
|||||||
connect(openfileAct, SIGNAL(triggered()), this, SLOT(openfile())) ;
|
connect(openfileAct, SIGNAL(triggered()), this, SLOT(openfile())) ;
|
||||||
openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ;
|
openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ;
|
||||||
connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ;
|
connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ;
|
||||||
editshareAct = new QAction(QIcon(IMAGE_EDITSHARE), tr("Edit Share Permissions"), this) ;
|
|
||||||
connect(editshareAct, SIGNAL(triggered()), this, SLOT(editSharePermissions())) ;
|
|
||||||
|
|
||||||
ui.titleBarPixmap->setPixmap(QPixmap(IMAGE_MYFILES)) ;
|
ui.titleBarPixmap->setPixmap(QPixmap(IMAGE_MYFILES)) ;
|
||||||
|
|
||||||
@ -578,24 +575,6 @@ void RemoteSharedFilesDialog::downloadRemoteSelected()
|
|||||||
model -> downloadSelected(lst) ;
|
model -> downloadSelected(lst) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalSharedFilesDialog::editSharePermissions()
|
|
||||||
{
|
|
||||||
std::list<SharedDirInfo> dirs;
|
|
||||||
rsFiles->getSharedDirectories(dirs);
|
|
||||||
|
|
||||||
std::list<SharedDirInfo>::const_iterator it;
|
|
||||||
for (it = dirs.begin(); it != dirs.end(); ++it) {
|
|
||||||
if (currentFile == currentFile) {
|
|
||||||
/* file name found, show dialog */
|
|
||||||
ShareDialog sharedlg (it->filename, this);
|
|
||||||
sharedlg.setWindowTitle(tr("Edit Shared Folder"));
|
|
||||||
sharedlg.exec();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
|
void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
|
||||||
{
|
{
|
||||||
std::vector<DirDetails> dirVec;
|
std::vector<DirDetails> dirVec;
|
||||||
|
@ -163,7 +163,6 @@ class LocalSharedFilesDialog : public SharedFilesDialog
|
|||||||
private slots:
|
private slots:
|
||||||
void addShares();
|
void addShares();
|
||||||
void checkUpdate() ;
|
void checkUpdate() ;
|
||||||
void editSharePermissions();
|
|
||||||
void playselectedfiles();
|
void playselectedfiles();
|
||||||
void openfile();
|
void openfile();
|
||||||
void openfolder();
|
void openfolder();
|
||||||
|
@ -351,7 +351,7 @@ HEADERS += rshare.h \
|
|||||||
gui/SearchTreeWidget.h \
|
gui/SearchTreeWidget.h \
|
||||||
gui/SharedFilesDialog.h \
|
gui/SharedFilesDialog.h \
|
||||||
gui/ShareManager.h \
|
gui/ShareManager.h \
|
||||||
gui/ShareDialog.h \
|
# gui/ShareDialog.h \
|
||||||
# gui/SFListDelegate.h \
|
# gui/SFListDelegate.h \
|
||||||
gui/SoundManager.h \
|
gui/SoundManager.h \
|
||||||
gui/HelpDialog.h \
|
gui/HelpDialog.h \
|
||||||
@ -595,7 +595,7 @@ FORMS += gui/StartDialog.ui \
|
|||||||
gui/FriendsDialog.ui \
|
gui/FriendsDialog.ui \
|
||||||
gui/SharedFilesDialog.ui \
|
gui/SharedFilesDialog.ui \
|
||||||
gui/ShareManager.ui \
|
gui/ShareManager.ui \
|
||||||
gui/ShareDialog.ui \
|
# gui/ShareDialog.ui \
|
||||||
gui/MessagesDialog.ui \
|
gui/MessagesDialog.ui \
|
||||||
gui/help/browser/helpbrowser.ui \
|
gui/help/browser/helpbrowser.ui \
|
||||||
gui/HelpDialog.ui \
|
gui/HelpDialog.ui \
|
||||||
@ -715,7 +715,7 @@ SOURCES += main.cpp \
|
|||||||
gui/SearchTreeWidget.cpp \
|
gui/SearchTreeWidget.cpp \
|
||||||
gui/SharedFilesDialog.cpp \
|
gui/SharedFilesDialog.cpp \
|
||||||
gui/ShareManager.cpp \
|
gui/ShareManager.cpp \
|
||||||
gui/ShareDialog.cpp \
|
# gui/ShareDialog.cpp \
|
||||||
# gui/SFListDelegate.cpp \
|
# gui/SFListDelegate.cpp \
|
||||||
gui/SoundManager.cpp \
|
gui/SoundManager.cpp \
|
||||||
gui/MessagesDialog.cpp \
|
gui/MessagesDialog.cpp \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user