Commit graph

468 commits

Author SHA1 Message Date
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
shenleban tongying 3a93f8b959 Revert "fix: white flash when WebEngine page is loading in dark reader mode"
This reverts commit f7d6328f40.
2023-03-20 13:42:39 +08:00
shenleban tongying f7d6328f40 fix: white flash when WebEngine page is loading in dark reader mode 2023-03-18 19:53:08 +08:00
shenleban tongying fac1247c10 refactor: properly modularize articleview's ui 2023-03-18 11:00:06 +08:00
shenleban tongying 4f2c8d55aa refactor: port away from extlineedit
* the main feature of extlineedit.cc was having icons on left and right side which is already provided by QLineEdit::addAction after Qt5.2
2023-03-06 09:46:32 +08:00
shenleban tongying 540dda26ed cleanup: Replace all usages of qrcx://localhost with qrc://
The replacement command:
git grep -l 'qrcx://localhost' | xargs sed -i 's/qrcx:\/\/localhost/qrc:\/\//g'

The qrcx:// URL scheme was introduced in 2009 or earlier - it is present
in the first commit in GoldenDict's git history. Back then GoldenDict
supported Qt versions earlier than 4.6, in which
QWebSecurityOrigin::addLocalScheme() was introduced. Adding the qrc URL
scheme as local obsoletes the qrcx URL scheme. GoldenDict does not
compile against Qt versions earlier than 4.6, so there is no reason to
use this custom URL scheme anymore.

