Fixed resizing of the MainWindow when hashing files with long names.

Moved the hash strings of notifyHashingInfo from the librs to the GUI for translating.
Fixed german translation.

Recompile of GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3659 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-10-09 18:35:34 +00:00
parent 4a286f751b
commit 0be24268f7
18 changed files with 188 additions and 212 deletions

View file

@ -318,7 +318,7 @@ void FileIndexMonitor::updateCycle()
mInCheck = true;
}
cb->notifyHashingInfo("Examining shared files...") ;
cb->notifyHashingInfo(NOTIFY_HASHTYPE_EXAMINING_FILES, "") ;
std::vector<DirContentToHash> to_hash ;
@ -543,7 +543,7 @@ void FileIndexMonitor::updateCycle()
if(!to_hash.empty())
hashFiles(to_hash) ;
cb->notifyHashingInfo("") ;
cb->notifyHashingInfo(NOTIFY_HASHTYPE_FINISH, "") ;
{ /* LOCKED DIRS */
RsStackMutex stack(fiMutex); /**** LOCKED DIRS ****/
@ -634,8 +634,8 @@ void FileIndexMonitor::hashFiles(const std::vector<DirContentToHash>& to_hash)
//
std::ostringstream tmpout;
tmpout << cnt+1 << "/" << n_files << " (" << friendlyUnit(size) << " - " << int(size/double(total_size)*100.0) << "%) : " << to_hash[i].fentries[j].name ;
cb->notifyHashingInfo("Hashing file " + tmpout.str()) ;
cb->notifyHashingInfo(NOTIFY_HASHTYPE_HASH_FILE, tmpout.str()) ;
FileEntry fe(to_hash[i].fentries[j]) ; // copied, because hashFile updates the hash member
@ -666,7 +666,7 @@ void FileIndexMonitor::hashFiles(const std::vector<DirContentToHash>& to_hash)
std::cerr << "size - last_save_size = " << size - last_save_size << ", max=" << MAX_SIZE_WITHOUT_SAVING << std::endl ;
if(size > last_save_size + MAX_SIZE_WITHOUT_SAVING)
{
cb->notifyHashingInfo("Saving file index...") ;
cb->notifyHashingInfo(NOTIFY_HASHTYPE_SAVE_FILE_INDEX, "") ;
#ifdef WINDOWS_SYS
Sleep(1000) ;
#else

View file

@ -188,7 +188,7 @@ class NotifyBase
virtual void notifyChat() { return; }
virtual void notifyChatStatus(const std::string& /* peer_id */, const std::string& /* status_string */ ,bool /* is_private */) {}
virtual void notifyCustomState(const std::string& /* peer_id */, const std::string& /* status_string */) {}
virtual void notifyHashingInfo(std::string fileinfo) { (void)fileinfo; return ; }
virtual void notifyHashingInfo(uint32_t type, const std::string& fileinfo) { (void) type; (void)fileinfo; }
virtual void notifyTurtleSearchResult(uint32_t /* search_id */ ,const std::list<TurtleFileInfo>& files) { (void)files; }
virtual void notifyPeerHasNewAvatar(std::string peer_id) { (void)peer_id; }
virtual void notifyOwnAvatarChanged() {}
@ -225,6 +225,9 @@ const int NOTIFY_TYPE_MOD = 0x02; /* general purpose, check all */
const int NOTIFY_TYPE_ADD = 0x04; /* flagged additions */
const int NOTIFY_TYPE_DEL = 0x08; /* flagged deletions */
const uint32_t NOTIFY_HASHTYPE_EXAMINING_FILES = 1; /* Examining shared files */
const uint32_t NOTIFY_HASHTYPE_FINISH = 2; /* Finish */
const uint32_t NOTIFY_HASHTYPE_HASH_FILE = 3; /* Hashing file */
const uint32_t NOTIFY_HASHTYPE_SAVE_FILE_INDEX = 4; /* Hashing file */
#endif