Commit graph

135 commits

Author SHA1 Message Date
Igor Kushnir 15dfdee49f Allow customizing unpinned scan popup window flags on X11 with Qt5
My tests in many desktop environments and window managers indicate that
no single configuration works perfectly in all environments. There are
also behavior differences between Qt::Popup and Qt::Tool flags, which
are not exactly bugs, so I suppose users might subjectively prefer
different options.

Customizing the flags allows the user to prevent unpinned scan popup
window flickering with Qt5 on Linux. In a way adding these options fixes
issue #645, which is: the scan popup window blinks rapidly, barely
noticeably in some applications, such as Calibre ebook-viewer
and Chromium. In this case the scan popup window usually ends up hidden
when selection ends, unless it was finished with a jerk.

I have tested the new options in 9 desktop environments and window
managers: at least one configuration for each eliminates #645 and makes
the scan popup window work the same as with Qt4 in this regard:
the popup window remains visible, text in the popup's translation line
keeps up with the text selection in the external application,
and the selected text is being translated on the fly.

Moreover, for each tested DE/WM, at least one configuration makes
the scan popup window work perfectly as far as I am concerned.

This issue was partially worked around with a 200ms scan popup delay
timer in the recent commit 58e41fe3ce
for the duplicate issue #854. However the timer solution is incomplete
because it requires the user to select text quickly and without delays.
If global mouse selection does not change for 200ms while the left mouse
button is held down, the user will likely not see the scan popup when
(s)he finishes selection, and will have to try selecting again -
hopefully faster this time.

The 200ms delay is no longer critically important after this commit,
but it is still beneficial: the lookup query changes less often,
which in turn reduces article definition update frequency.
So the delay improves the UI (perhaps subjectively) and performance.
2018-04-15 19:46:35 +03:00
Abs62 5fa5cc123f Full-text search: Allow ignore diacritics while search 2018-04-10 17:49:52 +03:00
Igor Kushnir 9aa3c44d4e Add QMediaPlayer internal player back end (Qt5 only)
* add config and GUI support for internal player back end switching;
* make FFmpeg player disabling option consistent with other similar
  qmake options by using CONFIG;
* add a new qmake option that disables Qt Multimedia player. This is
  useful for GNU/Linux distributions where Qt WebKit and Qt Multimedia
  packages depend on different GStreamer versions and don't work
  correctly when combined in one application.

