diff --git a/build_scripts/OSX/OSX_RS_Compilation_Instructions.txt b/build_scripts/OSX/OSX_RS_Compilation_Instructions.txt new file mode 100644 index 000000000..684c45f3e --- /dev/null +++ b/build_scripts/OSX/OSX_RS_Compilation_Instructions.txt @@ -0,0 +1,66 @@ + +Mac OSX Build Instructions. +------------------------------------------- + +There are several complications with building Retroshare under OSX. + 1) Support Libraries must be built and installed seperately. + 2) Universal and OSX 10.5 support is a little tricky, mainly due to the support libraries. + +Additional Libraries +--------------------- + + * GnuPG Package, that comes with Retroshare OSX install image. (GnuPG-1.4.9.dmg) + +GPG Development libraries + * libassuan (I'm using 2.0.1) + * libgpg-error (I'm using 1.9) + * libgpgme (I'm using 1.3.0) + +These libraries use standard UNIX installation systems: AUTOCONF/AUTOMAKE (configure, make, etc) +Unfortunately, this makes it difficult and a little manual to compile Universal and 10.5 libraries. + +UPNPC (for OSX and windows) + * miniupnpc (I'm using 1.0) + +You will also need to install + * XCode (available on the Apple Install CDs) + * Qt4 (from trolltech.com) + +First Compilation... +-------------------- + +The First challenge is to build Retroshare on your Mac. For this first compilation, +we only build for your specific machine, and not attempt a Generic / 10.5 / Univeral build. + + +1) Install / Compile all the packages listed above. + be sure to use a configure command like this where applicable to only create a static library. + ./configure --enable-static=yes --enable-shared=no CFLAGS="-arch i386" CPPFLAGS="-arch i386" + +2) Check out the Retroshare SVN. + +3) compile libbitdht: + cd libbitdht/src + qmake + + This recreates a xcodeproj file for compilation using XCode. + Open with Xcode, and build. + +4) compile libretroshare: same way. +5) compile retroshare-gui: same way. + + +Creating Retroshare OSX Distribution Packages. +----------------------------------------------- + TODO, once I've got feedback on First Compilation! + + + + + + + + + + + diff --git a/libbitdht/src/bitdht/bdmsgs.cc b/libbitdht/src/bitdht/bdmsgs.cc index daccc95da..1e2b218ea 100644 --- a/libbitdht/src/bitdht/bdmsgs.cc +++ b/libbitdht/src/bitdht/bdmsgs.cc @@ -495,6 +495,10 @@ int beMsgMatchString(be_node *n, const char *str, int len) uint32_t beMsgGetY(be_node *n) { be_node *val = beMsgGetDictNode(n, "y"); + + if(val == NULL) + return BE_Y_UNKNOWN ; + if (val->type != BE_STR) { return BE_Y_UNKNOWN; @@ -539,7 +543,10 @@ uint32_t beMsgType(be_node *n) #ifdef DEBUG_MSG_TYPE std::cerr << "bsMsgType() QUERY MSG TYPE" << std::endl; #endif - be_node *query = beMsgGetDictNode(n, "q"); + be_node *query = beMsgGetDictNode(n, "q"); + + if(query == NULL) + return BITDHT_MSG_TYPE_UNKNOWN; if (beMsgMatchString(query, "ping", 4)) { @@ -800,11 +807,11 @@ int beMsgGetListStrings(be_node *n, std::list &values) for(int i = 0; n->val.l[i] != NULL; i++) { be_node *val = n->val.l[i]; - if (val->type != BE_STR) - { + + if (val == NULL || val->type != BE_STR) return 0; - } - int len = be_str_len(val); + + int len = be_str_len(val); std::string str; str.append(val->val.s, len); values.push_back(str); diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 1975dab30..37fcbe389 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -453,13 +453,13 @@ void FileIndexMonitor::run() { updateCycle(); - while(m_bRun) + while(isRunning()) { for(int i = 0; i < updatePeriod; i++) { - if (m_bRun == false) { + if (isRunning() == false) { return; } @@ -515,7 +515,7 @@ void FileIndexMonitor::updateCycle() cache_is_new = useHashCache && hashCache.empty() ; } - while(moretodo) + while(isRunning() && moretodo) { /* sleep a bit for each loop */ /********************************** WINDOWS/UNIX SPECIFIC PART ******************/ @@ -571,8 +571,8 @@ void FileIndexMonitor::updateCycle() #endif /* check for the dir existance */ - librs::util::FolderIterator dirIt(realpath); - if (!dirIt.isValid()) + librs::util::FolderIterator dirIt(realpath); + if (!dirIt.isValid()) { #ifdef FIM_DEBUG std::cerr << "FileIndexMonitor::updateCycle()"; @@ -617,20 +617,20 @@ void FileIndexMonitor::updateCycle() to_hash.back().realpath = realpath ; to_hash.back().dirpath = dirpath ; - while(dirIt.readdir()) + while(isRunning() && dirIt.readdir()) { /* check entry type */ - std::string fname; - dirIt.d_name(fname); + std::string fname; + dirIt.d_name(fname); std::string fullname = realpath + "/" + fname; #ifdef FIM_DEBUG std::cerr << "calling stats on " << fullname <notifyHashingInfo(NOTIFY_HASHTYPE_FINISH, "") ; @@ -827,9 +827,12 @@ void FileIndexMonitor::hashFiles(const std::vector& to_hash) uint64_t hashed_size=0 ; uint64_t last_save_size=0 ; + // check if thread is running + bool running = isRunning(); + /* update files */ - for(uint32_t i=0;i& to_hash) // if(useHashCache && hashCache.find(real_path,fe.size,fe.modtime,fe.hash)) fi.updateFileEntry(to_hash[i].dirpath,fe,stamp); - else if(RsDirUtil::getFileHash(real_path, fe.hash,fe.size)) // not found, then hash it. + else if(RsDirUtil::getFileHash(real_path, fe.hash,fe.size, this)) // not found, then hash it. { RsStackMutex stack(fiMutex); /**** LOCKED DIRS ****/ @@ -893,6 +896,9 @@ void FileIndexMonitor::hashFiles(const std::vector& to_hash) if(useHashCache) hashCache.save() ; } + + // check if thread is running + running = isRunning(); } cb->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0); diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 6684d3840..db43c0708 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -209,7 +209,7 @@ void ftController::run() /* check the queues */ uint32_t cnt = 0 ; - while(m_bRun) + while(isRunning()) { #ifdef WIN32 Sleep(1000); diff --git a/libretroshare/src/ft/ftextralist.cc b/libretroshare/src/ft/ftextralist.cc index 7bf54d740..b27cd4338 100644 --- a/libretroshare/src/ft/ftextralist.cc +++ b/libretroshare/src/ft/ftextralist.cc @@ -49,7 +49,7 @@ void ftExtraList::run() time_t cleanup = 0; time_t now = 0; - while (m_bRun) + while (isRunning()) { #ifdef DEBUG_ELIST //std::cerr << "ftExtraList::run() Iteration"; diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 96a7bde02..fe9be7fa5 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -225,7 +225,7 @@ CacheTransfer *ftServer::getCacheTransfer() void ftServer::run() { - while(m_bRun) + while(isRunning()) { mFtDataplex->deleteUnusedServers() ; #ifdef WIN32 diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index ea7db28cb..03da37794 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -358,7 +358,7 @@ void AuthGPGimpl::run() { int count = 0; - while (m_bRun) + while (isRunning()) { #ifdef WIN32 Sleep(100); diff --git a/libretroshare/src/rsserver/p3face-server.cc b/libretroshare/src/rsserver/p3face-server.cc index 7b6ac0ab1..6a2a746c0 100644 --- a/libretroshare/src/rsserver/p3face-server.cc +++ b/libretroshare/src/rsserver/p3face-server.cc @@ -110,7 +110,7 @@ void RsServer::run() int min = 0; int loop = 0; - while(m_bRun) + while(isRunning()) { #ifndef WINDOWS_SYS usleep((int) (timeDelta * 1000000)); diff --git a/libretroshare/src/services/p3distrib.cc b/libretroshare/src/services/p3distrib.cc index 36e2f9796..874877083 100644 --- a/libretroshare/src/services/p3distrib.cc +++ b/libretroshare/src/services/p3distrib.cc @@ -690,7 +690,7 @@ bool p3GroupDistrib::loadGroupKey(RsDistribGrpKey *newKey, bool historical) std::cerr << std::endl; #endif - if(!updateOk) +// if(!updateOk) delete newKey; newKey = NULL; diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc index 2240ae71c..3b82105f8 100644 --- a/libretroshare/src/util/rsdir.cc +++ b/libretroshare/src/util/rsdir.cc @@ -32,6 +32,7 @@ #include "util/rsdir.h" #include "pqi/pqinotify.h" #include "retroshare/rstypes.h" +#include "rsthreads.h" #include #include #include @@ -451,6 +452,8 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir) std::cerr << "check_create_directory()"; std::cerr < /* Function to hash, and get details of a file */ -bool RsDirUtil::getFileHash(const std::string& filepath, std::string &hash, uint64_t &size) +bool RsDirUtil::getFileHash(const std::string& filepath, std::string &hash, uint64_t &size, RsThread *thread /*= NULL*/) { FILE *fd; int len; @@ -549,14 +552,32 @@ bool RsDirUtil::getFileHash(const std::string& filepath, std::string &hash, uint size = ftello64(fd); fseeko64(fd, 0, SEEK_SET); + /* check if thread is running */ + bool isRunning = thread ? thread->isRunning() : true; + int runningCheckCount = 0; + SHA1_Init(sha_ctx); - while((len = fread(gblBuf,1, 512, fd)) > 0) + while(isRunning && (len = fread(gblBuf,1, 512, fd)) > 0) { SHA1_Update(sha_ctx, gblBuf, len); + + if (thread && ++runningCheckCount > (10 * 1024)) { + /* check all 50MB if thread is running */ + isRunning = thread->isRunning(); + runningCheckCount = 0; + } + } + + /* Thread has ended */ + if (isRunning == false) + { + delete sha_ctx; + fclose(fd); + return false; } /* reading failed for some reason */ - if (ferror(fd)) + if (ferror(fd)) { delete sha_ctx; fclose(fd); @@ -565,7 +586,7 @@ bool RsDirUtil::getFileHash(const std::string& filepath, std::string &hash, uint SHA1_Final(&sha_buf[0], sha_ctx); - std::ostringstream tmpout; + std::ostringstream tmpout; for(int i = 0; i < SHA_DIGEST_LENGTH; i++) { tmpout << std::setw(2) << std::setfill('0') << std::hex << (unsigned int) (sha_buf[i]); diff --git a/libretroshare/src/util/rsdir.h b/libretroshare/src/util/rsdir.h index 98a2f75ce..a05e1cb6a 100644 --- a/libretroshare/src/util/rsdir.h +++ b/libretroshare/src/util/rsdir.h @@ -33,6 +33,7 @@ #include class CRC32Map ; +class RsThread; namespace RsDirUtil { @@ -64,7 +65,7 @@ bool checkCreateDirectory(const std::string& dir); bool cleanupDirectory(const std::string& dir, const std::list &keepFiles); bool hashFile(const std::string& filepath, std::string &name, std::string &hash, uint64_t &size); -bool getFileHash(const std::string& filepath,std::string &hash, uint64_t &size); +bool getFileHash(const std::string& filepath,std::string &hash, uint64_t &size, RsThread *thread = NULL); std::wstring getWideTopDir(std::wstring); diff --git a/libretroshare/src/util/rsthreads.cc b/libretroshare/src/util/rsthreads.cc index ba774465b..e18eb1905 100644 --- a/libretroshare/src/util/rsthreads.cc +++ b/libretroshare/src/util/rsthreads.cc @@ -82,7 +82,7 @@ pthread_t createThread(RsThread &thread) RsThread::RsThread () { - m_bRun = true; + mIsRunning = true; #ifdef WINDOWS_SYS memset (&mTid, 0, sizeof(mTid)); @@ -93,7 +93,8 @@ RsThread::RsThread () void RsThread::join() /* waits for the the mTid thread to stop */ { - m_bRun = false; + // do we need a mutex for this ? + mIsRunning = false; void *ptr; pthread_join(mTid, &ptr); @@ -104,6 +105,12 @@ void RsThread::stop() pthread_exit(NULL); } +bool RsThread::isRunning() +{ + // do we need a mutex for this ? + return mIsRunning; +} + RsQueueThread::RsQueueThread(uint32_t min, uint32_t max, double relaxFactor ) :mMinSleep(min), mMaxSleep(max), mRelaxFactor(relaxFactor) { @@ -113,7 +120,7 @@ RsQueueThread::RsQueueThread(uint32_t min, uint32_t max, double relaxFactor ) void RsQueueThread::run() { - while(m_bRun) + while(isRunning()) { bool doneWork = false; while(workQueued() && doWork()) diff --git a/libretroshare/src/util/rsthreads.h b/libretroshare/src/util/rsthreads.h index aae664d4d..a96c0cd14 100644 --- a/libretroshare/src/util/rsthreads.h +++ b/libretroshare/src/util/rsthreads.h @@ -118,10 +118,13 @@ virtual void run() = 0; /* called once the thread is started */ virtual void join(); /* waits for the the mTid thread to stop */ virtual void stop(); /* calls pthread_exit() */ +bool isRunning(); + pthread_t mTid; - RsMutex mMutex; -protected: - bool m_bRun; + RsMutex mMutex; + +private: + bool mIsRunning; }; diff --git a/libretroshare/src/util/smallobject.cc b/libretroshare/src/util/smallobject.cc index 0f312a0a2..ab7a6bf96 100644 --- a/libretroshare/src/util/smallobject.cc +++ b/libretroshare/src/util/smallobject.cc @@ -170,14 +170,21 @@ void FixedAllocator::printStatistics() const SmallObjectAllocator::SmallObjectAllocator(size_t maxObjectSize) : _maxObjectSize(maxObjectSize) { + RsStackMutex m(SmallObject::_mtx) ; + _lastAlloc = NULL ; _lastDealloc = NULL ; + _active = true ; } SmallObjectAllocator::~SmallObjectAllocator() { + RsStackMutex m(SmallObject::_mtx) ; + for(std::map::const_iterator it(_pool.begin());it!=_pool.end();++it) delete it->second ; + + _active = false ; } void *SmallObjectAllocator::allocate(size_t bytes) @@ -255,6 +262,10 @@ void *SmallObject::operator new(size_t size) #endif RsStackMutex m(_mtx) ; + + if(!_allocator._active) + return (void*)NULL; + void *p = _allocator.allocate(size) ; #ifdef DEBUG_MEMORY std::cerr << "new RsItem: " << p << ", size=" << size << std::endl; @@ -265,6 +276,10 @@ void *SmallObject::operator new(size_t size) void SmallObject::operator delete(void *p,size_t size) { RsStackMutex m(_mtx) ; + + if(!_allocator._active) + return ; + _allocator.deallocate(p,size) ; #ifdef DEBUG_MEMORY std::cerr << "del RsItem: " << p << ", size=" << size << std::endl; @@ -274,6 +289,10 @@ void SmallObject::operator delete(void *p,size_t size) void SmallObject::printStatistics() { RsStackMutex m(_mtx) ; + + if(!_allocator._active) + return ; + _allocator.printStatistics() ; } diff --git a/libretroshare/src/util/smallobject.h b/libretroshare/src/util/smallobject.h index 030542ac4..a745ad9ba 100644 --- a/libretroshare/src/util/smallobject.h +++ b/libretroshare/src/util/smallobject.h @@ -85,6 +85,8 @@ namespace RsMemoryManagement void deallocate(void *p,size_t size) ; void printStatistics() const ; + + bool _active ; private: std::map _pool ; FixedAllocator *_lastAlloc ; @@ -105,6 +107,8 @@ namespace RsMemoryManagement private: static SmallObjectAllocator _allocator ; static RsMutex _mtx; + + friend class SmallObjectAllocator ; }; extern void printStatistics() ; diff --git a/retroshare-gui/src/changelog.txt b/retroshare-gui/src/changelog.txt index 16437b703..0df62310e 100644 --- a/retroshare-gui/src/changelog.txt +++ b/retroshare-gui/src/changelog.txt @@ -1,31 +1,136 @@ -Changes for v0.5.1* +Changes for v0.5.1a -* custom status now sent without needing to have a private chat - - getcustom status now generate a requests to that peer. - - setowncustom status now generates an 'status available' item sent to all peers -* added new const ids for custom status 'request' and 'available' -* Udp connection uses now dyndns when available -* Remove some error detection in deserial for dynDNS backward compatibility -* Add the setDynDNS to the confcertdialog -* fixed MessengerWindow TreeWidget stylesheet -* fixed to get work rsStatus under Windows -* display Avatar icons on second item in MessengerWindow, when no Avatar pictures is available show a default one. -* restored open messenger to main window left hand panel -* replaced messenger peer icons with avatars -* removed offline status msg -* sendstatus is now on qtimer - think of replacing with rs notify call back - - hack to load file status from previous rs session - - also removed 'offline' status -* Added to count new messages on Tray icon Tooltip. -* implemented simple rsStatus for messenger window -* fixed minor bug with messenger window (starts new pop-up chat dialog when peer responds, if private chat started from messenger window) -* removed double definition -* Added ShareDialog for ShareManager -* sorting on date in messages and showing time only for same day messages -* Fixed some labels font display problem -* Improved Display Messages Labels: From, Date, Subject, To, redesign the To Label to display it more user friendly -* Added to display text for Dir counts -* Added to display filesize in Bytes for Details +New features (DHT, Channels, Network View) +Improved stability w.r.t. previous version 0.5.0g" +Added lots of improvements, check for details svn log entrys + +Changes for v0.5.0g + +* corrected a bug that caused file copy error: a closeFile() was missing when the file is complete. + + +Changes for v0.5.0f + +* restored the retroshare-nogui executable +* bug corrections in cachestrapper +* bug corrections in RsTunnelItem and p3tunnel +* better error handling in rstunnelitem on windows +* removed deadlock in data multiplex +* improved p3disc info update + + +Changes for v0.5.0e + +* Made a pass on the code in p3disc. + +* Corrected some bugs: + - suppressed an unwanted return in packet treatment + - prevented sending info to a peer about itself + - changed askInfoToAllPeers() such as not to discard info from peers with + NODISC flag (because we especially need info for these) + - enabled receiving p3disc info even if p3discovery is disabled. Indeed, + disabeling p3disc is a measure of protection, so it should limit the + export of p3disc info, not the import. + - removed test discarding info about dummy friends, because it is useless + - don't discard info about peers that have the NODISC flag (meaning that we + especially need info for them) + - added safety check about received GPG keys. Before we relied on this test + being performed by p3ConnMgr::addFriend() + - added some debug info + +* put correct (i.e. non conservative) size for RsDiscReply packets + +* corrected bug in rsdiscitem that prevented RsDiscReply packets to transfer cp serialiser/rsdiscitems.cc + +* switched ip addr finder to on by default (users seem to request it, and its not harmful) + +* automatic removal of file lists from deleted peers, at restart (After double check that this does not alter exchange of file lists in any way) + +* set heartbeat values to intermediate value + +* added verification for file size computation (bug correction) + +* augmented the heartbeat parameters, to reduce the stress on connections. Seems to help a lot when the traffic is high. + +Changes for v0.5.0d + +Package improvements: + +* suppressed package dependency on gpg-agent + +Improvements: + +* implemented a free disk space checking method, with a warning when running low +* fixed proper sorting/updating of IP lists. +* only keep the most recent port for identical ips. +* don't start when the local address+port are already in use to avoid corrupting file lists, config files etc +* added failure tests for fwrite +* added tests against wrong ip 1.0.0.0 on MacOS + +Major bug corrections: + +* added missing locks in search requests into fimonitor.cc +* Suppressed the possibility for browsable only files to be searched by hash from turtle router. +* cleaned up some deadly code in rsdiscitems.cc, causing crashes +* improved the security of size determination for file lists, that caused a chain reaction ending in crash at clients. +* added missign lock in ftcontroller + +Minor bug corrections: + +* added a check to avoid (possibly rare) data races in data multiplex +* suppressed double click action for download in Shared File lists + + +Changes for v0.5.0c + +* Fixes two problems in the current group chat: + - the parser fails to embed two links in the same sentence + - the parser can potentially put smileys in the middle of tags + Solution: + Since the message is in HTML, it is parsed into a DOM tree, then that DOM tree + is traversed and only the text nodes are parsed (see HandleRichText.cpp for details). + Bonus fixes: + - missing std:: for endl (which was falling back to its Qt counterpart) + - commenting useless code in PeersDialog::smileyWidgetgroupchat() + - replacing int by size_t + - RetroShare.pro now queries gpgme-config for its include path +* fixed Memory leaks: + - getLocalInterfaces -> iptable = (MIB_IPADDRTABLE *) malloc(dwSize); + - main -> RshareSettings *_settings = new RshareSettings(); + - ExtAddrFinder::~ExtAddrFinder - use free for pointer allocated with malloc +* fixed RetroShare stopped responding during signing a key and asking for password. + - The QSingleShotTimer of ConfCertDialog wants to update the gui and stopped in PeerItem::updateItem. +* fixed chat bug that was truncating some messages, due to using a uint16_t to store a local size. Totally backward compatible. +* fixed crash with second open of HelpDialog solved +* implemented a short circuit to local cache transfers. + - This saves a large number of file descriptors, and improves reactivity of the software + +Changes for v0.5.0b + +* suppressed unused files +* added a checkpoint to file hashing, to save intermediate results every 10 GB +* corrected memory leak in p3disc heart-beat system. +* correct bug with selection with human readable delegate. +* fixed the sorting of SearchDialog by age and by size, by using proper delegates for displaying the numbers. +* Removed the SR_REALSIZE_COL column, that is no longer necessary. +* improved readability of cert generation dialog. Added tooltips, information, and wait cursor +* corrected bug in search: files with size > 2Gb would not be added to transfers +* corrected bug about persistence of default chunk strategy +* fix a gui bug +* The settings in the settings window are only loaded once. +* Saving the settings without changing the network settings doesn't shutdown the connections +* Forwarding a message keep the attached recommended files + - starting with ssl_id which has saved pword, and switching ids at start dialog + - secondary id may or may not have saved pword. +* added check for the result of fscanf +* fixed compatibility issue with dyndns patch +* Ported trunk commit 2780: Set the trust lvl to 3 when accepting a friend and the trust lvl is unknown. +* Removed some potentially harmful (deadlock) code. +* Put some printf into debugging #ifdef +* Bug fix: Checkbox for automatic share of the incoming directory doesn't correctly set with setDown, use setChecked +* ShareManager and RSettingsWin doesn't need to be created all the time +* RSettingsWin: Save the last active page for the current runtime +* ShareManager and DirectoryPage: Show changed shared directories direct after the change Changes for v0.5.0a diff --git a/retroshare-gui/src/gui/ChannelFeed.ui b/retroshare-gui/src/gui/ChannelFeed.ui index f267ec062..8a214824e 100644 --- a/retroshare-gui/src/gui/ChannelFeed.ui +++ b/retroshare-gui/src/gui/ChannelFeed.ui @@ -144,6 +144,9 @@ p, li { white-space: pre-wrap; } true + + Qt::NoFocus + Add @@ -197,6 +200,9 @@ p, li { white-space: pre-wrap; } 26 + + Qt::NoFocus + Post to Channel @@ -217,6 +223,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + Display diff --git a/retroshare-gui/src/gui/ForumsDialog.ui b/retroshare-gui/src/gui/ForumsDialog.ui index 3f0aefaad..080221ddf 100644 --- a/retroshare-gui/src/gui/ForumsDialog.ui +++ b/retroshare-gui/src/gui/ForumsDialog.ui @@ -619,6 +619,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + Add @@ -660,6 +663,9 @@ p, li { white-space: pre-wrap; } 24 + + Qt::NoFocus + Start new Thread for Selected Forum @@ -677,6 +683,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + Display @@ -938,6 +947,9 @@ background: white;} 24 + + Qt::NoFocus + Previous Thread @@ -973,6 +985,9 @@ background: white;} 24 + + Qt::NoFocus + Next Thread @@ -993,6 +1008,9 @@ background: white;} 24 + + Qt::NoFocus + @@ -1080,6 +1098,9 @@ p, li { white-space: pre-wrap; } MS Shell Dlg 2 + + Qt::NoFocus + Reset @@ -1151,6 +1172,9 @@ border-image: url(:/images/closepressed.png) 24 + + Qt::NoFocus + Reply Message diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index a346ce77a..349dfa013 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -93,15 +93,15 @@ /* Images for toolbar icons */ #define IMAGE_NETWORK2 ":/images/rs1.png" -#define IMAGE_PEERS ":/images/groupchat.png" -#define IMAGE_SEARCH ":/images/filefind.png" -#define IMAGE_TRANSFERS ":/images/ktorrent32.png" +#define IMAGE_PEERS ":/images/groupchat.png" +#define IMAGE_SEARCH ":/images/filefind.png" +#define IMAGE_TRANSFERS ":/images/ktorrent32.png" #define IMAGE_LINKS ":/images/irkick.png" -#define IMAGE_FILES ":/images/fileshare24.png" -#define IMAGE_CHANNELS ":/images/channels.png" +#define IMAGE_FILES ":/images/fileshare32.png" +#define IMAGE_CHANNELS ":/images/channels.png" #define IMAGE_FORUMS ":/images/konversation.png" #define IMAGE_PREFERENCES ":/images/kcmsystem24.png" -#define IMAGE_CHAT ":/images/groupchat.png" +#define IMAGE_CHAT ":/images/groupchat.png" #define IMAGE_RETROSHARE ":/images/rstray3.png" #define IMAGE_ABOUT ":/images/informations_24x24.png" #define IMAGE_STATISTIC ":/images/utilities-system-monitor.png" @@ -110,8 +110,8 @@ #define IMAGE_RSM32 ":/images/kdmconfig.png" #define IMAGE_RSM16 ":/images/rsmessenger16.png" #define IMAGE_CLOSE ":/images/close_normal.png" -#define IMAGE_BLOCK ":/images/blockdevice.png" -#define IMAGE_COLOR ":/images/highlight.png" +#define IMAGE_BLOCK ":/images/blockdevice.png" +#define IMAGE_COLOR ":/images/highlight.png" #define IMAGE_GAMES ":/images/kgames.png" #define IMAGE_PHOTO ":/images/lphoto.png" #define IMAGE_ADDFRIEND ":/images/add-friend24.png" diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/MessagesDialog.ui index 4cfce3fc7..194e1452d 100644 --- a/retroshare-gui/src/gui/MessagesDialog.ui +++ b/retroshare-gui/src/gui/MessagesDialog.ui @@ -569,6 +569,9 @@ border: 1px solid #CCCCCC;} 167777 + + Qt::NoFocus + New Message @@ -579,7 +582,7 @@ border: 1px solid #CCCCCC;} Compose - + :/images/folder-draft24.png:/images/folder-draft24.png @@ -623,6 +626,9 @@ border: 1px solid #CCCCCC;} 16777 + + Qt::NoFocus + Reply to selected message @@ -633,7 +639,7 @@ border: 1px solid #CCCCCC;} Reply - + :/images/replymail-pressed.png:/images/replymail-pressed.png @@ -664,6 +670,9 @@ border: 1px solid #CCCCCC;} 16777 + + Qt::NoFocus + Reply all to selected message @@ -671,7 +680,7 @@ border: 1px solid #CCCCCC;} Reply all - + :/images/replymailall24-hover.png:/images/replymailall24-hover.png @@ -702,6 +711,9 @@ border: 1px solid #CCCCCC;} 16777 + + Qt::NoFocus + Forward selected message @@ -709,7 +721,7 @@ border: 1px solid #CCCCCC;} Foward - + :/images/mailforward24-hover.png:/images/mailforward24-hover.png @@ -747,6 +759,9 @@ border: 1px solid #CCCCCC;} 16777 + + Qt::NoFocus + Remove selected message @@ -757,7 +772,7 @@ border: 1px solid #CCCCCC;} Delete - + :/images/deletemail24.png:/images/deletemail24.png @@ -794,6 +809,9 @@ border: 1px solid #CCCCCC;} 16777 + + Qt::NoFocus + Print selected message @@ -801,7 +819,7 @@ border: 1px solid #CCCCCC;} Print - + :/images/print24.png:/images/print24.png @@ -829,11 +847,14 @@ border: 1px solid #CCCCCC;} 0 + + Qt::NoFocus + Display - + :/images/looknfeel.png:/images/looknfeel.png @@ -874,7 +895,7 @@ border: 1px solid #CCCCCC;} - :/images/find-16.png + :/images/find-16.png @@ -895,6 +916,9 @@ border: 1px solid #CCCCCC;} 16 + + Qt::NoFocus + Reset @@ -959,6 +983,9 @@ border-image: url(:/images/closepressed.png) + + Qt::NoFocus + Tags @@ -966,7 +993,7 @@ border-image: url(:/images/closepressed.png) Tag - + :/images/tag24.png:/images/tag24.png @@ -1107,7 +1134,7 @@ border-image: url(:/images/closepressed.png) Inbox - + :/images/folder-inbox.png:/images/folder-inbox.png @@ -1116,7 +1143,7 @@ border-image: url(:/images/closepressed.png) Outbox - + :/images/folder-outbox.png:/images/folder-outbox.png @@ -1125,7 +1152,7 @@ border-image: url(:/images/closepressed.png) Draft - + :/images/folder-draft.png:/images/folder-draft.png @@ -1134,7 +1161,7 @@ border-image: url(:/images/closepressed.png) Sent - + :/images/folder-sent.png:/images/folder-sent.png @@ -1143,7 +1170,7 @@ border-image: url(:/images/closepressed.png) Trash - + :/images/folder-trash.png:/images/folder-trash.png @@ -1190,7 +1217,7 @@ border: 1px solid #CCCCCC;} Favorite Tags - + :/images/tag24.png:/images/tag24.png @@ -1324,7 +1351,7 @@ padding: 4px; - :/images/attachment.png + :/images/attachment.png @@ -1353,11 +1380,14 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + - + :/images/edit_remove24.png:/images/edit_remove24.png @@ -1385,6 +1415,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1395,7 +1428,7 @@ p, li { white-space: pre-wrap; } - + :/images/down.png:/images/down.png @@ -1832,7 +1865,9 @@ p, li { white-space: pre-wrap; } msgText msgList - + + + expandFilesButton diff --git a/retroshare-gui/src/gui/NetworkDialog.ui b/retroshare-gui/src/gui/NetworkDialog.ui index e746a0bdd..1d5156864 100644 --- a/retroshare-gui/src/gui/NetworkDialog.ui +++ b/retroshare-gui/src/gui/NetworkDialog.ui @@ -233,6 +233,9 @@ p, li { white-space: pre-wrap; } MS Shell Dlg 2 + + Qt::NoFocus + Clear Filter @@ -295,6 +298,9 @@ border-image: url(:/images/closepressed.png) + + Qt::NoFocus + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 5d685805c..7286cdd19 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -399,7 +399,7 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point ) iconLabel->setMaximumSize( iconLabel->frameSize().height() + 24, 24 ); hbox->addWidget(iconLabel); - textLabel = new QLabel("" + tr("RetroShare") + "", widget ); + textLabel = new QLabel("RetroShare", widget ); hbox->addWidget(textLabel); @@ -1275,7 +1275,7 @@ void PeersDialog::removefriend() if (rsPeers) { - if ((QMessageBox::question(this, tr("RetroShare"),tr("Do you want to remove this Friend?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) + if ((QMessageBox::question(this, "RetroShare",tr("Do you want to remove this Friend?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) { rsPeers->removeFriend(getPeerRsCertId(c)); emit friendsUpdated() ; @@ -1726,8 +1726,10 @@ void PeersDialog::on_actionClear_Chat_History_triggered() void PeersDialog::on_actionDelete_Chat_History_triggered() { - on_actionClear_Chat_History_triggered(); - historyKeeper.clear(); + if ((QMessageBox::question(this, "RetroShare", tr("Do you really want to physically delete the history?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes) { + on_actionClear_Chat_History_triggered(); + historyKeeper.clear(); + } } void PeersDialog::smileyWidgetgroupchat() diff --git a/retroshare-gui/src/gui/PeersDialog.ui b/retroshare-gui/src/gui/PeersDialog.ui index 302ad0f04..505d7ee33 100644 --- a/retroshare-gui/src/gui/PeersDialog.ui +++ b/retroshare-gui/src/gui/PeersDialog.ui @@ -553,6 +553,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + Add @@ -607,6 +610,9 @@ p, li { white-space: pre-wrap; } + + Qt::NoFocus + Display @@ -965,9 +971,6 @@ background: white;} - - Messages entered here are sent to all collected friends - 30 @@ -1001,6 +1004,9 @@ background: white;} Qt::CustomContextMenu + + Messages entered here are sent to all collected friends + QTextEdit#lineEdit{border: 1px solid #CCCCCC; } @@ -1050,6 +1056,9 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + @@ -1088,6 +1097,9 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + Bold @@ -1126,6 +1138,9 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + Underline @@ -1164,6 +1179,9 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + Italic @@ -1202,6 +1220,9 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + Font @@ -1237,12 +1258,11 @@ border: 1px solid #CCCCCC;} 24 + + Qt::NoFocus + - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">set Text Color</span></p></body></html> + Text Color @@ -1272,6 +1292,9 @@ p, li { white-space: pre-wrap; } 24 + + Qt::NoFocus + QPushButton::menu-indicator { subcontrol-origin: padding; @@ -1325,6 +1348,9 @@ p, li { white-space: pre-wrap; } 26 + + Qt::NoFocus + Attach File diff --git a/retroshare-gui/src/gui/RsAutoUpdatePage.cpp b/retroshare-gui/src/gui/RsAutoUpdatePage.cpp index 20d3d8662..ecd794fe1 100644 --- a/retroshare-gui/src/gui/RsAutoUpdatePage.cpp +++ b/retroshare-gui/src/gui/RsAutoUpdatePage.cpp @@ -17,6 +17,14 @@ RsAutoUpdatePage::RsAutoUpdatePage(int ms_update_period,QWidget *parent) _timer->start() ; } +RsAutoUpdatePage::~RsAutoUpdatePage() +{ + if(_timer != NULL) + delete _timer ; + + _timer = NULL ; +} + void RsAutoUpdatePage::showEvent(QShowEvent *event) { //std::cout << "RsAutoUpdatePage::showEvent() In show event !!" << std::endl ; diff --git a/retroshare-gui/src/gui/RsAutoUpdatePage.h b/retroshare-gui/src/gui/RsAutoUpdatePage.h index 4dc951a54..2116a7200 100644 --- a/retroshare-gui/src/gui/RsAutoUpdatePage.h +++ b/retroshare-gui/src/gui/RsAutoUpdatePage.h @@ -19,6 +19,7 @@ class RsAutoUpdatePage: public MainPage public: RsAutoUpdatePage(int ms_update_period = 1000,QWidget *parent=NULL) ; + virtual ~RsAutoUpdatePage() ; virtual void updateDisplay() {} diff --git a/retroshare-gui/src/gui/SearchDialog.ui b/retroshare-gui/src/gui/SearchDialog.ui index 1a235b02c..05c9bd46e 100644 --- a/retroshare-gui/src/gui/SearchDialog.ui +++ b/retroshare-gui/src/gui/SearchDialog.ui @@ -7,7 +7,7 @@ 0 0 574 - 344 + 329 @@ -769,6 +769,9 @@ border: none;} 16 + + Qt::NoFocus + Reset @@ -800,6 +803,12 @@ border-image: url(:/images/closepressed.png) 0 + + + 16 + 16 + + 16 @@ -830,6 +839,9 @@ border: none;} + + Qt::NoFocus + Start Search @@ -1042,6 +1054,9 @@ border-image: url(:/images/btn_26_pressed.png) 4; MS Shell Dlg 2 + + Qt::NoFocus + Clear Filter diff --git a/retroshare-gui/src/gui/SharedFilesDialog.ui b/retroshare-gui/src/gui/SharedFilesDialog.ui index 8702747dd..e6a07d2c1 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.ui +++ b/retroshare-gui/src/gui/SharedFilesDialog.ui @@ -592,6 +592,9 @@ p, li { white-space: pre-wrap; } 24 + + Qt::NoFocus + Splitted View @@ -621,6 +624,9 @@ p, li { white-space: pre-wrap; } 24 + + Qt::NoFocus + Friends Folders @@ -650,6 +656,9 @@ p, li { white-space: pre-wrap; } 24 + + Qt::NoFocus + My Folders @@ -752,6 +761,9 @@ p, li { white-space: pre-wrap; } MS Shell Dlg 2 + + Qt::NoFocus + Start Search @@ -783,6 +795,9 @@ p, li { white-space: pre-wrap; } MS Shell Dlg 2 + + Qt::NoFocus + Reset diff --git a/retroshare-gui/src/gui/TurtleRouterDialog.cpp b/retroshare-gui/src/gui/TurtleRouterDialog.cpp index 3cd08a42a..c67b004cd 100644 --- a/retroshare-gui/src/gui/TurtleRouterDialog.cpp +++ b/retroshare-gui/src/gui/TurtleRouterDialog.cpp @@ -3,6 +3,8 @@ #include #include "TurtleRouterDialog.h" +static const int MAX_TUNNEL_REQUESTS_DISPLAY = 10 ; + TurtleRouterDialog::TurtleRouterDialog(QWidget *parent) : RsAutoUpdatePage(2000,parent) { @@ -41,7 +43,11 @@ void TurtleRouterDialog::updateDisplay() // remove all children of top level objects for(int i=0;i<_f2f_TW->topLevelItemCount();++i) - while(_f2f_TW->topLevelItem(i)->takeChild(0) != NULL) ; + { + QTreeWidgetItem *taken ; + while( (taken = _f2f_TW->topLevelItem(i)->takeChild(0)) != NULL) + delete taken ; + } for(uint i=0;itext(0) == QString("Unknown hashes")) + if(parent->text(0).left(14) == QString("Unknown hashes")) unknown_hash_found = true ; QString str = QString::fromStdString( "Tunnel id: " + tunnels_info[i][0] + "\t [" + tunnels_info[i][2] + "] --> [" + tunnels_info[i][1] + "]\t\t last transfer: " + tunnels_info[i][4] + "\t Speed: " + tunnels_info[i][5] ) ; stl.clear() ; stl.push_back(str) ; - new QTreeWidgetItem(parent,stl) ; + parent->addChild(new QTreeWidgetItem(stl)) ; } for(uint i=0;iaddChild(new QTreeWidgetItem(stl)) ; } top_level_s_requests->setText(0, tr("Search requests") + "(" + QString::number(search_reqs_info.size()) + ")" ) ; - for(uint i=0;i= reqs_size || i < MAX_TUNNEL_REQUESTS_DISPLAY) + { + QString str = QString::fromStdString( "Request id: " + tunnel_reqs_info[i][0] + "\t from [" + tunnel_reqs_info[i][1] + "]\t " + tunnel_reqs_info[i][2]) ; + + stl.clear() ; + stl.push_back(str) ; + + top_level_t_requests->addChild(new QTreeWidgetItem(stl)) ; + } + else if(i == MAX_TUNNEL_REQUESTS_DISPLAY) + { + stl.clear() ; + stl.push_back(QString("...")) ; + top_level_t_requests->addChild(new QTreeWidgetItem(stl)) ; + + } - new QTreeWidgetItem(top_level_t_requests,stl) ; - } top_level_t_requests->setText(0, tr("Tunnel requests") + "("+QString::number(tunnel_reqs_info.size()) + ")") ; + QTreeWidgetItem *unknown_hashs_item = findParentHashItem("") ; + unknown_hashs_item->setText(0,QString("Unknown hashes (") + QString::number(unknown_hashs_item->childCount())+QString(")")) ; + // Ok, this is a N2 search, but there are very few elements in the list. for(int i=2;i<_f2f_TW->topLevelItemCount();) { bool found = false ; - if(_f2f_TW->topLevelItem(i)->text(0) == "Unknown hashes" && unknown_hash_found) + if(_f2f_TW->topLevelItem(i)->text(0).left(14) == "Unknown hashes" && unknown_hash_found) found = true ; if(_f2f_TW->topLevelItem(i)->childCount() > 0) // this saves uploading hashes @@ -103,7 +123,7 @@ void TurtleRouterDialog::updateDisplay() found=true ; if(!found) - _f2f_TW->takeTopLevelItem(i) ; + delete _f2f_TW->takeTopLevelItem(i) ; else ++i ; } @@ -113,7 +133,7 @@ QTreeWidgetItem *TurtleRouterDialog::findParentHashItem(const std::string& hash) { // look for the hash, and insert a new element if necessary. // - QList items = _f2f_TW->findItems((hash=="")?QString("Unknown hashes"):QString::fromStdString(hash),Qt::MatchExactly) ; + QList items = _f2f_TW->findItems((hash=="")?QString("Unknown hashes"):QString::fromStdString(hash),Qt::MatchStartsWith) ; if(items.empty()) { diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index a7c326b43..a2affc63a 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -833,8 +833,10 @@ void PopupChatDialog::on_actionClear_Chat_History_triggered() void PopupChatDialog::on_actionDelete_Chat_History_triggered() { - on_actionClear_Chat_History_triggered(); - historyKeeper.clear(); + if ((QMessageBox::question(this, "RetroShare", tr("Do you really want to physically delete the history?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes) { + on_actionClear_Chat_History_triggered(); + historyKeeper.clear(); + } } void PopupChatDialog::updatePeerAvatar(const std::string& peer_id) diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.ui b/retroshare-gui/src/gui/chat/PopupChatDialog.ui index 782dec47a..6160017c3 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.ui +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.ui @@ -325,6 +325,9 @@ stop:0 #FFFFD7, stop:1 #FFFFB2);} 16 + + Qt::NoFocus + Close @@ -398,6 +401,9 @@ border-image: url(:/images/closepressed.png) 28 + + Qt::NoFocus + QPushButton::menu-indicator { subcontrol-origin: padding; @@ -445,6 +451,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Attach a Picture @@ -474,6 +483,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Add a File for your Friend @@ -535,6 +547,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + @@ -563,6 +578,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Bold @@ -595,6 +613,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Underline @@ -627,6 +648,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Italic @@ -659,8 +683,11 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + - Set Font + Font @@ -691,6 +718,9 @@ border: 1px solid #CCCCCC; 28 + + Qt::NoFocus + Text Color diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.ui b/retroshare-gui/src/gui/common/GroupTreeWidget.ui index 8436fa84e..3bab82271 100644 --- a/retroshare-gui/src/gui/common/GroupTreeWidget.ui +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.ui @@ -125,6 +125,12 @@ border: none;} + + + 0 + 20 + + Title @@ -151,6 +157,9 @@ border: none;} 16 + + Qt::NoFocus + Reset diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.ui b/retroshare-gui/src/gui/forums/CreateForumMsg.ui index dbcfa998a..8e327f39c 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.ui +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.ui @@ -110,6 +110,9 @@ border: 1px solid #CCCCCC;} + + Qt::NoFocus + Attach File @@ -133,6 +136,9 @@ border: 1px solid #CCCCCC;} + + Qt::NoFocus + @@ -153,6 +159,9 @@ border: 1px solid #CCCCCC;} + + Qt::NoFocus + Sign Message @@ -186,6 +195,9 @@ border: 1px solid #CCCCCC;} + + Qt::NoFocus + Paste RetroShare Link diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index e5c908edf..c9c2489f5 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -431,13 +431,14 @@ images/user/friends24.png images/user/identity16.png images/user/identity24.png + images/user/identity32.png + images/user/identity48.png images/user/identityoffline24.png images/user/identity24away.png images/user/identity24busy.png images/user/identity24idle.png images/user/identityavaiblecyan24.png images/user/agt_forum24.png - images/user/identity32.png images/user/identitygray16.png images/user/add_user16.png images/user/personal64.png diff --git a/retroshare-gui/src/gui/notifyqt.cpp b/retroshare-gui/src/gui/notifyqt.cpp index ba22b7bac..2e91e8b58 100644 --- a/retroshare-gui/src/gui/notifyqt.cpp +++ b/retroshare-gui/src/gui/notifyqt.cpp @@ -126,16 +126,24 @@ void NotifyQt::notifyOwnAvatarChanged() std::string NotifyQt::askForPassword(const std::string& key_details,bool prev_is_bad) { - RsAutoUpdatePage::lockAllEvents() ; - std::string res = QInputDialog::getText(NULL, tr("GPG key passphrase"), - (prev_is_bad?tr("Wrong password !") + "\n\n" : QString()) + - tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromStdString(key_details), QLineEdit::Password, NULL, NULL).toStdString(); + QInputDialog dialog; + dialog.setWindowTitle(tr("GPG key passphrase")); + dialog.setLabelText((prev_is_bad?tr("Wrong password !") + "\n\n" : QString()) + + tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromStdString(key_details)); + dialog.setTextEchoMode(QLineEdit::Password); + dialog.setWindowIcon(QIcon(":/images/rstray3.png")); + + int ret = dialog.exec(); RsAutoUpdatePage::unlockAllEvents() ; - return res ; + if (ret) { + return dialog.textValue().toStdString(); + } + + return ""; } void NotifyQt::notifyDiscInfoChanged() diff --git a/retroshare-gui/src/lang/retroshare_de.qm b/retroshare-gui/src/lang/retroshare_de.qm index cc6a00680..cb3c400a5 100644 Binary files a/retroshare-gui/src/lang/retroshare_de.qm and b/retroshare-gui/src/lang/retroshare_de.qm differ diff --git a/retroshare-gui/src/lang/retroshare_de.ts b/retroshare-gui/src/lang/retroshare_de.ts index 46ea9f35c..b6cc2142f 100644 --- a/retroshare-gui/src/lang/retroshare_de.ts +++ b/retroshare-gui/src/lang/retroshare_de.ts @@ -1011,12 +1011,12 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:10pt; font-weight:600;">Kanäle</span></p></body></html> - + Add Hinzufügen - + Display Anzeige @@ -1071,7 +1071,7 @@ p, li { white-space: pre-wrap; } Andere Kanäle - + Post to Channel Kanalbeitrag erstellen @@ -1521,7 +1521,7 @@ p, li { white-space: pre-wrap; } Übernehmen und Schliessen - + RetroShare @@ -2377,42 +2377,42 @@ p, li { white-space: pre-wrap; } CreateForumMsg - + Post Forum Msg Forumbeitrag schreiben - + Forum Forum - + Forum Post Beitrag - + Sign Message Beitrag unterschreiben - + Subject Betreff - + Close Schliessen - + Post Forum Message Erstelle Forumbeitrag - + Paste RetroShare Link RetroShare Link einfügen @@ -2443,12 +2443,12 @@ p, li { white-space: pre-wrap; } Zusätzliche Datei hinzufügen - + Attach File Datei anhängen - + Attach files via drag and drop Hänge Dateien mit Drag'n'Drop an @@ -3698,17 +3698,17 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-weight:600;">Foren</span></p></body></html> - + Add Hinzufügen - + Start new Thread for Selected Forum Starte ein neues Thema im ausgewählten Forum - + Display Anzeige @@ -3742,24 +3742,24 @@ p, li { white-space: pre-wrap; } - + Date Datum - - + + Title Titel - - + + Author Autor - + Signed Unterzeichnet @@ -3777,17 +3777,17 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Thema:</span></p></body></html> - + Previous Thread Vorheriger Beitrag - + Next Thread Nächster Beitrag - + Reply Message Auf Beitrag antworten @@ -3813,7 +3813,7 @@ p, li { white-space: pre-wrap; } Erstelle neues Thema - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -3826,7 +3826,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Suche Foren</span></p></body></html> - + Reset Zurücksetzen @@ -4376,7 +4376,7 @@ Fill in your GPG password when asked, to sign your new key. Beschreibung - + Reset Zurücksetzen @@ -6047,7 +6047,7 @@ Willst Du die Nachricht speichern ? MessagesDialog - + New Message Neue Nachricht @@ -6063,7 +6063,7 @@ Willst Du die Nachricht speichern ? Nachricht entfernen - + Date Datum @@ -6076,12 +6076,12 @@ Willst Du die Nachricht speichern ? Von - + Size Grösse - + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"> @@ -6089,62 +6089,62 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Empfohlene Dateien</span></p></body></html> - + Reply Antworten - + Reply all Allen antworten - + Foward Weiterleiten - + Delete Löschen - + Compose Verfassen - + Reply to selected message Auf gewählte Nachricht antworten - + Reply all to selected message Auf gewählte Nachricht an alle Empfänger antworten - + Forward selected message Gewählte Nachricht weiterleiten - + Remove selected message Gewählte Nachricht entfernen - + Print selected message Gewählte Nachricht drucken - + Display Anzeige - + Reset Zurücksetzen @@ -6154,7 +6154,7 @@ p, li { white-space: pre-wrap; } Anhänge - + @@ -6181,7 +6181,7 @@ p, li { white-space: pre-wrap; } Gesendet - + Cc: Cc: @@ -6243,13 +6243,13 @@ p, li { white-space: pre-wrap; } Dokument drucken - + Subject Betreff - + Subject: Betreff: @@ -6274,7 +6274,7 @@ p, li { white-space: pre-wrap; } Prüfsumme - + Print Drucken @@ -6335,7 +6335,7 @@ p, li { white-space: pre-wrap; } Allen antworten - + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;"> @@ -6343,19 +6343,19 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alle Dateien runterladen</p></body></html> - + Total Inbox: Posteingang gesamt: - + Content Inhalt - + Tags @@ -7183,7 +7183,7 @@ p, li { white-space: pre-wrap; } Bitte geben Sie das Passwort ein um folgenden GPG Schlüssel freizuschalten: - + Examining shared files... Prüfe freigegebene Dateien... @@ -7382,7 +7382,7 @@ p, li { white-space: pre-wrap; } Zertifikate (*.pqi) - + Status Status @@ -7504,7 +7504,12 @@ p, li { white-space: pre-wrap; } Neuer Gruppenchat - + + Do you really want to physically delete the history? + Willst Du wirklich den Nachrichtenverlauf physisch löschen? + + + Load File Lade Datei @@ -7535,17 +7540,17 @@ p, li { white-space: pre-wrap; } Ordner können nicht für Drag'n'Drop genutzt werden. Nur Dateien werden akzeptiert. - + Italic Kursiv - + Underline Unterstrichen - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -7558,12 +7563,12 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Freunde</span></p></body></html> - + Add Hinzufügen - + Display Anzeige @@ -7578,12 +7583,12 @@ p, li { white-space: pre-wrap; } Statusnachricht ändern - + Messages entered here are sent to all collected friends - + Nachrichten, die Du hier eingibst, werden an alle verbundenen Freunde versendet - + Bold Fett @@ -7592,7 +7597,12 @@ p, li { white-space: pre-wrap; } Nachrichtenverlauf leeren - + + Text Color + Textfarbe + + + Create new Forum Erstelle neues Forum @@ -7674,40 +7684,43 @@ p, li { white-space: pre-wrap; } - + Add Friend Freund hinzufügen + + Set Text Color + Text Farbe + Create new Profile Erstelle neues Profil - + Font Schriftart - + Group Chat Gruppenchat - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">set Text Color</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> Text Farbe</span></p></body></html> - + Attach File Datei anhängen @@ -7728,13 +7741,7 @@ p, li { white-space: pre-wrap; } Nachrichtenverlauf speichern - - - RetroShare - - - - + Message Group Gruppe anschreiben @@ -7754,7 +7761,7 @@ p, li { white-space: pre-wrap; } Willst du diesen Freund entfernen? - + Save as... Speichern unter... @@ -7790,7 +7797,7 @@ p, li { white-space: pre-wrap; } Aktivitäten - + is typing... tippt... @@ -7805,7 +7812,7 @@ p, li { white-space: pre-wrap; } Nachrichtenverlauf - + Friends Freunde @@ -8131,7 +8138,12 @@ p, li { white-space: pre-wrap; } Avatar zeigen - + + Do you really want to physically delete the history? + Willst Du wirklich den Nachrichtenverlauf physisch löschen? + + + Load Picture File Lade Bilddatei @@ -8146,30 +8158,29 @@ p, li { white-space: pre-wrap; } Nachrichten, die Du versendest gehen bei diesem Freund erst wieder ein wenn er Online ist - - + + Bold Fett - - + + Underline Unterstrichen - - + + Italic Kursiv - Set Font - Schriftart setzen + Schriftart setzen - + Text Color Textfarbe @@ -8194,7 +8205,12 @@ p, li { white-space: pre-wrap; } Nachrichtenverlauf leeren - + + Font + Schriftart + + + Delete Chat History Nachrichtenverlauf löschen @@ -8204,7 +8220,7 @@ p, li { white-space: pre-wrap; } Löscht den gespeicherten und angezeigten Chat Verlauf - + Send Senden @@ -8213,7 +8229,7 @@ p, li { white-space: pre-wrap; } Chat Verlauf löschen - + Disable Emoticons Deaktiviere Emoticons @@ -8239,12 +8255,12 @@ p, li { white-space: pre-wrap; } Ordner können nicht für Drag'n'Drop genutzt werden. Nur Dateien werden akzeptiert. - + Add a File for your Friend Füge eine Datei für deinen Freund hinzu - + Save Chat History Nachrichtenverlauf speichern @@ -8260,18 +8276,18 @@ p, li { white-space: pre-wrap; } Text Datei (*.txt );;Alle Dateien (*) - + Your Friend is offline Do you want to send them a Message instead Dein Freund ist Offline willst du ihm stattdessen eine Nachricht senden - + Attach a Picture Bild anhängen - + is Idle and may not reply antwortet möglicherweise nicht, da der Status auf "Untätig" gesetzt wurde @@ -8291,7 +8307,7 @@ Do you want to send them a Message instead ist Offline. - + Paste RetroShare Link RetroShare Link einfügen @@ -8301,7 +8317,7 @@ Do you want to send them a Message instead tippt... - + Close Schliessen @@ -9438,28 +9454,28 @@ p, li { white-space: pre-wrap; } SearchDialog - + Sources Quellen - + Results Ergebnisse - - + + Download Herunterladen - + Enter a keyword here (at least 3 char long) Gib einen Suchbegriff ein (min. 3 Zeichen) - + Copy retroshare Link Kopiere RetroShare Link @@ -9479,7 +9495,7 @@ p, li { white-space: pre-wrap; } Freunden empfehlen - + Remove Entfernen @@ -9500,7 +9516,7 @@ p, li { white-space: pre-wrap; } Neu(e) RetroShare Link(s) - + Any Alle @@ -9520,12 +9536,12 @@ p, li { white-space: pre-wrap; } Gib einen Suchbegriff ein - + Filter Search Result Filter Suchergebnis - + Filename Dateiname @@ -9540,7 +9556,7 @@ p, li { white-space: pre-wrap; } Prüfsumme - + KeyWords Schlüsselwörter @@ -9550,7 +9566,7 @@ p, li { white-space: pre-wrap; } Such ID - + Download Notice Download @@ -9560,7 +9576,7 @@ p, li { white-space: pre-wrap; } Überspringe lokale Dateien - + Sorry Entschuldigung @@ -9572,7 +9588,7 @@ p, li { white-space: pre-wrap; } Diese Funktion ist noch nicht eingebaut. - + Size Grösse @@ -9582,7 +9598,7 @@ p, li { white-space: pre-wrap; } Typ - + Archive Archiv @@ -9612,7 +9628,7 @@ p, li { white-space: pre-wrap; } Ordner - + Start Search Starte Suche @@ -9622,7 +9638,7 @@ p, li { white-space: pre-wrap; } Suchen - + Clear Filter Filter leeren @@ -9684,12 +9700,12 @@ p, li { white-space: pre-wrap; } Begrenze Anzahl der Resultate auf : - + Reset Zurücksetzen - + Advanced Search Erweiterte Suche @@ -9699,7 +9715,7 @@ p, li { white-space: pre-wrap; } Erweitert - + Close All Search Results Schließe alle Suchergebnisse @@ -10193,28 +10209,28 @@ p, li { white-space: pre-wrap; } SharedFilesDialog - + Download Herunterladen - + Splitted View Geteiltes Fenster - + Friends Folders Ordner der Freunde - + My Folders Meine Ordner - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -10227,7 +10243,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-weight:600;">Dateien</span></p></body></html> - + All Alle @@ -10252,12 +10268,12 @@ p, li { white-space: pre-wrap; } Suche Dateien - + Start Search Starte Suche - + Reset Zurücksetzen @@ -11446,7 +11462,7 @@ p, li { white-space: pre-wrap; } Übertrage - + RetroShare @@ -11471,7 +11487,7 @@ p, li { white-space: pre-wrap; } Soll dieser Download wirklich abgebrochen und gelöscht werden? - + Speed / Queue position Geschwindigkeits- / Warteschlangenposition @@ -11534,38 +11550,38 @@ p, li { white-space: pre-wrap; } - + Failed Gescheitert - + - + Okay OK - - + + Waiting Warte - + Downloading Ladend - + Complete Vollständig - + Unknown Unbekannt @@ -11575,12 +11591,12 @@ p, li { white-space: pre-wrap; } Version: - + Uploading Hochladend - + Checking... Überprüfe... diff --git a/retroshare-gui/src/retroshare-portable.nsi b/retroshare-gui/src/retroshare-portable.nsi new file mode 100644 index 000000000..e12617b25 --- /dev/null +++ b/retroshare-gui/src/retroshare-portable.nsi @@ -0,0 +1,473 @@ +; Script generated with the Venis Install Wizard & modified by defnax + +; Define your application name +!define APPNAME "RetroShare" +!define VERSION "0.5.1 4069" +!define APPNAMEANDVERSION "${APPNAME} Portable ${VERSION}" +!define QTBASE "D:\qt\2010.01" + +; Main Install settings +Name "${APPNAMEANDVERSION}" +InstallDir "$PROGRAMFILES\RetroShare" +InstallDirRegKey HKLM "Software\${APPNAME}" "" +OutFile "RetroSharePortable_${VERSION}_setup.exe" +BrandingText "${APPNAMEANDVERSION}" +; Use compression +SetCompressor /SOLID LZMA + +; Modern interface settings +!include Sections.nsh +!include "UMUI.nsh" + +;Interface Settings +!define MUI_ABORTWARNING +;!define MUI_HEADERIMAGE +;!define MUI_HEADERIMAGE_BITMAP "retroshare.bmp" ; optional + +# MUI defines +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\UltraModernUI\Icon.ico" +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_LICENSEPAGE_RADIOBUTTONS +!define MUI_COMPONENTSPAGE_SMALLDESC +!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support" +!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/" +!define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare.exe" +!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt +!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\UltraModernUI\UnIcon.ico" +!define MUI_UNFINISHPAGE_NOAUTOCLOSE +!define MUI_LANGDLL_REGISTRY_ROOT HKLM +!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY} +!define UMUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage + +;!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of RetroShare. \r\n\r\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without havinf to reboot your computer. \r\n\r\nIMPORTANT: Ensure that RetroShare is NOT RUNNING before continuing (you can exit from the taskbar menu), otherwise the installer cannot update the executables, and the installation will fail. \r\n\r\nClick Next to continue. " + +;!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of RetroShare. \r\n\r\nIMPORTANT: Ensure that RetroShare is NOT RUNNING before continuing (you can exit from the taskbar menu), otherwise the installer cannot update the executables, and the installation will fail. \r\n\r\nClick Next to continue. " + + +; Defines the un-/installer logo of RetroShare +!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" +!insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp" + +; Set languages (first is default language) +!insertmacro MUI_RESERVEFILE_LANGDLL +ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll" + +;-------------------------------- +;Configuration + + + ;!insertmacro MUI_RESERVEFILE_SPECIALBITMAP + + LicenseLangString myLicenseData 1030 "license\license.txt" + LicenseLangString myLicenseData 1033 "license\license.txt" + LicenseLangString myLicenseData 1031 "license\license-GER.txt" + LicenseLangString myLicenseData 1036 "license\license-FR.txt" + LicenseLangString myLicenseData 1055 "license\license-TR.txt" + LicenseLangString myLicenseData 2052 "license\license.txt" + LicenseLangString myLicenseData 1045 "license\license.txt" + LicenseLangString myLicenseData 1041 "license\license.txt" + LicenseLangString myLicenseData 1042 "license\license.txt" + LicenseLangString myLicenseData 1049 "license\license.txt" + LicenseLangString myLicenseData 1053 "license\license.txt" + + LicenseData $(myLicenseData) + +# Installer pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "$(myLicenseData)" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +# Installer languages +!define MUI_LANGDLL_ALLLANGUAGES + +!insertmacro MUI_LANGUAGE Danish +!insertmacro MUI_LANGUAGE English +!insertmacro MUI_LANGUAGE French +!insertmacro MUI_LANGUAGE German +!insertmacro MUI_LANGUAGE Japanese +!insertmacro MUI_LANGUAGE Korean +!insertmacro MUI_LANGUAGE Polish +!insertmacro MUI_LANGUAGE Russian +!insertmacro MUI_LANGUAGE Swedish +!insertmacro MUI_LANGUAGE SimpChinese +!insertmacro MUI_LANGUAGE Turkish + + + + ;Component-selection page + ;Titles + + LangString sec_main ${LANG_ENGLISH} "Program Files" + LangString sec_data ${LANG_ENGLISH} "Program Skins" + LangString sec_shortcuts ${LANG_ENGLISH} "Shortcuts" + LangString sec_link ${LANG_ENGLISH} "File Association" + LangString sec_autostart ${LANG_ENGLISH} "Auto Startup" + LangString DESC_sec_main ${LANG_ENGLISH} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_ENGLISH} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_ENGLISH} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_ENGLISH} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_ENGLISH} "1033" + + + LangString sec_main ${LANG_FRENCH} "RetroShare" + LangString sec_data ${LANG_FRENCH} "Programme de Skins" + LangString sec_shortcuts ${LANG_FRENCH} "Raccourcis" + LangString sec_link ${LANG_FRENCH} "RetroShare fichiers Association" + LangString sec_startmenu ${LANG_FRENCH} "Raccourcis du menu Démarrer" + LangString sec_autostart ${LANG_FRENCH} "Démarrage automatique" + LangString DESC_sec_main ${LANG_FRENCH} "Installe les fichiers du programme." + LangString DESC_sec_data ${LANG_FRENCH} "Installe RetroShare Skins" + LangString DESC_sec_startmenu ${LANG_FRENCH} "Crée les raccourcis du menu Démarrer" + LangString DESC_sec_shortcuts ${LANG_FRENCH} "Crée une icône sur le bureau." + LangString DESC_sec_link ${LANG_FRENCH} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_FRENCH} "1036" + + + LangString sec_main ${LANG_GERMAN} "Programmdateien" + LangString sec_data ${LANG_GERMAN} "Skins fuer das Programm" + LangString sec_shortcuts ${LANG_GERMAN} "Shortcuts" + LangString sec_link ${LANG_GERMAN} "Dateiverknuepfungen" + LangString sec_autostart ${LANG_GERMAN} "Auto Startup" + LangString DESC_sec_main ${LANG_GERMAN} "Installiert die erforderlichen Programmdateien." + LangString DESC_sec_data ${LANG_GERMAN} "Installiert RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_GERMAN} "Erstellt eine RetroShare Verkn�pfung im Startmen�, Desktop oder im Schnellstarter." + LangString DESC_sec_link ${LANG_GERMAN} "RetroShare mit .rsc Dateien verkn�pfen" + LangString LANGUAGEID ${LANG_GERMAN} "1031" + + LangString sec_main ${LANG_TURKISH} "Program Dosyalar�" + LangString sec_data ${LANG_TURKISH} "Program Skinleri" + LangString sec_shortcuts ${LANG_TURKISH} "Shortcut'lar" + LangString sec_link ${LANG_TURKISH} ".rsc Dosya Kaydet" + LangString sec_autostart ${LANG_TURKISH} "Otomatik calistir ve baglan" + LangString DESC_sec_main ${LANG_TURKISH} "Program dosyalar�n� kurar." + LangString DESC_sec_data ${LANG_TURKISH} "RetroShare Skin'leri kurar" + LangString DESC_sec_shortcuts ${TURKISH} "Shortcut yap Start menu , Desktop veya Quicklaunchbar icin." + LangString DESC_sec_link ${LANG_TURKISH} "RetroShare .rsc almas� i�in kaydettirir" + LangString LANGUAGEID ${LANG_TURKISH} "1055" + + LangString sec_main ${LANG_SIMPCHINESE} "程序文件" + LangString sec_data ${LANG_SIMPCHINESE} "程序皮肤" + LangString sec_shortcuts ${LANG_SIMPCHINESE} "快捷方式" + LangString sec_link ${LANG_SIMPCHINESE} "RetroShare文件关联" + LangString sec_autostart ${LANG_SIMPCHINESE} "自动启动" + LangString DESC_sec_main ${LANG_SIMPCHINESE} "安装RetroShare程序" + LangString DESC_sec_data ${LANG_SIMPCHINESE} "安装RetroShare皮肤" + LangString DESC_sec_shortcuts ${LANG_SIMPCHINESE} "建RetroShare快捷方式" + LangString DESC_sec_link ${LANG_SIMPCHINESE} "关联.rsc扩" + LangString LANGUAGEID ${LANG_SIMPCHINESE} "2052" + + LangString sec_main ${LANG_POLISH} "Pliki programu" + LangString sec_data ${LANG_POLISH} "Skórki" + LangString sec_shortcuts ${LANG_POLISH} "Skróty" + LangString sec_link ${LANG_POLISH} "Skojarz pliki" + LangString sec_autostart ${LANG_POLISH} "Automatyczne uruchamianie" + LangString DESC_sec_main ${LANG_POLISH} "Instaluje pliki programu RetroShare" + LangString DESC_sec_data ${LANG_POLISH} "Instaluje skórki programu RetroShare" + LangString DESC_sec_shortcuts ${LANG_POLISH} "Utwórz ikony skrótów na pulpicie, w menu start oraz na pasku szybkiego uruchamiania." + LangString DESC_sec_link ${LANG_POLISH} "Skojarz pliki o rozszerzeniu .rsc z RetroShare" + LangString LANGUAGEID ${LANG_POLISH} "1045" + + LangString sec_main ${LANG_DANISH} "Program Files" + LangString sec_data ${LANG_DANISH} "Program Skins" + LangString sec_shortcuts ${LANG_DANISH} "Shortcuts" + LangString sec_link ${LANG_DANISH} "File Association" + LangString sec_autostart ${LANG_DANISH} "Auto Startup" + LangString DESC_sec_main ${LANG_DANISH} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_DANISH} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_DANISH} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_DANISH} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_DANISH} "1030" + + LangString sec_main ${LANG_RUSSIAN} "Program Files" + LangString sec_data ${LANG_RUSSIAN} "Program Skins" + LangString sec_shortcuts ${LANG_RUSSIAN} "Shortcuts" + LangString sec_link ${LANG_RUSSIAN} "File Association" + LangString sec_autostart ${LANG_RUSSIAN} "Auto Startup" + LangString DESC_sec_main ${LANG_RUSSIAN} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_RUSSIAN} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_RUSSIAN} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_RUSSIAN} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_RUSSIAN} "1049" + + LangString sec_main ${LANG_SWEDISH} "Program Files" + LangString sec_data ${LANG_SWEDISH} "Program Skins" + LangString sec_shortcuts ${LANG_SWEDISH} "Shortcuts" + LangString sec_link ${LANG_SWEDISH} "File Association" + LangString sec_autostart ${LANG_SWEDISH} "Auto Startup" + LangString DESC_sec_main ${LANG_SWEDISH} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_SWEDISH} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_SWEDISH} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_SWEDISH} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_SWEDISH} "1053" + + LangString sec_main ${LANG_JAPANESE} "Program Files" + LangString sec_data ${LANG_JAPANESE} "Program Skins" + LangString sec_shortcuts ${LANG_JAPANESE} "Shortcuts" + LangString sec_link ${LANG_JAPANESE} "File Association" + LangString sec_autostart ${LANG_JAPANESE} "Auto Startup" + LangString DESC_sec_main ${LANG_JAPANESE} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_JAPANESE} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_JAPANESE} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_JAPANESE} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_JAPANESE} "1041" + + LangString sec_main ${LANG_KOREAN} "Program Files" + LangString sec_data ${LANG_KOREAN} "Program Skins" + LangString sec_shortcuts ${LANG_KOREAN} "Shortcuts" + LangString sec_link ${LANG_KOREAN} "File Association" + LangString sec_autostart ${LANG_KOREAN} "Auto Startup" + LangString DESC_sec_main ${LANG_KOREAN} "Installs the RetroShare program files." + LangString DESC_sec_data ${LANG_KOREAN} "Installs RetroShare Skins" + LangString DESC_sec_shortcuts ${LANG_KOREAN} "Create RetroShare shortcut icons." + LangString DESC_sec_link ${LANG_KOREAN} "Associate RetroShare with .rsc file extension" + LangString LANGUAGEID ${LANG_KOREAN} "1042" + + +!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS + +Section $(sec_main) sec_main + + ;Set Section required + SectionIn RO + + ; Set Section properties + SetOverwrite on + + ; Clears previous error logs + Delete "$INSTDIR\*.log" + + ; Set Section Files and Shortcuts + SetOutPath "$INSTDIR\" + File /r "release\RetroShare.exe" + File /r "..\..\retroshare-nogui\src\release\retroshare-nogui.exe" + File /r "D:\Qt\2010.01\mingw\bin\mingwm10.dll" + File /r "D:\Qt\2010.01\qt\bin\QtCore4.dll" + File /r "D:\Qt\2010.01\qt\bin\QtGui4.dll" + File /r "D:\Qt\2010.01\qt\bin\QtNetwork4.dll" + File /r "D:\Qt\2010.01\qt\bin\QtXml4.dll" + File /r "D:\Qt\2010.01\qt\bin\QtScript4.dll" + File /r "D:\Qt\2010.01\qt\bin\libgcc_s_dw2-1.dll" + File /r "D:\Qt\2010.01\qt\plugins\imageformats" + File /r "D:\Development\miniupnpc-1.3\miniupnpc.dll" + File /r ${QTBASE}\qt\qt_*.qm + File /r "release\pthreadGC2d.dll" + File /r "release\libgpg-error-0.dll" + File /r "release\libgpgme-11.dll" + File /r "release\gpg.exe" + File /r "release\gpgme-w32spawn.exe" + File /r "changelog.txt" + File /r /x Data "release\bdboot.txt" + + +SectionEnd + +Section $(sec_data) sec_data + + ; Set Section properties + SetOverwrite on + + ; Set Section Files and Shortcuts + ;SetOutPath "$APPDATA\RetroShare\" + ;File /r "data\*" + + ; Set Section Plugins + ;SetOutPath "$APPDATA\RetroShare\plugins\" + ;File /r "plugins\" + + ; Set Section qss and exclude svn + SetOutPath "$INSTDIR\qss\" + File /r /x .svn qss\*.* + + ; Set Section sounds and exclude svn + SetOutPath "$INSTDIR\sounds\" + File /r /x .svn sounds\*.* + + ; Set Section skin + ; SetOutPath "$INSTDIR\skin\" + ; File /r release\skin\*.* + + ; Add emoticons + ;SetOutPath "$INSTDIR\emoticons\" + ;File /r emoticons\*.* + + ; Add Chat Style + ;SetOutPath "$INSTDIR\style\" + ;File /r style\*.* + +SectionEnd + +Section $(sec_link) sec_link + ; Delete any existing keys + + + ; Write the file association + WriteRegStr HKCR .rsc "" retroshare + WriteRegStr HKCR retroshare "" "RSC File" + WriteRegBin HKCR retroshare EditFlags 00000100 + WriteRegStr HKCR "retroshare\shell" "" open + WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\RetroShare.exe" "%1"` + +SectionEnd + +SectionGroup $(sec_shortcuts) sec_shortcuts +Section StartMenu SEC0001 + + SetOutPath "$INSTDIR" + CreateDirectory "$SMPROGRAMS\${APPNAME}" + CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0 + CreateShortCut "$SMPROGRAMS\${APPNAME}\$(^UninstallLink).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + +SectionEnd + +Section Desktop SEC0002 + + + CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0 + +SectionEnd + +Section Quicklaunchbar SEC0003 + + + CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0 + +SectionEnd +SectionGroupEnd + +;Section $(sec_autostart) sec_autostart + +; WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroRun" "$INSTDIR\${APPNAME}.exe -a" + +;SectionEnd + +;Section $(sec_autostart) sec_autostart + +; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0 +;SectionEnd + + +Section -FinishSection + + WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR" + WriteRegStr HKLM "Software\${APPNAME}" "Version" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe" + WriteUninstaller "$INSTDIR\uninstall.exe" + +SectionEnd + + + +;-------------------------------- +;Descriptions + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${sec_main} $(DESC_sec_main) + !insertmacro MUI_DESCRIPTION_TEXT ${sec_data} $(DESC_sec_data) + !insertmacro MUI_DESCRIPTION_TEXT ${sec_shortcuts} $(DESC_sec_shortcuts) + !insertmacro MUI_DESCRIPTION_TEXT ${sec_link} $(DESC_sec_link) + ;!insertmacro MUI_DESCRIPTION_TEXT ${sec_autostart} $(DESC_sec_autostart) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;Uninstall section +Section "Uninstall" + + ; Remove file association registry keys + DeleteRegKey HKCR .rsc + DeleteRegKey HKCR retroshare + + ; Remove program/uninstall regsitry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" + DeleteRegKey HKLM SOFTWARE\${APPNAME} + + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroRun" + + ; Remove files and uninstaller + Delete $INSTDIR\RetroShare.exe + Delete $INSTDIR\retroshare-nogui.exe + Delete $INSTDIR\gpg.exe + Delete $INSTDIR\gpgme-w32spawn.exe + Delete $INSTDIR\*.dll + Delete $INSTDIR\*.dat + Delete $INSTDIR\*.txt + Delete $INSTDIR\*.ini + Delete $INSTDIR\*.log + + Delete $INSTDIR\uninstall.exe + + ; Don't remove the directory, otherwise + ; we lose the XPGP keys. + ; Should make this an option though... + + ; Remove shortcuts, if any + Delete "$SMPROGRAMS\${APPNAME}\*.*" + + ; Remove desktop shortcut + Delete "$DESKTOP\${APPNAME}.lnk" + + ; Remove Quicklaunch shortcut + Delete "$QUICKLAUNCH\${APPNAME}.lnk" + + ; Remove Autostart + ;Delete "$SMSTARTUP\${APPNAME}.lnk" + + ; Remove directories used + RMDir "$SMPROGRAMS\${APPNAME}" + RMDir /r "$INSTDIR\qss" + RMDir /r "$INSTDIR\translations" + RMDir /r "$INSTDIR\imageformats" + RMDir /r "$INSTDIR\sounds" + +SectionEnd + +Function .onInit + + InitPluginsDir + Push $R1 + File /oname=$PLUGINSDIR\spltmp.bmp "gui\images\splash.bmp" + advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp + Pop $R1 + Pop $R1 + !insertmacro MUI_LANGDLL_DISPLAY + + + +FunctionEnd + + +# Installer Language Strings +# TODO Update the Language Strings with the appropriate translations. + +LangString FINISHPAGELINK ${LANG_ENGLISH} "Visit the RetroShare forums for the latest news and support" +LangString FINISHPAGELINK ${LANG_GERMAN} "Besuche RetroShare Support Forum " +LangString FINISHPAGELINK ${LANG_TURKISH} "Destek için Retroshare foruma ziyaret" +LangString FINISHPAGELINK ${LANG_FRENCH} "Consultez le forum RetroShare pour vous tenir au courant des dernieres modifications, et obtenir de l'aide." +LangString FINISHPAGELINK ${LANG_SIMPCHINESE} "帮助论坛" +LangString FINISHPAGELINK ${LANG_POLISH} "Odwiedź forum RetroShare do najświeższych informacji i wsparcia" +LangString FINISHPAGELINK ${LANG_DANISH} "Besøg RetroShare fora for de seneste nyheder og støtte" +LangString FINISHPAGELINK ${LANG_JAPANESE} "Visit the RetroShare forums for the latest news and support" +LangString FINISHPAGELINK ${LANG_KOREAN} "Visit the RetroShare forums for the latest news and support" +LangString FINISHPAGELINK ${LANG_RUSSIAN} "Visit the RetroShare forums for the latest news and support" +LangString FINISHPAGELINK ${LANG_SWEDISH} "Besök RetroShare forum för de senaste nyheterna och stöd" + +LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall" +LangString ^UninstallLink ${LANG_GERMAN} "Deinstallieren" +LangString ^UninstallLink ${LANG_TURKISH} "Kald�r" +LangString ^UninstallLink ${LANG_FRENCH} "Désinstaller" +LangString ^UninstallLink ${LANG_SIMPCHINESE} "卸载" +LangString ^UninstallLink ${LANG_POLISH} "Odinstaluj" +LangString ^UninstallLink ${LANG_DANISH} "Afinstaller" +LangString ^UninstallLink ${LANG_JAPANESE} "Uninstall" +LangString ^UninstallLink ${LANG_KOREAN} "Uninstall" +LangString ^UninstallLink ${LANG_RUSSIAN} "Uninstall" +LangString ^UninstallLink ${LANG_SWEDISH} "Avinstallera" + + +; eof