179 Commits

Author SHA1 Message Date
Matthieu Gautier
91421c6a84 Correctly change the title of the searchbar when user change tabs. 2.0-beta1 2018-12-03 17:41:39 +01:00
Matthieu Gautier
8000fea1dc not is not a valid operator.
gcc accepts it and it is not a good thing to code both in C++ and Python :)
2018-12-03 11:39:53 +01:00
Matthieu Gautier
3007d1a9f6 Update style to visualize clickable items. 2018-12-02 17:11:00 +01:00
Matthieu Gautier
0b1296cc86 Implement search in the contentManager. 2018-12-02 17:09:39 +01:00
Matthieu Gautier
b1b0c1d2c3 Add a basic support for bookmarks. 2018-12-02 16:10:35 +01:00
Matthieu Gautier
67d56f1d03 Remove contentManager pagination.
The pagination was added as a workaround to a too slow display of
the content.

Now that with commit 4cbf001 we are displaying the icons async, the
pagination is no more usefull.
2018-11-30 16:01:27 +01:00
Matthieu Gautier
09bfbf1476 Fix .desktop file
- The version key is the version of the feedesktop specification, not the
  application one
- `Keywords` and `MimeType` must end with `;`
2018-11-30 15:58:16 +01:00
Matthieu Gautier
87b1e25240 Connect the address bar to the tab bar.
The search bar display the title of the current displayed article.
As the icon must change depending we are displaying the article's title or
we are doing a search, the icon is bit more complex :
- It is an embedded button in the searchbar, not a simple icon.
- The search bar is connect to the new signal "currentTitleChanged" to
  display the current title.

Fix #35
2018-11-30 15:49:16 +01:00
Matthieu Gautier
a7710fd3e3 Install icons on unix. 2018-11-26 19:24:41 +01:00
Matthieu Gautier
079497e74e Correctly install kiwix-desktop.desktop file on unix 2018-11-26 19:24:00 +01:00
Matthieu Gautier
0a2c65211e
Merge pull request #56 from kiwix/speedup_contentManager
Speedup content manager
2018-11-13 18:33:06 +01:00
Matthieu Gautier
4cbf001de4 Use real url for icon in the contentManager instead of data url.
The update of book info are made somehow sync. (They are async, but
somehow, the view update hangout).

Getting the favicon content is pretty long and it seems that the view
(and getting remote content) take a long time.

By using a real url, QWebViewEngine handle everything nicely and it speed
up everything.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
a98ea49cac Be able to request some zim's metadata using a custom url.
Only favicon for now.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
dd52ac8255 Move the urlSchemeHandler content handling in a specific method.
Just a bit of code reformating.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
29e27fa5d2 Add the custom zim UrlSchemeHandler to the contentManager view.
This way, the contentManager can get some information about a zim file
using the zim scheme.

We have to initialize the m_schemeHandler before the m_manager.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
5ca4d8903f Remove the requestInterceptor.
This is useless. It was use to rewrite http request to zim request and
have the custumUrlShemeHandler handle the request.

However, we now want to open http request in a external browser.
And it is already the case, the http requests are never intercepted.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
a12e641667
Merge pull request #55 from kiwix/workaround_contenttype
Workaroud the contentType handling of QTWebEngine.
2018-11-13 18:32:02 +01:00
Matthieu Gautier
a478b1600c Workaroud the contentType handling of QTWebEngine.
It seems that QTWebEngine doesn't correctly handle a "complex" mimeType
(`text/html; charset=utf-8`). In this case, it handles the content as
`plain/text`.

So let pass only the first part of the full mimeType without the charset.

Fix #50
2018-11-13 15:54:49 +01:00
Matthieu Gautier
963c0066c2 Ensure that we use the right path separator when opening a book. 2.0-alpha6 2018-11-03 12:08:15 +01:00
Matthieu Gautier
565e332de2 Do not crash if we cannot launch aria2.
Sometime, we cannot launch aria2 or connect to it.

