Commit graph

5467 commits

Author SHA1 Message Date
Igor Kushnir 6dc74a7c7b Assign correct values to XButtonEvent::[xy]_root
The signature is: QPoint QWidget::mapToGlobal(const QPoint &) const;
2022-11-03 19:25:32 +03:00
Igor Kushnir 307fe2ba16 Download and open an image double-clicked in scan popup
Now double-clicking an image has the same effect in the main window and
in the scan popup. This consistency in no way prevents or hinders using
the popup window as designed (for fast lookup in a small group of
dictionaries), because a user is unlikely to double-click an image
accidentally.

Without this commit, when "Double-click translates the word clicked"
option is on, double-clicking an image in the scan popup translates
currently selected text if the selection is not empty.

Fixes #1279.
2022-11-02 22:22:59 +03:00
Igor Kushnir cf84f57632 Don't append duplicates to openedInspectors
There is no benefit in storing the same pointer multiple times in
openedInspectors. This occurred when an article inspector window was
closed then shown again. When the tab corresponding to the duplicated
article inspector pointer was closed, ArticleInspector::beforeClosed()
erased only one pointer from openedInspectors. This left dangling
duplicate pointer(s) in the list and eventually caused a crash when
another inspector's showEvent() accessed a dangling pointer at
openedInspectors.front().
2022-11-02 22:22:16 +03: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
Igor Kushnir c7c8b6f632 git clone URL in README: git:// => https:// scheme
An attempt to clone the git:// URL fails on my Manjaro GNU/Linux system
and produces the following output:
    $ git clone git://github.com/goldendict/goldendict.git
    Cloning into 'goldendict'...
    fatal: unable to connect to github.com:
    github.com[0: 140.82.121.4]: errno=Connection timed out

    128✗

The GitHub UI offers the replacement https:// URL when the green Code
button in the GoldenDict repository is clicked.

Fixes #1561.
2022-11-02 18:05:24 +03:00
Xiao YiFang 59ec8c4a48 [clean code]: remove macos lionsupport check
this macos version is too old .
2022-11-02 20:42:39 +08:00
Xiao YiFang 10972abcf4 [clean] remove code in dictionarybar eventfilter 2022-11-01 20:21:30 +08:00
xiaoyifang e66380763f Revert "fix possible crash in archlinux"
This reverts commit 9719091776.

Revert "fix crash on archlinux"

