Commit graph

2672 commits

Author SHA1 Message Date
Abs62 76127eb04f
Merge pull request #955 from vedgy/fix-mediawiki-tooltips
Show #link as a tooltip instead of empty "Definition: "
2019-02-07 18:48:11 +03:00
Abs62 2d648829fa Merge branch 'group-box-and-translate-line-fixes' of https://github.com/vedgy/goldendict into Temp 2019-02-03 19:44:32 +03:00
Igor Kushnir e6710a6372 Remove artificial 1000-pixel CompletionList width limit
When translate line is wider than 1000 pixels, its right end is not
aligned with its completion list. This looks ugly and complicates
scrolling through completions after clicking on Drop-down arrow.
2019-02-03 18:25:26 +02:00
Igor Kushnir 503de6474f Qt5: improve repeated zooming performance
For example, looking up "United States" in my local dictionaries, then
pressing Ctrl++ to increase zoom factor from 1 to 5 takes 4 seconds with
this change and 25 seconds without it. The same scaling takes 6 seconds
with this change and 45 seconds without when I enable English Wikipedia,
which has a particularly large "United States" article.

There is a workaround that speeds up zooming: look up a nonexistent
word, scale to the desired level, then go back to the large articles.
But this is tedious if large articles are open in scan popup or
in case of many tabs in the main window.
2019-02-02 15:31:16 +02:00
Abs62 7abaf07bbd Fix build under Linux/MacOS 2019-02-01 16:59:41 +03:00
Abs62 68fc27b7d7 Win-specific: Add global hotkeys handling via low-level keyboard hook 2019-01-31 17:59:24 +03:00
Igor Kushnir 7a9d97a74f Sync scan popup's size policies with main window
Let us use consistent horizontal size policies in scan popup's and main
window's GroupComboBox and TranslateBox. MinimumExpanding in scan
popup's TranslateBox allows it to stretch horizontally along with
horizontalSpacer when the width of popup window increases.
2019-01-29 17:01:14 +02:00
Igor Kushnir 4736191fa5 Allow reducing width of group comboboxes
Before this commit, the Alt+- shortcut reduced the heights of group
comboboxes in the main window and scan popup, but not their widths.
These comboboxes did not become narrower than at the time of their
construction.

Fixing the height of a group combobox to that of a line edit in
MainWindow's and ScanPopup's eventFilter() is still useful after this
commit - to avoid the ugliness of a few pixels-higher combobox.
2019-01-29 16:13:23 +02:00
Igor Kushnir ec96d6ac5a Allow shrinking scan popup's toolbar height
Before this commit, when group combobox was visible, the Alt+- shortcut
reduced the heights of group combobox and translate line in the main
window, but not in scan popup. These UI elements in scan popup did not
become lower than at the time scan popup was constructed.

