mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-20 20:08:30 -04:00
fixed open file, removed file action menu (already handled by the system), fixed the update of message icon when there is a new message
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@2633 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b623f0d427
commit
d4e50d09ab
4 changed files with 62 additions and 92 deletions
|
@ -1021,7 +1021,8 @@ void RemoteDirModel::openSelected(QModelIndexList qmil, bool openFolder)
|
|||
std::list<DirDetails>::iterator it;
|
||||
getFileInfoFromIndexList(qmil, files_info);
|
||||
|
||||
for (it = files_info.begin(); it != files_info.end(); it++) {
|
||||
for (it = files_info.begin(); it != files_info.end(); it++)
|
||||
{
|
||||
if ((*it).type & DIR_TYPE_PERSON) continue;
|
||||
|
||||
std::string fullpath, name;
|
||||
|
@ -1035,25 +1036,19 @@ void RemoteDirModel::openSelected(QModelIndexList qmil, bool openFolder)
|
|||
name = fullpath;
|
||||
}
|
||||
|
||||
if (!openFolder) {
|
||||
if ((*it).type & DIR_TYPE_FILE) {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(name.c_str()));
|
||||
}
|
||||
} else {
|
||||
if (dirs_to_open.end() == std::find(dirs_to_open.begin(), dirs_to_open.end(), fullpath)) {
|
||||
dirs_to_open.push_back(fullpath);
|
||||
}
|
||||
}
|
||||
std::cerr << "Opennign this file: " << name << std::endl ;
|
||||
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromUtf8(name.c_str(),name.length())));
|
||||
}
|
||||
|
||||
if (openFolder) {
|
||||
std::list<std::string>::iterator dit;
|
||||
for (dit = dirs_to_open.begin(); dit != dirs_to_open.end(); dit++)
|
||||
{
|
||||
std::cerr << "Opennign this folder: " << (*dit).c_str() << std::endl ;
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile((*dit).c_str()));
|
||||
}
|
||||
}
|
||||
// if (openFolder) {
|
||||
// std::list<std::string>::iterator dit;
|
||||
// for (dit = dirs_to_open.begin(); dit != dirs_to_open.end(); dit++)
|
||||
// {
|
||||
// std::cerr << "Opennign this folder: " << (*dit).c_str() << std::endl ;
|
||||
// QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromUtf8((*dit).c_str())));
|
||||
// }
|
||||
// }
|
||||
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "::::::::::::Done RemoteDirModel::openSelected()" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue