524 Commits

Author SHA1 Message Date
luddens
1c9fd27e29 add open file button in toolbar 2020-04-07 11:39:43 +02:00
Kelson
3c6a8be870
Run Github actions on any push (not only in PR) (#394) 2020-04-04 18:32:09 +02:00
Kelson
738fc1f5fb
Add Github Actions CI badge 2020-04-04 17:31:44 +02:00
jetownfeve21
135baf48cd
new Find in page in a bottom bar (#347)
Zimview is now a container for the webview and the find in page bar
Add a F3 shortcut
ESC hides the search bar and the highlighting
2020-04-01 19:29:28 +02:00
jetownfeve21
99ac7ab090
clean border between tabbar and content (#392) 2020-04-01 19:23:35 +02:00
Matthieu Gautier
2efdfeb842
Correctly handle redirection in zim file. (#390)
Sotoki zim file use redirection to article not in the same "directory".
So it breaks relative urls.

Instead of providing the content of the target entry, we must redirect
to the target entry. So, relative url are not broken.

Fixes #384, #206
2020-03-27 12:05:42 +01:00
Matthieu Gautier
33cdfb1145
Merge pull request #386 from kiwix/external-link-ctrl-click
Ctrl + Click on external link doesn't open a new empty tab
2020-03-25 16:21:36 +01:00
luddens
285417a2d8 Ctrl + Click and middle click on external link don't open a new empty tab
Connect the &QWebEnginePage::linkHovered signal to set the m_linkHovered
member.
The Ctrl + Click and middle click events are intercepted to directly open the m_linkHovered
variable if it's an external link
2020-03-25 16:17:25 +01:00
Matthieu Gautier
df9db1317a
Merge pull request #389 from kiwix/kiwix-icon
kiwix icon change
2020-03-25 16:15:53 +01:00
luddens
8eb3e2691c kiwix icon change 2020-03-25 14:02:07 +01:00
jetownfeve21
d236d238c6
remove reload action in context menu (not working) (#385) 2020-03-25 11:30:36 +01:00
Kelson
bf1139bfd6
Merge pull request #381 from kiwix/search_page
Search page
2020-03-11 17:19:02 +01:00
Matthieu Gautier
dfe8a4c75e Add a "completion entry" do to a full search. 2020-03-11 16:13:34 +01:00
Matthieu Gautier
9049ac7bbf Handle search request.
We know this is a search request base on the "tld" of the domain.
We render the search using the kiwix::SearchRenederer.

As now we can have a tld (".search") of more than 4 char, we must get
the zimId by spliting the url on "." instead of removing 4 char.
2020-03-11 16:13:34 +01:00
Matthieu Gautier
ff60343a05 Store the full url to open in the urllist for the completion.
Instead of storing only the path and recreate the url when we open the
completion, lets directly store the url and use it later.
2020-03-11 16:13:34 +01:00
Matthieu Gautier
7401926f17 Add a method to get (create) a searcher for a zimId. 2020-03-11 16:13:34 +01:00
Matthieu Gautier
a10281960b Use QUrl's fileName method 2020-03-11 16:13:34 +01:00
Matthieu Gautier
62a2b57795 Use a global profile to handle to configure scheme handler and download.
We don't need to configure the (default) profile each time we create a
new web page.

Let's create a specific profile for the application and use it everywhere.

This is the profile who is responsible to :

- configure itself with the schemeHandler for "zim"
- handle the download (this probably fix a bug if a user close the page
  while a download associated to the page is running)
2020-03-11 16:13:34 +01:00
Matthieu Gautier
f1fb16466a Use the map of reader in the kiwix::Library.
`kiwix::Library` now have a feature to directly get a reader from
the library. It also use a map to avoid creating several readers.

Use it instead of managing our own reader map.
2020-03-11 16:13:34 +01:00
Matthieu Gautier
8907999c21
Merge pull request #382 from kiwix/settings-crash-fix
[Urgent]  Fix crash settings page
2020-03-04 17:18:12 +01:00
luddens
4154369ed3 Tabbar::currentWidget return nullptr if current widget is the settingstab 2020-03-04 16:53:53 +01:00
Matthieu Gautier
bccfc1a9b8
Merge pull request #379 from kiwix/settings-tab-close-button
settings tab close button style
2020-03-03 16:10:16 +01:00
luddens
34ba901e47 settings tab close button style 2020-03-03 15:50:36 +01:00
Matthieu Gautier
ffdf7f2a20
Merge pull request #355 from kiwix/download-path
[WIP] Download path can be changed in the settings
2020-03-03 15:31:33 +01:00
luddens
e859bce2de remove book stored anywhere
Now that a book can be downloaded everywhere,
the ContentManager::eraseBookFilesFromComputer method use the path instead of the
name of the book
2020-03-03 15:27:17 +01:00
luddens
870dba20b0 add the possibility to set the download path in the settings
New field "download path" in the settings page.

To start a download it now uses the download path stored in the settings. Use the new api
of https://github.com/kiwix/kiwix-lib/pull/310 to work.
2020-03-03 15:27:17 +01:00
Kelson
425fa3436b
Merge pull request #375 from kiwix/searchbar-focus-out-restore-title
Restore the title tab when searchbar loses focus
2020-02-26 12:23:42 +01:00
luddens
1f07d8b75f restore the title tab when searchbar loses focus
reimplement QLineEdit::focusInEvent(QFocusEvent* event)
use setReadOnly method to display/hide blinking cursor
2020-02-26 12:19:35 +01:00
Kelson
a4450d9181
Merge pull request #378 from kiwix/newtab-emptytab
remove useless variables
2020-02-19 15:49:00 +01:00
luddens
6bd4646e1a remove useless variables 2020-02-19 15:25:27 +01:00
Matthieu Gautier
4fb9e917b6
Merge pull request #351 from kiwix/aria2-error
Aria2 crash fix
2020-02-19 14:40:43 +01:00
luddens
cf3f699dc2 error handling when mp_downloader doesn't exist 2020-02-19 14:20:56 +01:00
luddens
a774d90256 display aria2 launch cmd that doesn't crash
The program crashes because it tries to use mp_downloader->getAria2LaunchCmd()
but the mp_downloader is null if the aria2 launch command fail.

Now the program displays an error message to warn users that all download fct will not working.

This PR https://github.com/kiwix/kiwix-lib/pull/306 is needed in order to display the aria2 launch cmd
2020-02-19 14:20:56 +01:00
jetownfeve21
a9a299c8ad
change library icon (#377) 2020-02-19 08:33:02 +01:00
jetownfeve21
9beba77625
set a default filename to the filepicker (#376)
Note: in Qt 5.14
this method QString QWebEngineDownloadItem::downloadFileName() const
gives directly the filename
2020-02-18 08:44:13 +01:00
jetownfeve21
113fa261eb
new tab action opens an empty tab (#374) 2020-02-18 08:19:13 +01:00
Matthieu Gautier
7a54f2a6ac
Merge pull request #367 from kiwix/wheel-zoom
fix zoom with mouse wheel
2020-02-05 15:26:51 +01:00
luddens
c4a038a5f3 fix zoom with mouse wheel
Mouse event aren't handled by QWebEngineView as related in https://bugreports.qt.io/browse/QTBUG-43602

To make it work for now, it uses a solution of Eike Ziller  http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/help/webenginehelpviewer.cpp
2020-02-05 15:17:31 +01:00
Matthieu Gautier
bb9e6202c4 Fix compilation because of missing method.
The method `getAria2LaunchCmd` doesn't exist in kiwix-lib.
Remove it as it now avoid kiwix-desktop to compile correctly.

Proper message will be displayed correctly when #351 will be merged.
2020-02-05 11:14:36 +01:00
Kelson
336329093d
Github Kiwix Sponsoring page link 2020-02-01 17:55:20 +01:00
Kelson
c2e38b369b
Merge pull request #361 from kiwix/close-tab-from-library
Fixes problems with tab closing
2020-01-28 16:37:48 +01:00
luddens
4874927063 select the tab on the left if the closed tab is the furthest to the right 2020-01-28 16:37:28 +01:00
luddens
0dcbe42346 fix close a tab from library tab
Because the close tab button is now a custom QToolButton, when you press
it from another tab, we have to refer to the cursor position to know the
index of the tab.
2020-01-28 16:37:28 +01:00
Kelson
7536505b0b
Merge pull request #364 from kiwix/dash-title
local kiwix server window title uses short dash as separator
2020-01-28 16:32:28 +01:00
Kelson
5de3717165
Merge pull request #362 from kiwix/new-tab-focus
set the focus on the search bar when opening a new tab
2020-01-28 16:25:57 +01:00
luddens
1c7b900aef set focus on searchbar when opening a tab
the searchbar isn't update if it has the focus
2020-01-28 16:10:47 +01:00
luddens
3831e5f227 local kiwix server window title uses short dash as separator 2020-01-28 15:36:58 +01:00
Kelson
47cc29d31c
Merge pull request #346 from kiwix/menu-icon
bigger menu icon
2020-01-28 11:34:13 +01:00
Kelson
8d84932e22 Remove tabs indentation 2020-01-28 11:33:26 +01:00
luddens
8d6deff541 add more padding 2020-01-28 11:29:09 +01:00