Applying the solution from the main window fixes this bug (#1108).
2019-01-29 15:43:18 +02:00
Igor Kushnir c88774151c Remove unused form groupselectorwidget.ui
This form was added in the first git commit. However it was unused at
the time of that commit and has never been used since then.
2019-01-29 12:58:44 +02:00
Abs62 eb6a7c83a6
Merge pull request #1111 from vedgy/undef-common-words-x11
Undef common words defined in X11 headers
2019-01-28 18:30:41 +03:00
Abs62 15cbce1a7f
Merge pull request #1110 from vedgy/avoid-duplicate-currentGroupChanged-connection
Avoid duplicate currentGroupChanged() connection
2019-01-28 18:30:28 +03:00
Igor Kushnir ebfeb37f56 Undef common words defined in X11 headers
* #undef Bool with Qt4 as well as with Qt5.
* #undef min, #undef max from <X11/Xlibint.h>.
* #include <fixx11h.h> just after hotkeywrapper.hh. Unfortunately this
  header can not be included in hotkeywrapper.hh directly because
  some of the undef-ed words are actually used in hotkeywrapper.cc.
* #include <fixx11h.h> after <X11/Xlib.h> in mainwindow.cc just in case
  hotkeywrapper.hh stops including this Xlib.h header in the future.

These changes should make future compilation errors less likely.

For example, without "#undef min" in hotkeywrapper.hh, including
<iomanip> in mainwindow.cc after the mainwindow.hh include resulted in
the following GCC 8 compilation error:
 /usr/include/c++/8.2.1/bits/locale_facets_nonio.tcc:945:22:
  error: expected unqualified-id before ‘(’ token
      __minlen = std::min(__minlen,
                      ^~~
2019-01-28 15:58:14 +02:00
Igor Kushnir a9fc823c46 Avoid duplicate currentGroupChanged() connection
Before this change ScanPopup::applyWordsZoomLevel() was called before
the primary connection to ScanPopup::currentGroupChanged() in
ScanPopup's constructor. This meant that disconnect() had no effect and
connect() established the first connection during the first call to
ScanPopup::applyWordsZoomLevel(). This caused 2 issues:
  1. Since the connection happened before the filling of ui.groupList
in ScanPopup's constructor, the current group in scan popup was always
"All" on Goldendict start.
  2. Since the connection was not unique, the slot was connected twice
to the same signal, and it was actually called twice.

The bug was introduced in 92e8c85eec.
2019-01-28 14:54:32 +02:00
Abs62 92e8c85eec Fix behavior while words list font resizing (issue #1109) 2019-01-26 22:11:27 +03:00
Abs62 04d9dc43f6 Fix some crashes (issue #1076) 2019-01-17 17:53:13 +03:00
probonopd feeee36f78
AppImage 2019-01-03 22:44:00 +00:00
Abs62 6d46fd1529 Zim, Aard: Fix language recognition from three-letter codes 2018-12-07 16:18:49 +03:00
Abs62 1640fb2ff4 Win-specific: Fix compilation with MS VC (issue #1088) 2018-12-04 23:05:00 +03:00
Abs62 36a1881ae6 Update Italian translation by Daniele Di Pisa 2018-11-20 20:00:52 +03:00
Abs62 0d9a12a7e4 DictD: Fix dictionary name recognition for dictionaries from freedict.org (issue #1075) 2018-10-26 20:18:58 +03:00
Nikolay Korotkiy 382783e90e
DICT servers: Fix authentication 2018-10-21 22:58:44 +03:00
Abs62 0ecb217e9b DICT servers: Some fixes for OPTION MIME handling 2018-10-21 13:17:22 +03:00
Nikolay Korotkiy 7e4a42a95e
Request MIME type from DICT server 2018-10-20 22:49:41 +03:00
Abs62 2bd422ad73 Full-text search: QRegularExpression instead of QRegExp to highlight found words in Qt5-based builds 2018-09-25 17:58:51 +03:00
Abs62 5559b5fe48 Favorites: Fix blocking of illegal move operations for Qt4 (issue #1059) 2018-09-24 20:22:51 +03:00
Abs62 c55b32e32a
Merge pull request #1055 from vedgy/remove-executable-bit-from-icon
Remove executable bit from goldendict.png
2018-09-11 17:55:30 +03:00
Igor Kushnir 39dcea5952 Remove executable bit from goldendict.png
Executable icon could be a security risk. Closes #823.

This commit eliminates one of the 2 non-critical "make install" errors
described in #1001. Fixing the other error requires removing executable
bit from goldendict.desktop, which may cause issues to some users.
2018-08-27 11:14:09 +03:00
Abs62 61325acdb9 Full-text search: handle <q> tag as words break 2018-08-15 11:59:13 +03:00
Abs62 11b333c2e8 Full-text search: handle more block tags 2018-08-15 00:58:19 +03:00
Abs62 ce0b2768ee Full-text search: <hN> tag as line break 2018-08-14 21:45:25 +03:00
Abs62 9f06afab36 Mdx: Fix some links handling for Qt5-based build after RC2-316-3bc8e0 2018-07-19 18:18:50 +03:00
Abs62 06c6c63ddc Handle %GDWORD% template while calling external editor 2018-07-18 19:14:24 +03:00
Abs62 5b696eac5b
Merge pull request #1037 from hosiet/pr-fix-typos-201807
Fix typos found by codespell
2018-07-07 12:40:15 +03:00
Abs62 a0bb3c5889
Merge pull request #1036 from hosiet/pr-update-zh-cn-tranlsation-201807
Update Simplified Chinese translation
2018-07-07 12:39:57 +03:00
Boyuan Yang 5d5432dbad
Fix typos found by codespell 2018-07-07 17:33:15 +08:00
Boyuan Yang 4631852566 Update Simplified Chinese translation 2018-07-07 17:04:34 +08:00
Abs62 f945e74f75
Merge pull request #1034 from kyleskimo/patch-4
Update zh_TW.ts
2018-07-05 07:41:10 +03:00
kyleskimo c18a025b38
Update zh_TW.ts
Update zh_TW.ts
2018-07-05 11:33:59 +08:00
Abs62 3bc8e002d1 Mdx: Fix some extra anchors for Qt5-based build 2018-07-04 18:10:22 +03:00
Abs62 48e850c7ec Fix typo 2018-06-13 22:01:13 +03:00
Abs62 35bef02f12 Update help system 2018-06-13 19:07:51 +03:00
Abs62 e540022246 Lupdate all translations, update Russian translation 2018-06-13 19:01:38 +03:00
Abs62 d7bc012411 Add option to ignore diacritics while articles search 2018-06-13 19:00:42 +03:00
Abs62 15062f7928 Hunspell: Fix handling of some dictionaries format (issue #1021) 2018-05-31 19:52:11 +03:00
Abs62 ccb5eb10c2 DICT servers: Fix handling of multi-line phonetics (issue #1016) 2018-05-23 21:01:20 +03:00
Abs62 d9c8e12948
Merge pull request #1019 from vedgy/dont-access-destroyed-log-file-object
Don't access a destroyed log file object via logFilePtr
2018-05-23 18:10:40 +03:00
Igor Kushnir fe1c77f15d Don't access a destroyed log file object via logFilePtr
Examples of code that could access the destroyed log file object:
  * a destructor of a local object declared before logFile in main();
  * a destructor of a global object;
  * termHandler() invoked after logFile was destroyed either normally
    or because of an uncaught exception.
2018-05-23 13:12:15 +03:00
Abs62 b002fece6d Fix some more warnings (issue #978 again) 2018-05-22 17:48:14 +03:00
Abs62 1a6a941918 Little refactoring for log messages to file 2018-05-22 17:37:21 +03:00