Co-authored-by:  Igor Kushnir <igorkuo@gmail.com>
2023-03-05 15:20:05 -05:00
shenleban tongying b1802e254e fix: ensure #translateLine always have left border 2023-02-22 21:09:46 -05:00
shenleban tongying 497ecf3719 fix: use alternative clipboard change monitor on macOS
QClipboard cannot monitor data changes on mac unless an application is focused
2023-02-17 22:02:52 -05:00
shenlebantongying f8e2e3c021 feat: bring back custom qt style sheets for Windows 2023-02-12 11:01:36 -05:00
xiaoyifang 954d6ffe06 fix:lingualibre cancel the request 2023-01-03 14:03:40 +08:00
shenlebantongying 43859df431 lingua: add " " to links 2022-12-29 04:11:34 -05:00
shenlebantongying 0d149337ca lingua: add " " to <a href= > 2022-12-29 04:02:57 -05:00
shenleban tongying f277af1a2e lingua: handle network errors
* set timeout to 3s
* get rid of reply with errors
2022-12-28 01:06:01 -05:00
shenlebantongying 6fc3684b0a
Add Lingua Libre support (#268)
* lingua: add a dummy dict

* lingua: working but output plain json as article

* lingua: add html audio plays

* lingua: fix qmake build

* fix: qmake on mac INCLUDEPATH

* lingua: add config ui to dict sources edit dialog

* lingua: add config logics

* lingua: use the configured iso language code to do query

* lingua: style polish
2022-12-24 22:42:40 +08:00
Konstantin Isakov ab88fa4867 Drop the src/ directory. It's superfluous. 2010-05-15 16:42:18 +04:00
Konstantin Isakov 285e3d39b5 Remove the 'move to gitorious' notice now that we've moved. 2010-05-15 16:36:56 +04:00
Konstantin Isakov 4fa567e3bf Move to Gitorious. Mark this transition in the .pro file. 2010-05-15 16:27:47 +04:00
Konstantin Isakov 88ef3213e0 In BGL articles, only add displayed headword if the normal headword contains
at least one digit.

This is reduce headword pollution -- some dictionaries has meaningless
headwords, but to make those unique they typically add digits in them.
2010-05-15 16:22:43 +04:00
Konstantin Isakov ceab951fe9 Update year in copyright notices. 2010-05-08 22:59:59 +04:00
Konstantin Isakov 706b156938 Allow editing dictionary groups right from the dictionary bar (Right Click->
Edit this group).
2010-05-08 18:02:51 +04:00
Konstantin Isakov 42463992c3 Prevent program from quitting spontaneously when it works with scan popup
and the main window is closed.
2010-05-08 17:57:41 +04:00
Konstantin Isakov 69f0d0c4cf Handle requests to read zero bytes from dictzipped files correctly. Handle any
exceptions when reading articles in StarDict file format gracefully.
2010-05-02 01:51:57 +04:00
Konstantin Isakov 6728671c7d Populate list of matches in scan popup with results only from enabled
dictionaries.

Previously it was listing results from all dictionaries in the current group,
regardless of the dictionary bar.
2010-04-30 13:56:40 +04:00
Konstantin Isakov 964dd0d5bd Toggling main window gives focus to the translation line.
Additionally, any opened search is now closed once a new definition is
shown in the article view.
2010-04-27 11:49:37 +04:00
Konstantin Isakov b63a032218 Make sure empty headwords don't end reading BGL files early. 2010-04-22 22:24:21 +04:00
Konstantin Isakov 3e08acbeac Double-clicking the words in an article translates them right away. This
feature may be turned off in preferences, but it is on by default.
2010-04-09 00:37:59 +04:00
Konstantin Isakov 72a6ea1292 Probable fix for scanpopup problems in Ubuntu 9.10. 2010-04-03 14:31:50 +04:00
Konstantin Isakov dcfd87397d Add support for lang(xx) and gdlangfrom-xx language attributes to articles. 2010-04-03 13:43:39 +04:00
Konstantin Isakov 80e2b7b35e Chinese translation update by Zhangjinsong. Other translations lupdated. 2010-04-02 16:38:57 +04:00
Konstantin Isakov 1a13abcc41 Show individual words after compound expressions, not before them.
This feels a bit better, since compound expressions are more useful than
the basic word split.
2010-04-01 13:08:51 +04:00
Konstantin Isakov a0fda4383a Implement dictionary bar for scan popup.
This dictionary bar operates completely separately from the dictionary bar in
the main window, and has its own set of muted dictionaries. The bar is on the
right of the window by default, but can be moved once the window is pinned
down.

Windows users, please test, this may have some Windows-specific problems.
2010-03-31 00:16:27 +04:00
Konstantin Isakov 6ea73fdf85 Don't perform excessively large queries (words with more than 80 symbols) to
mediawiki sites, they can't succeed anyway.
2010-03-30 20:52:44 +04:00
Konstantin Isakov c6b9cc0434 When an unsuccessful attempt to look up a phrase or whole sentence is made, the query is splitted into individual words and presented to user as links. Then all the compound expressions (expressions consisting of two or more words) are attempted to be found, and the results are also presented to the user. 2010-03-30 17:41:14 +04:00
Konstantin Isakov 240bff7e63 Update case folding table to the latest one. Add diacritic folding to the Russian letter Yo. 2010-03-29 23:01:48 +04:00
Konstantin Isakov eaebf218eb Use "phonon/mediaobject.h"-style includes for Phonon, as the older ones don't work under Debian sid anymore.
If you know how to make this actually work everywhere, please send in a patch.
2010-03-29 17:13:29 +04:00
Konstantin Isakov 6f090bf64f Add a missing "wo" syllable to the Hiragana table. 2010-03-22 02:17:36 +03:00
Konstantin Isakov 06e62ae682 Only install main window global hotkey if it is actually enabled. 2010-03-19 17:17:45 +03:00
Konstantin Isakov 83115adf6e Chinese translation update by zhangjinsong. 2010-02-15 12:57:06 +03:00
Konstantin Isakov 70850a67de Lithuanian translation update. 2010-02-15 00:22:42 +03:00
Konstantin Isakov 001cbc8e35 Arabic translation by Usama <uakkad at gmail.com> added.
This version isn't considered final by the translator yet.
2010-02-14 00:01:50 +03:00
Konstantin Isakov 385a637ba7 Lithuanian translation by Mindaugas Baranauskas <embar at users.berlios.de> added. 2010-02-14 00:00:27 +03:00
Konstantin Isakov 373d8614a5 Patches by Alexey Morozov <morozov at altlinux.org>
0001-update-via-lupdate-.ts-files.patch -- changes produced by
                    invocation of lupdate

0002-updated-ru_RU-translation.patch -- updated translation, indeed

0004-Use-pkg-config-for-compiler-and-linker-flags.patch -- on unix-like

     system it makes sense to use pkg-config to determine proper compile
     and link flags for external libraries. Particularly in my distribution
     '-lhunspell-1.2' doesn't work, but '-lhunspell' does. I'm not sure about
     Win32 and MacOSX builds though.

Regarding 0003-Fix-phonon-headers-inclusion.patch.

Actually it's a bit questionable and distribution specific. Qt documentation
( http://qt.nokia.com/developer/changes/changes-4.6.1 ) suggests that
applications should use

 #include <phonon/ClassName>

and <Phonon/ClassName> isn't guaranteed to work. However major Linux
distributors, -- I've checked Fedora/RH, Mandriva; ALTLinux also goes this
way, -- provide KDE-specific builds of Phonon. Headers in these packages
should be included as <Phonon/ClassName>, so it happens to be more portable
than Nokia's suggested way.
2010-01-23 01:55:16 +03:00
Konstantin Isakov 199deb8985 Don't make backtrace under win32 -- it seems mingw32 doesn't support that. 2010-01-17 23:23:49 +03:00
Konstantin Isakov 9c3d8de794 Use a custom termination handler which displays a graphical message with
the exception, its description and stack backtrace.

This should aid tracking down those silent exits.
2010-01-17 16:04:55 +03:00
Konstantin Isakov 8aa25339ea Support some standard shortcuts to get to the translation line (Ctrl+L and
Alt+D).
2010-01-13 21:04:39 +03:00
Konstantin Isakov 9c624b1bc5 Make large files pass the File::exists() test. 2010-01-12 16:38:48 +03:00
Konstantin Isakov acb93b42da Another scanpopup rework. Simply moving the mouse away would hide it now, no
need to move it inside the window first anymore.
2010-01-03 02:26:09 +03:00
Konstantin Isakov c25e7f268e Use Phonon framework for audio playback.
This is now the default way to play back sound under Windows. The other one,
"Use external program", was also made available there. The old method of audio
playback under Windows (via PlaySound) was completely removed.
Since Phonon uses DirectShow as a backend under Windows, all file types
supported by it should now play back. Therefore, the previous limitation to
just .wav files is now lifted.
Since Phonon is only available starting from Qt 4.6.0 under Windows, no older
versions of Qt are supported anymore there.
2010-01-02 21:16:22 +03:00
Konstantin Isakov 0e187e1e76 When checking for another copy, check if the existing pid is actually not
ours.
2010-01-02 15:56:33 +03:00
Konstantin Isakov 71c4709bad For scan popup, use the Popup window type under X11, Tool window type under
Windows.

Different types fit better under different platforms.
2010-01-02 15:55:34 +03:00