Commit graph

40 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 d65a1f7869 Save popup window configuration without it destroying 2018-03-27 21:23:48 +03:00
Igor Kushnir e5045860ef Make adding new audio player implementations easy
* add a new interface class AudioPlayerInterface;
* inherit a new proxy class Ffmpeg::AudioPlayer from it;
* partially switch ArlticleView to using the interface;
* expose MainWindow's AudioPlayerInterface instance to all ArticleView
  instances;
* add a new AudioPlayerFactory class responsible for creating instances
  of concrete classes derived from AudioPlayerInterface depending on
  relevant Config::Preferences values;
* increase minimum supported Qt version from 4.5 to 4.6 in README
  in order to use QScopedPointer introduced in Qt 4.6.
2018-03-24 21:31:48 +02:00
Abs62 77c9a4c3e2 Fix "Add to Favorites" icon changing 2017-11-07 17:46:59 +03:00
Abs62 1824d9ab02 Change "Add to Favorites" icon if headword is already presented in Favorites 2017-10-23 17:21:43 +03:00
Boyuan Yang 2c80aa4c67 Fix typos found by codespell 2017-09-16 21:18:42 +08:00
Abs62 ecddc321b2 ScanPopup: Change font size for translate line and word list synchronously with main window 2017-07-14 16:02:21 +03:00
Abs62 a75dcfb7c5 ScanPopup: Add button to stay over all other windows (issue #659) 2017-07-13 18:00:19 +03:00
Abs62 58e41fe3ce Linux-specific: Small delay for show of popup window when selection changed (by Sun Wang) (issue #854) 2017-06-13 18:00:16 +03:00
Abs62 0999c86038 Linux-specific: Hide scan flag window when popup window is shown (by Ctrl+C+C) 2017-06-06 18:00:48 +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 a6e51afa64 Add "Add to Favorites" button to scan popup window 2017-05-15 18:08:06 +03:00
Abs62 e982b69216 Add command line parameters "--group-name" and "--popup-group-name" 2017-03-10 17:15:10 +03:00
Abs62 9ad0d5f985 Implement full-text search 2014-04-16 20:18:28 +04:00
Abs62 3bd82ef752 "Open dictionary folder" action in context menu (issue #344) 2013-06-09 17:31:57 +04:00
Abs62 13eb3fa503 Synchronize dicionary icons size in popup and main windows (issue #168) 2013-02-27 17:12:46 +04:00
Tvangeste 3b7326e3be Fixed #194: Scan Popup window doesn't get the keyboard focus on Linux.
Tested and verified on recent Unity, Gnome, KDE, LXDE systems.
2013-01-29 22:30:24 +01:00
Tvangeste ffa9f5778b Fixed #192: Dynamically adjust the suggestion list in the new UI. 2013-01-27 23:12:00 +01:00
Tvangeste 3258ad89f5 Fixed #191: New UI in the scan popup, replace 3 separate widgets with the translate box. 2013-01-25 16:42:44 +01:00
Abs62 4c8b12b9af "Back" and "Forward" buttons in scan popup window 2012-12-24 16:59:46 +04:00
Abs62 259efae81c Update history when clicking links on page (issue #120) 2012-11-12 17:52:54 +04:00
Abs62 4c5e79c2b2 Add "Dictionary info" item to dictionary bar context menu 2012-09-25 17:13:35 +04:00
Abs62 09b9e9aa46 Win-specific: Show translation in popup window istead of sending word to GD main window while scanning GD main window 2012-09-24 17:20:58 +04:00
Abs62 44247c04c9 Add word to history via context menu from ScapPopup window 2012-09-16 14:30:14 +04:00
Abs62 305c9ed1b8 Show/hide optional parts of articles (DSL dictionaries only) 2012-09-16 14:19:47 +04:00
Abs62 e00415e4d2 Close popup menus when ScanPopup window closes 2012-09-12 18:18:16 +04:00
Abs62 535fe0d3e0 Update year in copyright notices. 2012-02-21 01:47:14 +04:00
Abs62 bd90b5368b Add translation of the word from command line 2011-11-16 17:02:56 +04:00
Abs62 9a1ceff5d8 1. Add button to scan popup window to send translated word into main window
2. Add option to use main window instead of scan popup window
2011-11-16 16:52:25 +04:00
Konstantin Isakov f65c98c8e1 Merge pull request #26 from Abs62/master
Improvements in scan popup functionality. Now it can work with Internet Explorer 9.
2011-07-29 19:47:54 -07:00
Abs62 a11774483d Move some checks from ScanPopup into MouseOver 2011-07-28 17:04:06 +04:00
Abs62 68c80f48b2 Some simplification and cleanup 2011-07-27 16:47:29 +04:00
Tvangeste 4163bce8a2 Various status bar related fixes:
* Status Bar now available for Scan Popup window as well.
* Fixed #13: Eliminated modal box when sound is not available:
  Instead of modal dialog box we now show the status bar message,
  with error icon, thus making it visible but not disruptive.
* Proper handling of status bar images.
* Styling of the status bar in both modes
  (in Mani Window and in Popup Window).
2011-07-14 22:11:57 +02:00
Tvangeste 39d8772153 added statusbar to the scan popup window 2011-07-14 10:17:59 +02:00
Abs62 a8589b39bf Improvements in scan popup functionality.
1. Add search word under cursor through IAccessibleEx interface and UI Automation technology.
2. Reorganize GoldenDict main program and scan libraries interaction to reduce influence to other programs.
3. Fix crash in scan libraries in IE9 protected mode.
2011-07-09 23:26:30 +04:00
Abs62 97a6d49221 Check scan popup modifiers in window message handler to avoid unneeded string handling 2011-06-17 16:15:41 +04:00
Konstantin Isakov 92eceb8cad Change email from @users.berlios.de to @goldendict.org. 2010-12-09 15:31:50 +03:00
Konstantin Isakov 953d9237a3 Update copyright to span to 2011.
Better early than late, this year is ending anyway.
2010-11-14 18:47:03 +03:00
Konstantin Isakov 621d842394 Use polling instead of mouse grab for scan popup. This should fix problems with Windows 7 and such. 2010-07-03 20:24:30 +04:00
Konstantin Isakov ab88fa4867 Drop the src/ directory. It's superfluous. 2010-05-15 16:42:18 +04:00
Renamed from src/scanpopup.hh (Browse further)