Changes in dclib 0.3.20 and valknut 0.3.20 / 0.4.6
Segment size adjustable
But only manually, so in a LAN stick with single mode downloading (or set it very large).
Download folders from search
With some caveats
- You cannot select a different destination folder, your download folder is always used.
- A filelist will always be downloaded even if there is one already open. But while the filelist is in the queue, folders can be added/removed.
- All the contents of a folder is downloaded, including all subfolders and their contents.
- If download mode is "ask", after the filelist is downloaded you will be asked before any downloads start. If you don't check the box you have to answer for every file.
It works exactly like if you download the filelist and then download the folder from it, because that's what happens.
Filelists downloaded from a search window are opened at the file you clicked on.
Warnings about settings
Changing to these settings now produces a warning dialog (which can be ignored)
- Disabling the tag <DCGUI 0.3.20 ...>.
- Disabling the long H:3/2/1 hub count in the tag.
- Disabling file hashing.
- Enabling ZLine (compressed hub to you communication) - because it keeps ending up broken.
- Setting remote encoding to "none". This cannot possibly work even though it produces
behaviour similar to what 0.3.10 and earlier did. "None" will be removed from the list in
the next version. The working way to disable encoding conversions is to set the remote
encoding to the same as the local encoding - to UTF-8.
Minor improvements
- Menu items for closing all offline chats, filelists or search windows added.
- A debug settings dialog was added (on help menu) which can change without restarting what the -v and --socketlog command line parameters change.
- %[line:reason] handling in user menu commands is improved - one dialog for all lines, can be cancelled, can be applied to all nicks.
Bug fixes
- Many things including dclib compilation, network interface listing/IP getting, and encoding detection in dclib were broken on OS X.
- Encoding may also have been broken in valknut.
- Updating public hubs (the button that does not clear the list first) was always adding more entries for hubs with numbers appended to their names e.g. a (2) was added again as (3), and then again as (4) next time...
- ZLine was yet again very broken.
- The file transfer info window would hit the 2GiB limit on 32-bit machines, and on Qt3, may have displayed garbage after the transfer finished.
- Starting with --trayicon resulted in messed up hub windows on Qt4 (where you can't resize things relative to current size in things that haven't been made visible yet).
- Multi download mode can be used when starting with incomplete files on disk (when you get the resume/overwrite/cancel dialog).
- Qt4 may have crashed when closing a hub.
- Various Qt4 svn revisions may have crashed when opening a hub.
- Broken multi line message handling - valknut was converting "\" followed by "r" into newlines. It was supposed to be converting newlines (both unix and windows) into html tags.
- The ` character in private messages would have appeared as %DCN096% or something to non-valknut clients, because that was being done to private messages, when it's only for certain protocol commands that you don't see (Lock/Key).
Minor performance optimisations
Particularly to the CString and CDir classes (as always). Also, many functions were
made static. A few unused parameters / members / functions were removed.
The contents of index.lst is no longer kept in memory (twice) when not needed,
saving 500KB of memory or so. But valknut still uses at least 20MB with nothing
much open anyway.
Unbelievably the file copy routine (for moving finished files) was also improved,
using block size from target file not source, possibly resulting in fewer more
efficient writes.
Code cleanup
This does not affect the functionality of valknut, but did make the source code clearer, safer (far less casting), and sometimes more efficient.
The increased use of template classes makes the compiled binary slightly larger.
The cleanup found a couple of CThreadLists that were never locked/unlocked,
and the storage of search results ready to be sent was unnecessarily using CStringList when it only needed CList,
it was replaced with std::list saving some memory.
- CStringList was made into a template class, no more casting to/from CObject*.
- The callback classes became three pairs of classes, for callbacks taking 0, 1 or 2 parameters, any parameters are now templates so no more casting from CObject*.
- Any other lists or parameters of CObject* were replaced with something more specific, usually CDCMessage*.
- CObject (base class of everything, no functions) was then no longer necessary and was removed. The virtual destructor was then removed from various classes making them slightly more lightweight - particularly CString, the objects used to implement lists, and many objects put into lists.
- CThreadList / CThreadStringList were removed and replaced with separate list and mutex. Mainly for easier replacement with std::list/map.
- IP address related code was moved into a new class called CNetAddr. Also, the obsolete gethostbyname() was replaced by getaddrinfo(). This also allows multiple threads to lookup IP addresses simultaneously (but lookups are done in the CAsyncDns thread, and all hubs run in the CManager thread anyway).
- In valknut, some custom GUI code was replaced with .ui files. Also some use of CList was replaced with QList (QPtrList/QPtrQueue in Qt3).