Commit graph

3534 commits

Author SHA1 Message Date
Tvangeste 57a928510c Fix for #23: Failure to index a dictionary in UTF-8 format on Windows.
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.
2011-07-01 14:21:57 +02:00
Julian Depetris Chauvin 68b847f02b Use just one color for selecting and searching. This simplify things and avoid several issues (Check https://github.com/goldendict/goldendict/pull/10) 2011-06-30 14:56:02 -03:00
Tvangeste f620fdf63e One more fix for the statusbar behavior on X11 systems.
Now, the statusbar behaves good on all the following tested systems:

* Ubuntu+Gnome
* KDE-Plasma
* XFCE
* Fluxbox manager
2011-06-30 16:50:19 +02:00
Tvangeste a37c4ba67c Workarounds for X11 idiosyncrasies. 2011-06-30 15:13:23 +02:00
Julian Depetris Chauvin 5f97db0449 Add shortcuts for Previous/Next actions on Article search (Ctrl + F) 2011-06-30 09:45:05 -03:00
Julian Depetris Chauvin c55061c302 Add "Highlight all" to Article search (Ctrl + F) 2011-06-29 14:42:16 -03:00
Abs62 0726b90f30 Russian translation updated 2011-06-29 17:42:37 +04:00
Tvangeste 98ce9b3256 Cleanup of the focus order.
Some non-essential components should never get keyboard focus.

So, now the focus order is as follows:

TranslateLine -> TabWidget -> ArticleView -> DictsList, nothing else.
2011-06-28 17:55:41 +02:00
Tvangeste d23c79f632 add goldendict to .gitignore 2011-06-28 14:24:07 +02:00
Konstantin Isakov d9d5c85871 Merge pull request #20 from VVSiz/review/hide_statusbar
Crome-like status bar
2011-06-27 19:37:31 -07:00
Tvangeste d46e4dc77b Chrome-style statusbar for GoldenDict.
* 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.
2011-06-27 20:54:15 +02:00
Konstantin Isakov 5bdaf89459 Merge pull request #18 from VVSiz/review/hide_menubar
Ability to hide menubar
2011-06-26 18:16:16 -07:00
Tvangeste ca292db64a Menubar can be hidden with Ctrl+M shortuct now.
Plus, added a menu item to do that, and the status notification.
2011-06-26 13:56:34 +02:00
Tvangeste 9bc413b2c0 Window title now shows the current headword (the current tab name). 2011-06-25 09:53:45 +02:00
Tvangeste 009b66afa0 Merge pull request #17 from VVSiz/review/hide_single_tab
"Hide single tab" option
2011-06-25 00:36:45 -07:00
Tvangeste 3266a6ef4c Added "New Tab" menu, plus corrected copyright headers. 2011-06-25 09:34:28 +02:00
Tvangeste eaf3f744ce When the tray icon is disabled, the global hide/show shortcut should just minimize the main window.
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.
2011-06-24 21:44:17 +02:00
Tvangeste 0e9f5f28c2 Hide single tab option is implemented.
By default, it's turned off (== current behavior).
2011-06-23 16:20:32 +02:00
Konstantin Isakov 88dd9e2e8a Merge pull request #15 from Abs62/master
Replace printf(...) and fprintf(stderr,...) with debug output by macro
2011-06-19 21:35:30 -07:00
Abs62 e2004aaec4 Correction of previous commits 2011-06-20 08:26:27 +04:00
Abs62 7de7fcc8df Replace fprintf(stderr,...) in code by a macro FDPRINTF 2011-06-20 00:29:11 +04:00
Abs62 36e509a2ab Replace printf in code by a macro DPRINTF 2011-06-19 22:50:11 +04:00
Abs62 97a6d49221 Check scan popup modifiers in window message handler to avoid unneeded string handling 2011-06-17 16:15:41 +04:00
Konstantin Isakov a3500b0577 StarDict parser now ignores the absence of .syn files.
Closes #6.
2011-06-13 23:55:24 -07:00
Tvangeste a30a13323b Added Apply button to the Dictionaries configuration dialog. 2011-06-13 14:30:49 +02:00
Konstantin Isakov f12a8e6761 Merge pull request #12 from VVSiz/review/show_icons
Icons are not shown in various places on Linux
2011-06-12 23:34:29 -07:00
Tvangeste df7bd52980 Make icons visible in history and context menus. 2011-06-12 20:50:54 +02:00
Konstantin Isakov ac5962c3cf Don't crash on startup if the dictionary bar has been made floating previously.
Closes #9.
2011-06-10 21:50:19 -07:00
Konstantin Isakov 86a9e7d457 Merge pull request #5 from chulai/master
Add maxDictionaryRefsInContextMenu to config file
2011-06-09 18:09:50 -07:00
Julian Depetris Chauvin 207b780304 Add maxDictionaryRefsInContextMenu to config file to allow to change number of dictionaries in the context menu (Right-click on the definitions frame). Default to 20. 2011-06-09 19:54:57 -03:00
Tvangeste d9450efd57 Proper ignore file for git 2011-06-09 15:58:10 +02:00
Tvangeste 7525e456fb Merge pull request #2 from VVSiz/review/select_on_click
Translate line should select all on mouse click  that brings focus
2011-06-09 00:47:34 -07:00
Tvangeste 2a31365012 Deal with X11 headers mess that causes compilation errors 2011-06-09 09:29:21 +02:00
Konstantin Isakov e9ba25ce7c Merge pull request #3 from Abs62/master
Scan libraries modifications
2011-06-08 19:28:01 -07:00
Abs62 9232cfbdc7 Small changes in modules searching algorithm, fix resource leak. 2011-06-08 20:14:51 +04:00
Abs62 a523b8e3d7 Add interface for other programs to send to GD a word under cursor 2011-06-08 20:12:19 +04:00
Tvangeste 649fe9ce0b Fixed compilation failure on Linux. But WHY it's needed??? 2011-06-08 13:18:04 +02:00
Tvangeste de3fd01ada Fixed #1: Translate line should select all on mouse click that brings focus 2011-06-08 12:31:03 +02:00
Konstantin Isakov e87dce57ad Rework fixHebArticle() a bit. 2011-06-07 19:48:05 -07:00
Konstantin Isakov 2c6eb72148 Merge commit 'refs/merge-requests/10' of git://gitorious.org/goldendict/goldendict 2011-06-07 19:40:46 -07:00
Konstantin Isakov b8b7bffb13 Merge commit 'refs/merge-requests/15' of git://gitorious.org/goldendict/goldendict 2011-06-07 19:35:43 -07:00
Tvangeste 6f192dca6e Enable/disable Back and Forward buttons depending on the history.
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.
2011-06-07 18:52:51 +02:00
Tvangeste c6e8b4998f Handling of backward and forward mouse buttons.
They now do what is most logical for them to do: going
backwards and forwards in history.
2011-06-07 10:26:49 +02:00
Konstantin Isakov 0712d8fd96 Don't allow navigating back to the empty initial pages. 2011-06-07 00:57:25 -07:00
Tvangeste 4e6e0a5e05 Fixes after code review:
* 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
2011-06-06 11:54:23 +02:00
unknown f57c554a7c Added protection for not fixing empty hebArticle
Committer: nitnit

 On branch master
 Changes to be committed:

	modified:   bgl.cc
2011-06-05 22:34:05 +03:00
Tvangeste 3762f22e76 Implemented Dictionaries Pane, to show dicts in which results were found.
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).
2011-06-05 13:49:50 +02:00
Tvangeste ade15f5d41 Fixed compilation failure on Windows 2011-06-05 09:29:36 +02:00
Konstantin Isakov 40fa922de6 Add new program type - 'Prefix Match', which allows listing word matches as you type. 2011-06-04 14:35:09 -07:00
unknown 30996f14a9 Additional Hebrew support
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
2011-06-04 20:51:48 +03:00