Executable icon could be a security risk. Closes #823.
This commit eliminates one of the 2 non-critical "make install" errors
described in #1001. Fixing the other error requires removing executable
bit from goldendict.desktop, which may cause issues to some users.
Examples of code that could access the destroyed log file object:
* a destructor of a local object declared before logFile in main();
* a destructor of a global object;
* termHandler() invoked after logFile was destroyed either normally
or because of an uncaught exception.
The article view focus is necessary to navigate a word definition via
keyboard rather than mouse. The shortcut - Ctrl+N - is the same as
the one in the main window for the corresponding action.
* Run the freedesktop.org-specific code only on X11 (not on Mac).
* Use a (hopefully) unique destination .desktop file name to prevent
clashes with a goldendict.desktop file possibly created and customized
manually or by a system preferences tool.
* Allow different executable and .desktop file names because there is
no real dependency between them.
* Improve performance slightly with an early return.
Destroying and creating a scan popup instance twice in
MainWindow::editPreferences() is wasteful.
2b9dd55804 added the unconditional second
makeScanPopup() call below but didn't remove the existing call,
probably by mistake.
When scan popup is configured to appear without any key modifiers
pressed and is active on X11, it interferes with selecting text inside
the scan popup window (or inside the main window if "Send translated
word to main window" option is enabled). It also makes searching text
inside article definition impossible - in the main window and
even more so in the scan popup window.
However, when scan popup is configured to appear only when some keys are
pressed, or when the scan flag feature is enabled, it may work fine
inside Goldendict windows.
It is possible to automatically decide whether to show scan popup when
selection or clipboard inside Goldendict changes. But such logic might
be unsuitable for some use cases. For example, invoking scan popup by
selecting article definition text in the main window works fine.
Therefore this commit makes ignoring selection and clipboard changes
inside Goldendict itself optional. This commit implements one of two
feature requests in issue #606.
This new option could have effect on non-X11 platforms if the hidden
trackClipboardChanges option is enabled. But it is much less useful on
these platforms because scan popup without key modifiers is unusable
there (at least under Windows). Let us show and use the option only on
X11 to avoid cluttering Preferences UI on other platforms.
This option has effect even when scan popup functionality is disabled -
when the Ctrl+C+C hotkey is triggered. So the scanToMainWindow checkbox
should not be disabled when enableScanPopup is unchecked. Fixes #716.