Commit graph

143 commits

Author SHA1 Message Date
xiaoyifang a234bb0e43
remove qt-style.css content totally (#407)
* remove all qt-style

* remove all related #translationLine #GroupCombox qt style
2023-03-22 09:01:22 +08:00
shenleban tongying 0731253489 cleanup: simplify DSL's expand mode
Related code was related to DSL's [*][/*] tag.

One of the feature removed is Ctrl+8 to toggle current articleview's AlwaysExpand mode, because DSL is the only format that has this feature and User can turn on AlwaysExpand Mode on Preferences. There is no need to assign a shortcut for it.
2023-03-21 15:34:55 +08:00
Ren Tatsumoto fb6d4f9ccd
Let the user disable main window stealing focus when searching. (#387)
* add a checkbox that allows the user to disable main window being raised when search is triggered

* run clang-format on the edited lines

* partially revert clang-format
2023-03-17 09:54:45 +08:00
Ren Tatsumoto 1a0af48a7a
Improve Anki support (#384)
* allow the user to configure word,text,sentence Anki fields

* if sentence field is not set, don't add it

* mark the target word bold, if possible

* Update how to connect with anki.md

* rename default field names
2023-03-16 19:55:47 +08:00
Xiao YiFang 346986a3cd fix: fix conflict when merge upstream changes 2023-02-26 09:26:58 +08:00
shenleban tongying b3aac01f41 refactor: elimate makeScanPopup()
* Old code keep destory the scanpopup, then recreate it whenever the dict list or group list changed.
* New code keep a single instance of scanpopup, and only update necessary info.
2023-02-22 20:09:26 -05:00
Abs62 e43c0d2521 ScanPopup: Some more of save/restore position of the pinned popup window 2023-02-14 22:40:08 +03:00
Abs62 74aa95220d ScanPopup: Save/restore position of the pinned popup window after closing/reopening it 2023-02-14 17:51:03 +03:00
Xiao YiFang 4a30302864 fix: move Contexts to header file 2023-01-02 22:00:42 +08:00
shenleban tongying 7fa87b6b42 fix: remove unused isScanningEnabled, the logic is handled in mainwindow::clipboardChanged() 2022-12-28 21:58:27 -05:00
shenleban tongying b933d52245 fix: remove unused clipboard change method in scanpopup 2022-12-28 21:37:09 -05:00
shenleban tongying bdc43650bb fix: add a mini delay for selection clipboard 2022-12-28 21:36:02 -05:00
shenleban tongying 07e92e8ac1 refactor: upgrade most of macro based Signal/Slot to new syntax 2022-12-25 21:08:17 -05:00
shenleban tongying 664a1e87e4 Remove ScanPopup Alt mode ("Keys may also be pressed afterwards").
The functionality of "select then press a key to get popup " has equivalent of using Ctrl+C+C on Hotkeys.
2022-11-20 04:12:58 -05:00
shenlebantongying 451fdb5c21 Fix win build with HAVE_X11 2022-11-20 01:51:23 -05:00
shenleban tongying 6e0a6cfa42 refactor & simplify ScanFlag:
All slots of ScanFlag are used just as functions calls.
2022-11-20 01:19:27 -05:00
shenleban tongying 79f8b05d40 Add showScanFlag condition to mainWindow's clipboardChange 2022-11-20 00:39:41 -05:00
shenleban tongying c2cc848cc7 remove forcePopup from showScanFlag signal
That flag isn't use in any of the slots
2022-11-20 00:14:36 -05:00
shenleban tongying 4dc040f11c Remove clipboardChanged connect in scanpopup.cc blindly 2022-11-20 00:02:12 -05:00
shenleban tongying 06a296c99f Put conditions on the ClipboardChange for X11 2022-11-19 13:48:26 -05:00
shenleban tongying b3b740854a Unify trackClipboardChanges and enableScanPopupAction
* There is no difference between those two on Windows and MacOS which only support clipboard (Ctrl+C) scanning

* Q_WS_X11 was defined on Qt4, and it causes the super weird trackClipboardChanges to occur on Windows
2022-11-19 10:30:31 -05:00
Xiao YiFang 3b05f3b4e9 fix scanpopup dialog popup condition check 2022-11-19 14:52:20 +08:00
Igor Kushnir 9330c89e4b Don't attempt to translate empty or whitespace-only text
Silently ignore empty or whitespace-only translation requests. It should
be clear to most users why GoldenDict ignores them.

The translated word ends up as the "word" URL query item value, which is
trimmed in ArticleNetworkAccessManager::getResource(). So the added
trimming in MainWindow::translateInputFinished() should be fine.

When a trimmed translated word was empty, InputPhrase::isValid()
returned false, ArticleNetworkAccessManager::getResource() returned a
null pointer and ArticleNetworkAccessManager::createRequest() fell back
to QNetworkAccessManager::createRequest(), which:
* failed silently in the Qt 4 version;
* displayed the
    Protocol "gdlookup" is unknown
    Failed to load URL gdlookup://localhost?word= &group=4.
    QtNetwork Error 301
error page in the Qt 5 version.

Fixes #1179.
2022-11-02 19:16:33 +03:00
Xiao YiFang 3561f80430 [mac specific] popup dialog stay on top 2022-10-19 20:28:41 +08:00
Xiao YiFang e8764d322c fix: access violation 2022-10-03 11:49:27 +08:00
Xiao YiFang 11b29d30a7 clean code:remove x11 scanpopup flag setting 2022-09-25 12:49:22 +08:00
Xiao YiFang cd5e5abe4d opt:scanpopup inspect element action optimization 2022-09-08 21:11:43 +08:00
Xiao YiFang 306c435ae0 fix: clipboard tracking in windows should not be functioned when not enabled. 2022-08-31 21:54:53 +08:00
Xiao YiFang 6a7e54c165 fix:add log to clipboard datachange signal
fix:add log to clipboard datachange signal
2022-08-14 23:16:51 +08:00
Xiao YiFang fa64d450ea opt: optimize the function in tracking clipboard in trayicon 2022-08-02 22:27:14 +08:00
Xiao YiFang 7a642c1917 feat: tracking clipboard 2022-06-25 20:56:26 +08:00
Xiao YiFang 7eb603a9c5 feat: expose clipboard tracking function 2022-06-24 21:20:16 +08:00
xiaoyifang 8b9544bc17 fix:currentIndexChanged slot does not match 2022-04-01 23:32:11 +08:00
ngn999 95be606a9e make ArticleView::hasSound() async 2022-03-27 22:22:42 +08:00
yifang fb2eac9b5e upgrade to 6.2,linux compile 2022-03-11 22:14:40 +08:00
xiaoyifang 23d833fbb8 6.2: currentIndexChanged signal is changed. 2022-03-11 22:00:53 +08:00
xiaoyifang 7b5511a7bd upgrade to qt6.2 2022-03-11 22:00:45 +08:00
xiaoyifang b7b347ec0e clean:remove win32 mouse over function.
this function only work on windows and text .

can be replace with ocr(with the help of Capture2Text etc.).
2022-02-25 07:55:32 +08:00
yifang 23c41789de fix: popup link clicked 2022-02-15 20:22:43 +08:00
xiaoyifang 84175279ab fix: link click in popup windows ,translation should be in popup dialog too 2022-02-14 23:48:05 +08:00
xiaoyifang 0c94406e2a fix merge conflict with feature/deprecated 2022-02-03 17:50:47 +08:00
xiaoyifang c96a83f5d2 imp. remove mouseover32 2022-02-03 16:55:10 +08:00
xiaoyifang aa12bbe167 Merge branch 'branch-qt-5.15' into dev 2022-01-24 22:27:04 +08:00
xiaoyifang 9cf5ee8443 high dpi:change icon reference in code from png to svg. 2022-01-24 22:23:38 +08:00
yifang a0014cf668
dictionary bar icon size does not display correctly 2022-01-23 19:41:50 +08:00
yifang 262e650779 fix: DPRINTF=>GD_DPRINTF ,DDPRINT does not exist now.
do not affect functionality.only existed in comments.
2022-01-15 15:29:20 +08:00
yifang 46b4151cc4 improve: replace all the deprecated method before 5.15 2022-01-08 22:08:23 +08:00
yifang 5860e81ff3 typingEvent fix,double characters when focus 2021-12-18 18:08:45 +08:00
yifang 98ca729446 remove qt_version_check macro 2021-12-13 22:45:57 +08:00
yifang.xiao 0365015ac6 clean code:
remove "#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )" check ,the check should always be true based on current situation.
2021-12-13 22:45:33 +08:00