This reverts commit 0dc2b4d416.
2022-11-01 17:40:20 +08:00
xiaoyifang 35141a5334
Merge pull request #182 from xiaoyifang/opt/clang-format-new
clang format style changes
2022-10-30 17:56:26 +08:00
Xiao YiFang b7088ce86d Merge branch 'staged' into dev 2022-10-30 17:55:11 +08:00
Xiao YiFang 988951aa6c [reg]: unicode-bidi cause the welcome title aligned left 2022-10-29 13:23:17 +08:00
Xiao YiFang afdaf19ef9 [action] disable macos6.4.0 homebrew action 2022-10-28 19:46:26 +08:00
xiaoyifang a24a0a713f change msvc lib readme 2022-10-28 14:34:09 +08:00
xiaoyifang f503fe586b add new clang format style 2022-10-28 10:51:18 +08:00
xiaoyifang 83ae19e7eb
Merge pull request #181 from xiaoyifang/feature/ubuntu6.2
linux appimage build with qt6.x
2022-10-28 07:39:07 +08:00
Xiao YiFang 4de7b2fb52 Merge branch 'staged' into dev 2022-10-27 21:30:58 +08:00
Xiao YiFang b23e57d08c fix:rtl display in Arabic/Persian language
fix goldendict#1565
2022-10-27 21:30:06 +08:00
Xiao YiFang 286c3682ec linux appimage build with qt6.x 2022-10-27 17:12:14 +08:00
Xiao YiFang 408f994779 revert gico format from webp to png 2022-10-26 21:00:04 +08:00
xiaoyifang 9719091776 fix possible crash in archlinux 2022-10-26 16:17:28 +08:00
Xiao YiFang 6d8779442c change qt version to qt6.3.2
qt6.4.0 is buggy
2022-10-25 19:46:07 +08:00
Xiao YiFang 6742321aa1 add xapian to the about dialog 2022-10-24 20:14:53 +08:00
Xiao YiFang 241e58dbe6 Merge branch 'staged' into dev 2022-10-23 09:05:52 +08:00
Xiao YiFang 0dc2b4d416 fix crash on archlinux
I guess the issue #173 may be  rooted in here
2022-10-22 19:27:43 +08:00
Xiao YiFang 7adfc523a2 clear dictionary outside of the loop 2022-10-22 19:12:55 +08:00
Xiao YiFang c743a31dca fix: windeployqt bug 2022-10-22 14:53:14 +08:00
Xiao YiFang f8f42092d3 fix:remove comment 2022-10-22 13:43:53 +08:00
Xiao YiFang fcaa00c5c2 opt: debug log 2022-10-22 13:42:17 +08:00
Xiao YiFang 3561f80430 [mac specific] popup dialog stay on top 2022-10-19 20:28:41 +08:00
Xiao YiFang 5d7cc2fd5f Merge branch 'staged' into dev 2022-10-16 21:00:03 +08:00
Xiao YiFang 02445aafa1 Revert "[mac specific]:update ffmpeg package"
This reverts commit d97e062772.
2022-10-16 17:32:39 +08:00
Xiao YiFang e8412eb820 opt: new release check logic changed to this very repository. 2022-10-15 17:28:55 +08:00
Xiao YiFang 4eedefc585 opt: function refract 2022-10-15 13:58:24 +08:00
xiaoyifang 2619e7be97
Merge pull request #167 from xiaoyifang/fix/f12-crash-2
inspect element crash on the first time
2022-10-14 14:15:38 +08:00
Xiao YiFang ead9e6132f inspect element crash on the first time 2022-10-14 10:52:09 +08:00
xiaoyifang e4a083cccc
Update windows-publish.ps1 2022-10-14 10:47:30 +08:00
Xiao YiFang 1077ccb82b [github] bump qt version to 6.4.0 2022-10-13 20:17:24 +08:00
xiaoyifang 145a1d39a8
Update README.md 2022-10-13 09:39:06 +08:00
xiaoyifang 1da84b315d
Update README.md 2022-10-13 09:26:20 +08:00
Xiao YiFang bd5a765a37 [Win Specific] update dependency build instructions on Windows 2022-10-12 21:08:24 +08:00
Xiao YiFang 78d2172340 Merge remote-tracking branch 'origin/staged' into dev 2022-10-12 21:01:12 +08:00
xiaoyifang 9f7570b560
Merge pull request #166 from xiaoyifang/tmp/ffmpeg
[mac] add macos speex support
2022-10-12 20:56:20 +08:00
Xiao YiFang d97e062772 [mac specific]:update ffmpeg package
add speex support
2022-10-12 20:43:06 +08:00
Xiao YiFang 9b240d1c59 [win specific]: remove unused dll 2022-10-12 20:37:32 +08:00
Xiao YiFang f0cc4424cb add ffmpeg action to build an universal package 2022-10-12 17:45:35 +08:00
Xiao YiFang 2d8ba54a1d fix: crash on quit while fullindex is creating 2022-10-11 22:09:15 +08:00
Xiao YiFang bf625dc550 show dict id in dictionary info panel 2022-10-11 21:34:24 +08:00
Xiao YiFang 85b6b34aed opt: replace font-face's url in html 2022-10-11 20:57:04 +08:00
Xiao YiFang c6fdff1352 [github] modify xapian release file name 2022-10-11 19:44:30 +08:00
Xiao YiFang 045f0e8c60 Merge branch 'staged' of github.com:xiaoyifang/goldendict into staged 2022-10-11 19:40:36 +08:00