The existing FFmpeg+libao internal player back end has a relatively
low-level implementation, which is difficult to understand and improve.
There are at least 3 open internal player issues:
  1) many GNU/Linux users have to edit their libao configuration file to
     make Goldendict's internal player work (issue #412);
  2) libao's pulseaudio plugin does not support 32-bit audio, which
     means that many MediaWiki pronunciations don't work with the most
     popular GNU/Linux audio driver (issue #949);
  3) Ffmpeg::DecoderContext uses deprecated FFmpeg APIs, which causes
     compiler warnings and means that this internal player back end
     may not compile with a future FFmpeg library version (issue #978).

The Qt Multimedia back end implementation uses the highest-level
Qt audio API and is very simple.
This new back end works flawlessly on my GNU/Linux machine.
I'm not making it the default back end because I don't know how well
it will work on other platforms with different configurations.
2018-03-30 17:10:33 +03:00
Igor Kushnir d5998cabb7 Remove redundant option useExternalPlayer from Preferences
This change substantially reduces audio player configuration code
complexity. The single remaining bool option - useInternalPlayer -
is enough for the binary audio player implementation choice.

Removing the useExternalPlayer option doesn't change the application GUI
behavior except for minor differences in one or two corner cases, which
could be classified as bugs fixed by this commit. For example, before
this commit, if the configuration file contained the following lines
  <useExternalPlayer>0</useExternalPlayer>
  <useInternalPlayer>0</useInternalPlayer>
an external player would be actually used for audio playback, but
neither of the two audio radio buttons would be checked in
Preferences GUI, and audioPlaybackProgram line edit would be disabled.
Whereas, after this commit, an external player is still used for
audio playback, but useExternalPlayer radio button is checked
in Preferences GUI, and the audioPlaybackProgram line edit is enabled.
2018-03-30 17:03:45 +03:00
Abs62 0b6f36479d Add config file parameter to limit headwords number to expand multi-word headwords while indexing (issie #914) 2017-10-25 17:37:39 +03:00
謝致邦 (XIE Zhibang) 0c6111c211 Update config.cc for Google En-En (Oxford)
https://www.google.com/dictionary is discontinued
2017-10-10 18:23:52 +08:00
Abs62 cdf2c0d404 Add option to ignore words order while full-text search 2017-07-25 18:28:29 +03:00
Abs62 a75dcfb7c5 ScanPopup: Add button to stay over all other windows (issue #659) 2017-07-13 18:00:19 +03:00
sunwxg ad8008c37b Add scan popup flag
After select a word, show a flag window, click the flag to show
popup window.
2017-06-05 21:15:38 +08:00
Abs62 caf39bfdb5 Add option for turn on/off confirmation for favorites items deletion 2017-05-17 18:26:32 +03:00
Abs62 72523dcfb4 Add option to periodical save of Favorites 2017-05-13 13:18:25 +03:00
Abs62 1e34de2dbc Add "Favorites" feature 2017-05-12 17:41:08 +03:00
Abs62 fa9d1aecd9 Add option to enable/disable search via synonyms 2017-03-09 19:11:17 +03:00
Abs62 b7a707d7c0 Websites: Add alternative loading method 2016-06-17 19:31:16 +03:00
Abs62 436edad84d Merge branch 'Original' into Qt4x5 2016-04-22 17:59:01 +03:00
Abs62 8032dca050 Mac-specific: Change scheme for find OpenCC data directory 2016-04-22 17:57:41 +03:00
Abs62 5731349f06 Merge branch 'Original' into Qt4x5 2016-04-09 11:09:55 +03:00
Abs62 032f5c8337 Win-specific: Tune code for compilation with MS Visual Studio 2016-04-09 00:21:55 +03:00
Abs62 fcc2758eb3 Merge branch 'Original' into Qt4x5
Conflicts:
	goldendict.pro
2015-10-27 18:08:57 +03:00
Abs62 9b273dc234 Merge pull request #581 from leif/leif-https
config.cc: s/http/https/ for sites that support it
2015-10-27 18:03:26 +03:00
Zhe Wang b5ac249062 ChineseConversion: load OpenCC data files by relative path on Windows and OS X 2015-10-26 11:58:12 +08:00
Zhe Wang a1986254d2 ChineseConversion: conditional compilation and OpenCC exception handling 2015-10-26 09:38:22 +08:00
Zhe Wang ff7fa16e64 Distinguish between variants of traditional Chinese 2015-10-20 11:52:36 +08:00
Zhe Wang 12f67a79a4 Support conversion between simplified and traditional Chinese characters 2015-10-20 00:00:35 +08:00
Leif Ryge 9ed59d0421 config.cc: s/http/https/ for sites that support it 2015-03-24 17:01:40 +00:00
Abs62 9b44890a01 Merge branch 'Original' into Qt4x5 2015-02-26 18:06:49 +03:00
Abs62 3995717cdd Wiki's: Change default russian Wiki's url 2015-02-20 17:17:41 +03:00
Abs62 8cabcacf55 Merge branch 'Original' into Qt4x5
Conflicts:
	btreeidx.cc
	fulltextsearch.cc
	goldendict.pro
	main.cc
2014-07-11 18:17:43 +04:00
Abs62 d3a13bd154 Allow to choose help language 2014-06-25 18:01:11 +04:00
Abs62 3531a74c6e Add help buttons to dialogs 2014-06-24 17:55:06 +04:00
Abs62 d4c68d3c49 Add help system 2014-06-23 20:03:14 +04:00
Abs62 35433d9ea6 Merge branch 'Original' into Qt4x5 2014-05-27 17:59:50 +04:00
Abs62 7b4ab083fb Full-text search: Fix storing enabled/disabled state (issue #489) 2014-05-21 18:15:18 +04:00
Abs62 7bb9152104 Adjust code for Qt5 2014-05-12 18:11:12 +04:00
Abs62 b9666f7f9f Merge branch 'Original' into Qt4x5
Conflicts:
	bgl_babylon.cc
2014-05-12 18:10:26 +04:00
Abs62 4120213ee8 Rename "DPRINTF" and "FDPRINTF" debug macro 2014-05-11 01:02:31 +04:00
Abs62 273b1b5757 Merge branch 'Original' into Qt4x5
Conflicts:
	articleview.cc
	btreeidx.cc
2014-05-05 21:31:16 +04:00
Abs62 15d87e06b4 DICT servers: Add search strategy choose 2014-05-03 21:41:16 +04:00
Abs62 ceb04dbd6a DICT protocol support 2014-05-02 17:36:50 +04:00
Abs62 10532279b1 Merge branch 'Original' into Qt4x5
Conflicts:
	article_netmgr.cc
	mainwindow.cc
2014-04-23 18:16:06 +04:00
Abs62 fd1d035c01 Add full-text search tuning tab to preferences dialog 2014-04-17 18:31:51 +04:00
Abs62 9ad0d5f985 Implement full-text search 2014-04-16 20:18:28 +04:00
Abs62 4cf35cc7e3 Merge branch 'Original' into Qt4x5
Conflicts:
	hotkeywrapper.hh
	mainwindow.cc
	mainwindow.hh
2014-04-11 19:29:56 +04:00
Abs62 9623cbdd7a Add proxy authentication dialog 2014-04-03 18:21:02 +04:00
Abs62 fe9998f2bf Add system proxy choose in preferences 2014-04-02 17:54:50 +04:00
Abs62 4bbe1aaee5 Merge branch 'Original' into Qt4x5
Conflicts:
	scanpopup.cc
2014-03-14 17:34:33 +04:00
Abs62 4a4bfade1d Show all headwords for selected dictionary 2014-02-28 16:36:28 +04:00
Abs62 dbedf431fa Merge branch 'Original' into Qt4x5 2014-01-22 00:03:39 +04:00
Abs62 32a2cf55b9 Add config file option for track clipboard changes 2014-01-09 18:17:50 +04:00
Abs62 d133ae7369 Merge branch 'Temp' into Qt4x5
Conflicts:
	mainwindow.cc
2013-12-20 18:51:17 +04:00