248 Commits

Author SHA1 Message Date
Le Tan
e7381bdd04 warn users when copying files failed 2017-03-04 14:39:52 +08:00
Le Tan
f46b023d1b refine more messages to use tr() 2017-03-04 14:28:09 +08:00
Le Tan
38b18af4ab refine Chinese translations 2017-03-04 13:49:22 +08:00
Le Tan
238983ed0d refine all messages 2017-02-27 22:30:35 +08:00
Le Tan
b879b2c208 change file format from dos to unix 2017-02-26 20:01:29 +08:00
Le Tan
517d1ed139 refine dialogs
Use QDialogButtonBox in all dialogs.
2017-02-26 19:59:42 +08:00
Le Tan
c83fcf6ce9 add settings dialog and language setting
Add VSettingsDialog to show a settings dialog.
For now, VNote supports setting of language.
Add imcomplete Chinese support.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-02-26 17:13:52 +08:00
Le Tan
65b149e182 add tooltip for items in directory tree and file list panels 2017-02-12 20:55:22 +08:00
Le Tan
60d2e57416 refine README.md 2017-02-12 20:40:09 +08:00
Le Tan
d4b4419faa refine README.md
- Add Chinese description.
- Add more demo.
2017-02-11 14:52:04 +08:00
Le Tan
8db54c45a4 bugfix: do not use reference to hold return value from capturedTexts()
Signed-off-by: Le Tan <tamlokveer@gmail.com>
v1.0
2017-01-25 22:54:13 +08:00
Le Tan
010f4245f6 bugfix: clear image preview blocks having unmatched image path
The syntax highlighter could not recognize image links with spaces in
the URL. When clearing orphan image preview block, we need to clear
thoes blocks which having unmatched image path.

Fix issue: after inserting spaces in the URL of an image link, the
preview block still exists.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-22 19:40:43 +08:00
Le Tan
180ab46367 bugfix: highlight links and images with spaces in URL
It is said that URL should not contain spaces. Anyway, we use regular
expression syntax highlighting to complement PEG Markdown Highlight.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-22 19:39:43 +08:00
Le Tan
0c0fdfcbf1 add README.md and LICENSE
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-22 19:38:48 +08:00
Le Tan
bc9ed31db6 locate to the new directory after creation
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-21 09:43:48 +08:00
Le Tan
fb1a172acf propagate key press event from QWebEngineView to VDocument
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-21 09:42:48 +08:00
Le Tan
46988f5bef refine editing shortcuts
1. Ctrl+[ behaves exactly like ESC;
2. Ctrl+W should delete the selected text if there has one.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:48:00 +08:00
Le Tan
336d9ad109 add shortcut Ctrl+O to insert backquotes
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:47:01 +08:00
Le Tan
f533dd6f95 bugfix: QUrl adds extra %0A to the copied url
Let the base class handle inserting urls.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:46:01 +08:00
Le Tan
2026d5f3a3 change app icon
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-14 11:57:37 +08:00
Le Tan
66d2cc157a change the icon of saving note
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-14 09:59:32 +08:00
Le Tan
59611872d4 use "image" as the default image title
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-14 09:26:48 +08:00
Le Tan
a3926631e2 smaller font size in notebook selector
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-14 09:03:03 +08:00
Le Tan
3feec565f6 restore the expansion state of the directory tree after creating or pasting
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-13 23:16:35 +08:00
Le Tan
5a097421e1 bugfix: check hasFocus() when handling clipboard change
When copying the preview image, other tabs should check if they have the focus.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-13 22:31:54 +08:00
Le Tan
77d8daa5ec do not focus VEdit when navigating through the outline
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-13 22:24:10 +08:00
Le Tan
11bb7b4df9 remove the width constraints in markdown rendering
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-12 21:01:03 +08:00
Le Tan
901c477705 utilize ExtraSelection for special highlighting
1. Highlight current line;
2. Highlight selected word;
3. Highlight searched word;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-12 21:00:06 +08:00
Le Tan
62f2d39fbc bugfix: update outline info after renaming
Update the filePath property in VToc after renaming the note.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-11 21:26:46 +08:00
Le Tan
3769ac5311 support search wrap
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-10 23:52:54 +08:00
Le Tan
7ed92ed7eb fix bug in VEditWindow
Bug: when we press the scroll button to the end and click the first/last
tab, it won't set current tab correctly.

We should not change anything related to current index in handling
tabbarClicked().

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-09 23:01:12 +08:00
Le Tan
3005d9bf5c implement Find/Replace logics
Supports Find/Replace in both edit and preview modes.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-08 21:09:00 +08:00
Le Tan
768c1632b0 save and restore the sate of the main splitter
Add a config "main_splitter_state" to store the state of the main
splitter.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-02 10:00:59 +08:00
Le Tan
d416cf6eda refactor messages
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 17:00:38 +08:00
Le Tan
9b6afa013d refine the layout of dialogs
Use gridlayout and formlayout to make a more beautiful dialog.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 16:52:56 +08:00
Le Tan
41abbb21d0 refactor VMainWindow
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 15:46:57 +08:00
Le Tan
eaab820d8b add find and replace dialog
Logic is not implemented yet.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 14:43:28 +08:00
Le Tan
7eadaed727 support copying image from image preview block
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-31 16:12:51 +08:00
Le Tan
385abb3041 hide image preview block when selected
We do not want user to copy the image preview block (a special char).

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-31 14:13:42 +08:00
Le Tan
059e8dacd2 change cursorline color in Vim mode
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-29 22:23:20 +08:00
Le Tan
72fdf399bc change app icon
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-29 21:26:39 +08:00
Le Tan
becd4a320f support Vim key bindings in preview mode
1. h, j, k, l to navigate;
2. gg, G to go to the start and end of the document;
3. Ctrl+D, Ctrl+U to go down and up half page;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-29 20:52:18 +08:00
Le Tan
880d16e8f4 support reordering notes in file list panel
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-28 19:02:27 +08:00
Le Tan
c44928e1d8 remove Ctrl+Alt Vim mode
1. Remove Ctrl+ALT Vim mode. Now Ctrl+D will enter the Vim mode
tempararily and only expires after NOT hitting commands for a while;
2. Add d and dd to delete text. 'd2j' is not supported;
3. x will cut the selected text.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-27 09:59:26 +08:00
Le Tan
3b442f55a9 highlight curren cursor line
Add configuration "highlight_cursor_line" in vnote.ini.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-25 20:31:59 +08:00
Le Tan
76bd2c7d64 support more Vim key bindings
1. Esc or Ctrl + [ to clear selection or exit Vim mode;
2. v to enter visual mode;
3. y to copy selected text; "y2j" is not supported yet;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-25 11:24:49 +08:00
Le Tan
58c8506855 use different color of the corner icon in current window
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 15:52:05 +08:00
Le Tan
16858d7474 support moving tabs between windows
Add two menu item on the tab's context menu to move one split
left/right.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 15:02:14 +08:00
Le Tan
1aa264adc8 support locating current note
Support locating the notebook and directory of current note.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 13:09:19 +08:00
Le Tan
b14d15e266 add icon to indicate the read/edit mode of tab
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 09:32:56 +08:00