Mike Gelfand [Sat, 18 Apr 2015 21:45:37 +0000 (21:45 +0000)]
Send dummy events each second to prevent excessive memory use (inspired by xnyhps)
I'm not that good in Mac programming it seems as I can't figure out why
doesn't the memory being allocated by frequent NSNewBitmapBackingStore
(system internal) calls being freed even if I wrap the code into
@autoreleasepool explicitly. Disabling animations does slow it down but
not stop. This commit is certainly a dirty fix but it seems to work in
my case and I hope it helps a few other people while we wait for a
proper solution.
Mike Gelfand [Sat, 11 Apr 2015 10:51:59 +0000 (10:51 +0000)]
#5908: Check for `tr_loadFile` return value instead of `errno` in `tr_variantFromFile`
Seems like there could be a defect in uClibc making errno not
thread-local. Don't rely on errno value but check function return value
instead which is a better failure indicator.
Return errors from `tr_loadFile` and `tr_variantFromFile` via tr_error.
Fix `tr_sessionLoadSettings` to not fail on Windows if settings.json
does not exist.
Mike Gelfand [Fri, 10 Apr 2015 22:15:41 +0000 (22:15 +0000)]
Tune directory paths on Windows
Use %USERPROFILE% instead of %USERPROFILE%\Documents as home directory.
Don't roam configuration directory (I don't think we want that).
Use known Downloads folder (instead of %HOME%\Downloads) if set.
When searching for web interface files, let local user application data
directory override roaming one, and roaming one override common one.
Use Vista+ API (SHGetKnownFolderPath) to get known folder paths.
Mike Gelfand [Sat, 4 Apr 2015 17:43:56 +0000 (17:43 +0000)]
#5910: Run daemon as a service on Windows
Factor out demonization implementation to platform-specific files.
Implement daemonization on Windows using service API. Improve *NIX
implementation by handling signals asynchronously to prevent potential
issues of running complex code inside the handler.
Mike Gelfand [Wed, 18 Mar 2015 07:34:26 +0000 (07:34 +0000)]
Define and use tr_socket_t and TR_BAD_SOCKET instead of int and -1.
Test socket validity by comparing to TR_BAD_SOCKET instead of various
(and sometimes wrong) other tests like `x >= 0`, `x != -1`, `x > 0`,
`x > -1`, `x` (valid), and `x < 0`, `x == -1` (invalid).
Mike Gelfand [Sun, 15 Mar 2015 16:57:30 +0000 (16:57 +0000)]
Add support for WolfSSL
It was announced on March 5th that CyaSSL changes name to WolfSSL,
and version 3.4.0 has been released under that new name. Tune
FindCyaSSL.cmake a bit to probe for both libraries. Fortunately,
compatibility headers are provided so I didn't have to touch the
code at all for now.
Mike Gelfand [Tue, 10 Mar 2015 22:31:09 +0000 (22:31 +0000)]
Define one of LFS macros instead of using xxx64 functions directly.
There're too many functions and types to consider, and benefits of not
using LFS macros aren't that big (I was thinking of using fts(3) but
that may not happen soon or at all).
Mike Gelfand [Thu, 29 Jan 2015 21:53:05 +0000 (21:53 +0000)]
Define QT_NO_CAST_FROM_ASCII (Qt client)
Use latin1 encoding most of the time where default encoding was used
before. Qt 4 assumes latin1 by default while Qt 5 uses utf-8 which is
not what we want.
Use utf-8 encoding in some places where default encoding was used before.
This includes strings coming from RPC.
Fix an issue with SortMode::names[] (filters.cc) where missing comma
between "sort-by-queue" and "sort-by-ratio" resulted in two array entries
being merged into solid "sort-by-queuesort-by-ratio" string and all the
following items being shifted compared to their enum counterparts.
Mike Gelfand [Sun, 18 Jan 2015 02:09:44 +0000 (02:09 +0000)]
Poke translations a bit (Qt client)
Add a bit more comments. Adjust some phrases for pluralization.
Mark menu shortcuts as not translatable (changing them doesn't do any
good but people start translating "Ctrl" as "Ktrl" etc. which breaks
the shortcuts).
Pull current translations from Transifex.
Mike Gelfand [Sat, 17 Jan 2015 16:59:42 +0000 (16:59 +0000)]
Improve overall look of torrents in main window
Refactor and use the same code to calculate element positions in
sizeHint () and paint () to prevent discrepancies.
While we are at it, properly support RTL layout.
Mike Gelfand [Sat, 17 Jan 2015 01:23:51 +0000 (01:23 +0000)]
Improve the look of torrents with errors a bit (Qt client)
Display emblem over mime icon if torrent has error(s) to indicate the
issue.
Use normal text color instead of red when drawing selected item: there
is no easy way to be sure that red color looks nice on selection
background, and most of the time it doesn't. Using red color for non-
selected items is questionable too, but let's leave it at that for now.
Mike Gelfand [Sun, 11 Jan 2015 15:01:13 +0000 (15:01 +0000)]
Improve filter bar look (Qt client)
Use normal but semi-transparent color instead of 'disabled' color for
counts drawing.
Do not leave empty space for icon when selected item doesn't have one.
Use null pixmaps/icons instead of non-null blank ones.
Implement our own sizeHint and minimumSizeHint to make sure both combos
have the same height.
Make activity combo width fixed, tracker combo width to fit its content
and line edit to occupy the rest.
Add 'Search...' placeholder to line edit.