Removed menus with friends in SharedFilesDialog.

Add a single action to send files as message.
Add send as message to the remote files too.
The files are now send as recommended files.
Disable context menus for the person item.
Auto hide the AttachFileItem in all dialogs after the successfully finish of the hash.
Removed the column source of the files in messages.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3759 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-07 21:33:48 +00:00
parent 4751295a3f
commit dd4c43cf7d
12 changed files with 287 additions and 463 deletions

View file

@ -939,60 +939,6 @@ void RemoteDirModel::getFileInfoFromIndexList(const QModelIndexList& list, std::
#endif
}
#if 0
void RemoteDirModel::recommendSelectedOnly(QModelIndexList list)
{
#ifdef RDM_DEBUG
std::cerr << "recommendSelectedOnly()" << std::endl;
#endif
if (RemoteMode)
{
#ifdef RDM_DEBUG
std::cerr << "Cannot recommend remote! (should download)" << std::endl;
#endif
}
rsFiles->ClearInRecommend();
/* Fire off requests */
QModelIndexList::iterator it;
for(it = list.begin(); it != list.end(); it++)
{
void *ref = it -> internalPointer();
DirDetails details;
uint32_t flags = DIR_FLAGS_DETAILS;
if (RemoteMode)
{
flags |= DIR_FLAGS_REMOTE;
continue; /* don't recommend remote stuff */
}
else
{
flags |= DIR_FLAGS_LOCAL;
}
if (!rsFiles->RequestDirDetails(ref, details, flags))
{
continue;
}
#ifdef RDM_DEBUG
std::cerr << "::::::::::::FileRecommend:::: " << std::endl;
std::cerr << "Name: " << details.name << std::endl;
std::cerr << "Hash: " << details.hash << std::endl;
std::cerr << "Size: " << details.count << std::endl;
std::cerr << "Path: " << details.path << std::endl;
#endif
rsFiles -> FileRecommend(details.name, details.hash, details.count);
rsFiles -> SetInRecommend(details.name, true);
}
#ifdef RDM_DEBUG
std::cerr << "::::::::::::Done FileRecommend" << std::endl;
#endif
}
#endif
/****************************************************************************
* OLD RECOMMEND SYSTEM - DISABLED
******/
@ -1218,8 +1164,7 @@ QStringList RemoteDirModel::mimeTypes () const
//============================================================================
bool
RemoteDirModel::isDir ( const QModelIndex & index ) const
int RemoteDirModel::getType ( const QModelIndex & index ) const
{
//if (RemoteMode) // only local files can be opened
// return ;
@ -1239,5 +1184,5 @@ RemoteDirModel::isDir ( const QModelIndex & index ) const
return false;//not good, but....
}
return (details.type == DIR_TYPE_DIR) ;
return details.type;
}