diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index 91f2d61f7..2007a59c0 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -36,7 +36,7 @@ #endif #include "RetroShareLink.h" #include "ShareManager.h" -#include "RemoteDirModel.h" +#include "RemoteDirModel.h" #include "ShareDialog.h" #include "common/PeerDefs.h" @@ -56,8 +56,8 @@ #define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_OPENFOLDER ":/images/folderopen.png" #define IMAGE_OPENFILE ":/images/fileopen.png" -#define IMAGE_COLLECTION ":/images/mimetypes/rscollection-16.png" -#define IMAGE_EDITSHARE ":/images/edit_16.png" +#define IMAGE_COLLECTION ":/images/mimetypes/rscollection-16.png" +#define IMAGE_EDITSHARE ":/images/edit_16.png" // Define to avoid using the search in treeview, because it is really slow for now. // @@ -130,7 +130,6 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD /* Set header resize modes and initial section sizes */ QHeaderView * header = ui.dirTreeView->header () ; - header->setResizeMode (0, QHeaderView::Interactive); header->resizeSection ( 0, 490 ); header->resizeSection ( 1, 70 ); @@ -327,6 +326,9 @@ void SharedFilesDialog::changeCurrentViewModel(int c) ui.dirTreeView->setModel(proxyModel); ui.dirTreeView->update(); + QHeaderView * header = ui.dirTreeView->header () ; + header->setResizeMode (0, QHeaderView::Interactive); + ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal,0,4) ; #ifdef DONT_USE_SEARCH_IN_TREE_VIEW @@ -460,7 +462,7 @@ void LocalSharedFilesDialog::createCollectionFile() std::cerr << "Creating a collection file!" << std::endl; QModelIndexList lst = getSelected(); model->createCollectionFile(this, lst); -} +} void RemoteSharedFilesDialog::downloadRemoteSelected() { @@ -472,24 +474,24 @@ void RemoteSharedFilesDialog::downloadRemoteSelected() QModelIndexList lst = getSelected(); model -> downloadSelected(lst); } - -void LocalSharedFilesDialog::editSharePermissions() -{ - std::list dirs; - rsFiles->getSharedDirectories(dirs); - - std::list::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 LocalSharedFilesDialog::editSharePermissions() +{ + std::list dirs; + rsFiles->getSharedDirectories(dirs); + + std::list::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) {