Here's what happens. At some moment during dictionary conversion,
in DslScanner::readNextLine(), whe call iconv(), when both buffers
are of size 4 (the conversion is from UTF-8 to UTF-16).
Now, the dictionary contains two em-dash symbols at that position,
one after another, each is encoded in 3 bytes in UTF-8. So, the
input buffer of size 4 contains entire first em-dash (3 bytes)
and the first byte from the second em-dash.
Calling iconv() on Linux leads to Iconv::NeedMoreOut (E2BIG),
which makes sense, since we converted the first char and there is
no more space in the output buffer.
Calling iconv() on Windows leads to Iconv::NeedMoreIn (EINVAL),
which *also* makes sense, since we converted the first char, started
to look at the second one and noticed that it is incomplete.
The difference is only what iconv() checks first, the state
of the input or the state of the output. And it seems that it
does different things on Windows and Linux.
The patch takes this into account and resolves the conversion
problem on Windows: the only error condition that requires
to throw an encoding error is when outBytesLeft is non-empty,
that means that iconv didn't convert anything.
Some non-essential components should never get keyboard focus.
So, now the focus order is as follows:
TranslateLine -> TabWidget -> ArticleView -> DictsList, nothing else.
* Small pop-up window at the bottom of the main winodw instead
of traditional status bar, that consumes lots of space.
* API, similar to standard Qt's status bar.
* The status bar hides itself after specified amount of time.
* Clicking on the status bar also hides it.
* Properly behavies on resizes/moves/focus/etc.
* Tested on Linux and Windows.
Before this change, the shortcut in such situation was just
doing nothing, the main window remained active.
Tray icons are not that useful in Win7, since it is much better
to just pin the application to the taksbar. Now GoldenDict works
properly in such situations.
This is a standard behavior for any history-enabled app
(like web browser). When there is no previous or next item
in the history, the appropriate button on the toolbar
is disabled.
* Replaced the search via dictionary name by search via dictionary id, cleanup
* Renamed "Dictionaries Pane" --> "Results Navigation Pane"
* Added to CREDITS
* TODO note about code duplication
It is a separate detacheable pane, which could also be enabled/disabled,
it tracks the current tab's contains, and lists those dictionaries that
contributed their content to the current translation.
Clicking on dictionary name jumps to the appropriate article from
this dictionary, which improves the navigation flow.
The Dictionaries Pane:
* Shows both dictionaries' names and icons.
* Does not consume resources when hidden.
* Properly styled.
* Properly handles app-wide shortcuts
(Esc, Ctrl-L, Alt-D, Enter, Alt-Up/Down).
Conversions to unicode (when needed)
Removal of extra chars
Addition of RTL
Committer: Nitzan Arazi <nitnit>
On branch master
Changes to be committed:
Conversions to unicode when needed (for hebrew only)
Removal of extra chars (for hebrew only)
Addition of RTL (for hebrew only)
(use "git reset HEAD <file>..." to unstage)
modified: bgl.cc