- Do more attempt.
- Display an error message if we cannot and quit instead of crashing.
2.0-alpha5
2018-11-02 17:33:53 +01:00
Matthieu Gautier
74d7cb955e Update the remote library when we change the page. 2018-11-02 17:08:58 +01:00
Matthieu Gautier
f81061f1f4 The max page should be nbPages-1, not nbPages. 2018-11-02 17:08:40 +01:00
Matthieu Gautier
3311423ca1 Do not display the number of book we received but the real number of book.
If we do paging of 10 books, we want to display the real number of books
available, not only 10.
2018-11-02 17:08:12 +01:00
Matthieu Gautier
f65f8c1c31 The search endpoint has no xml extension. 2018-11-02 17:06:54 +01:00
Matthieu Gautier
f30c4aace5
Merge pull request #47 from kiwix/fix_catalog_url
Correctly set the catalog host and port.
2.0-alpha4
2018-10-31 16:08:49 +01:00
Matthieu Gautier
e46c3a9756 Correctly set the catalog host and port. 2018-10-31 16:08:03 +01:00
Matthieu Gautier
d79aaa98b6 Better icon. 2018-10-26 14:09:16 +02:00
Matthieu Gautier
35c785ffe1 Add missing declartion of signal. 2018-10-26 14:08:55 +02:00
Matthieu Gautier
bf2c780647
Merge pull request #45 from kiwix/contentManager
Content manager
2018-10-26 13:58:05 +02:00
Matthieu Gautier
b388b13ba0 Disable contentManager button we do not handle. 2018-10-26 13:55:35 +02:00
Matthieu Gautier
b9e0c4037c Correctly hide the contentManager bar. 2018-10-26 13:54:53 +02:00
Matthieu Gautier
d6513d6329 fixup! Make the content 2018-10-26 13:53:11 +02:00
Matthieu Gautier
e010815b4f Handle request to remote opdsfeed.
The content of the feed is fetch only for what is displayed to reduce
size and is store in a kiwix::Library (never stored in the fs).
2018-10-26 13:52:21 +02:00
Matthieu Gautier
d72dc72a21 Better style for contentManager. 2018-10-26 13:43:40 +02:00
Matthieu Gautier
5a6bafc8e1 Move style.css in another resources file.
It speed up compilation when we modify the style.
2018-10-26 13:42:05 +02:00
Matthieu Gautier
1022136697 Move the contentManagare sidebar into a specific widget. 2018-10-18 16:45:47 +02:00
Matthieu Gautier
300540d4b8 The sidebar must be under the tabbar.
The tabbar must use the whole length and must not be pushed out by the
sidebar.

So we need to split the tabwidget into a tabbar and a stackedWidget.
2018-10-18 16:44:27 +02:00
Matthieu Gautier
3410252837 Make the contentManager the only interface from C++ to js/html.
Move all methods used by contentManager html into the contentManager class.
We do not export anymore the kiwixapp, the library or the downloader.
As the downloader was use only to export the methods to html, we can
remove it (and use kiwix::Downloader).
2018-10-18 15:22:08 +02:00
Matthieu Gautier
235b82166e Add a bit of styling.
Still need a lot of works
2018-10-17 14:47:09 +02:00
Matthieu Gautier
7a83a1038d Handle downloading of remote books. 2018-10-17 11:16:57 +02:00
Matthieu Gautier
2923b19478 Display the size of the zim book in the contentManager. 2018-10-17 11:10:17 +02:00
Matthieu Gautier
f39254a6f1 Move the creation of a dict from a list of values in a specific function. 2018-10-17 11:01:27 +02:00
Matthieu Gautier
9ce41c06af Open book from the contentManager. 2018-10-17 11:01:21 +02:00
Matthieu Gautier
a6f8bbd6e5 Add a first version of the contentManager. 2018-10-17 11:00:09 +02:00
Matthieu Gautier
d294b16a12 Run lupdate and lrelease only on linux.
system cannot run on windows.
2.0-alpha3
2018-09-05 17:54:00 +02:00
Matthieu Gautier
30520fd1aa Merge pull request #25 from Ordissimo/master 2018-09-05 16:06:08 +02:00
Matthieu Gautier
bf8fab75d8 Add a translation for texts/about.html. 2018-09-05 16:05:03 +02:00
Matthieu Gautier
457d9aafef Update translations. 2018-09-05 16:05:03 +02:00
Matthieu Gautier
d37cdd6e2d Do not use QObject::tr but directly tr.
It simplify the code and allow the translation to keep the context
(the class of the object) instead of always having the `QObject` context.
2018-09-05 16:05:03 +02:00
Matthieu Gautier
171a307a7b Uniform the way we are loading translation files.
It is better to have the same mechanism to load the file instead of one
time using `load` method to find the right file and one time using the
resources system overloading the resource file.
2018-09-05 15:37:53 +02:00