179 Commits

Author SHA1 Message Date
Matthieu Gautier
f18515cbd2
Merge pull request #122 from kiwix/kiwix-stage
bug fix loading remote library when local file selected
2019-04-10 16:12:05 +02:00
luddens
f0bd6ae8ab do not update remote library when displaying local library 2019-04-05 17:31:52 +02:00
luddens
fd4cb2e610 minor fix multiple parameters STR(X)
When X contains a coma, X is interpreted like it's multiple variables.
To avoid compilation error, we must use varargs.
2019-04-05 17:22:36 +02:00
jetownfeve21
c7f07704e5
Merge pull request #124 from kiwix/close_tab_fix
Keep the mp_stackWidget in sync with the tabBar.
2019-04-03 14:17:16 +02:00
Matthieu Gautier
50ab4bfadb Keep the mp_stackWidget in sync with the tabBar.
We need to remove the child widget from the stackWidget before we remove
the tab. Else the onCurrentChanged will try to get the widget of the new
tab and if the tab and the stack are not in sync, we may get the wrong
widget.

As `closeTab` remove the widget from the stack we don't need to remove
it again in listen of `CloseTabAction`.
2019-04-03 14:15:30 +02:00
Matthieu Gautier
c03b195325 New version (beta4) 2.0-beta4 2019-03-19 17:43:43 +01:00
Matthieu Gautier
ceab9780a4 Add a filtering by Category.
Categories are static for now.
2019-03-19 16:44:07 +01:00
Matthieu Gautier
8ab7ee70bf Use the correct url when reading the opds feed.
This is needed as, when testing, the CATALOG_HOST!=CATALOG_URL if
the port is not 80.
2019-03-19 16:43:11 +01:00
Matthieu Gautier
0824c86c91
Merge pull request #110 from kiwix/language_filtering
Language filtering
2019-03-06 18:48:56 +01:00
Matthieu Gautier
aa8f7cb3dd Do not display all books at once.
When there is a lot of book it can take some time to display all books.
Even more, when displaying ALL books, I face the kiwix-desktop freezing.

So let's display only 20 books and if the user scroll to the end of
the displayed books, display 20 more books.

The limits is made at rendering, this allow us to not change all the
logic behind (request, filtering, ...)
2019-03-06 18:07:35 +01:00
Matthieu Gautier
a5fea9f582 Add a "all" language.
This way we can get all zim, without any filtering.
2019-03-06 18:07:35 +01:00
Matthieu Gautier
05c64e620d Make the selected item bold.
css style font doesn't work for item. So we have to inherit the
QListWidgetItem to redefine the `data` method.
2019-03-06 18:07:35 +01:00
Matthieu Gautier
f1879b5c3f Add a filtering by language.
The current list of available language is a fixed list.
It is generated by the union of languages we have (on library.kiwix.org)
and languages Qt know of. So some languages for which we have content
are not available.

For now, the filtering is made only for remote catalog.
This probably have to be changed, but for now it is better to
display all the content the user has.
2019-03-06 18:07:35 +01:00
Matthieu Gautier
7e1ccb7511
Merge pull request #103 from kiwix/fix_appdata
Fix appdata
2019-02-05 18:03:47 +01:00
Matthieu Gautier
79b4dd95ab Add screenshots in appdata. 2019-02-05 15:03:15 +01:00
Matthieu Gautier
7e57312f59 Add content rating in appdata. 2019-02-05 15:02:40 +01:00
Matthieu Gautier
3bf03d55d8 Add release tag in appdata. 2019-02-05 15:02:30 +01:00
Matthieu Gautier
8899723480 Fix typos in appdata description and license. 2019-02-05 15:00:50 +01:00
Matthieu Gautier
a6bcef230a Fixup installation of metainfo file. 2.0-beta3 2019-01-29 13:37:58 +01:00
Matthieu Gautier
6d9b5a2942 Update to last kiwix-lib api.
`common` directory has been renamed to `tools`.
2019-01-23 17:17:49 +01:00
Matthieu Gautier
1ae8a8a6d3 Update Changelog. 2019-01-23 15:28:23 +01:00
Matthieu Gautier
902ebb3402 Update about.html to correctly list dependencies.
We are using `Mustache` instead of `CTTP2` now
2019-01-23 15:27:38 +01:00
Matthieu Gautier
5b5c25d2dd
Merge pull request #100 from kiwix/fix_flatpak_extra_files
Fix flatpak extra files
2019-01-23 11:34:24 +01:00
Matthieu Gautier
16e01bd0e1 Add zim mimetype support.
The will allow a user to simply "double click" on the zim file and
let org.kiwix.desktop being launch automatically.

Fix #99
2019-01-23 11:33:22 +01:00
Matthieu Gautier
e16b521840 The appdata file is named org.kiwix.desktop.appdata.xml.
Not `org.kiwix.desktop.metainfo.xml`.
2019-01-23 11:29:51 +01:00
Matthieu Gautier
1cd83098e5 kiwix-lib new API : getIndexPath has been removed.
And it was not used anyway.
2019-01-08 17:10:55 +01:00
Kelson
310799f1d1
Merge pull request #89 from kiwix/legoktm-patch-1
README: Fix typo in package name
2018-12-28 09:01:39 +01:00
Kunal Mehta
64c1a6a8a6
README: Fix typo in package name
I assume it was supposed to be libqt5svg5-dev with a q, not a g.
2018-12-27 18:33:22 -08:00
Kelson
084e8510c5
Update README.md 2018-12-14 19:06:12 +01:00
Matthieu Gautier
ef51800f24 Update Changelog. 2.0-beta2 2018-12-14 16:56:30 +01:00
Matthieu Gautier
ccbabfec1b Remove highlighted text from a search
Fix #83
2018-12-13 18:11:55 +01:00
Matthieu Gautier
c081b3a665 Disable back/forward buttons when there is no history
Fix #82
2018-12-13 18:06:11 +01:00
Matthieu Gautier
2f2d66d45c Udpate style.css
- Add a small margin around the top button
- Change the button background on hover.
2018-12-13 17:41:02 +01:00
Matthieu Gautier
5ee665f049 Add README.md and COPYING files.
Fix #62
2018-12-13 17:36:05 +01:00
Matthieu Gautier
8ff3cead02 Add a Changelog.
Fix #30
2018-12-13 11:50:09 +01:00
Matthieu Gautier
2807597e11 Elide the title tab of the article.
Fix #75
2018-12-12 18:04:42 +01:00
Matthieu Gautier
98da59d62b Add a appdata file.
To comply with appstream.
2018-12-12 17:50:18 +01:00
Matthieu Gautier
caae4e8124 Rename the .desktop file to follow recommendation.
We should use the "reverse dns" name : org.kiwix.desktop.
2018-12-12 17:47:05 +01:00
Matthieu Gautier
5e3e7026ab Do not wrap the articles in the reading list.
We want to have all articles in only one column.
2018-12-12 11:17:06 +01:00
Matthieu Gautier
9314c88600 We need to add a .zim at end of url host. 2018-12-12 11:16:10 +01:00
Matthieu Gautier
3f9072f978 Correctly style the first tab (contentManager)
It would be nice to be able to style it using css (QTabBar::tab:first)
but I can't figure how :/

We need to :
- hardcore the size of the tabs using `tabSizeHint`.
- "deactivate" the tab button with `setTabButton`
- set the size of the icons.

Fix #73
2018-12-11 18:03:03 +01:00
Matthieu Gautier
4b9cc80f66 Do not do an extra request to search book in the remote library.
When doing a search in the library, we know for sure that the result will
be a subset of the library we have (without query). So we can do the
search locally (through the books we already have in cache) instead of
doing another request.
2018-12-11 12:08:22 +01:00
Matthieu Gautier
3582ab03e3 Get the favicon from the book instead of from the reader.
- It avoid us to open the zim file to get the favicon.
- It allow us to have the favicon for partially downloaded zim.
2018-12-10 17:50:14 +01:00
Matthieu Gautier
639d16586f Use the encoded url when doing a request to the server. 2018-12-10 17:48:54 +01:00
Matthieu Gautier
f45ab71923 Emit currentTitleChanged when we change tab.
To allow the searchBar to follow tab change and adapt itself.
2018-12-10 16:55:48 +01:00
Matthieu Gautier
d52dab04ce Do not resize zimId.
If there is no ".zim" at the end, we don't need to remove it.
2018-12-10 16:55:00 +01:00
Matthieu Gautier
ce71fe0275 Correctly handle the sideBar.
The side bar has some constraints :
- If the contentManager is displayed, we cannot change or hide the side
  bar.
- The readingList button must follow the currentside bar, not its
  internal status (checked/unchecked).
2018-12-10 16:40:42 +01:00
Matthieu Gautier
6a0296f0f2 Use the real zimId instead of "zimId+.zim".
The real zimId is `xxxx` (stored in the zim itself), not `xxxx.zim` (we
use as host url).

Store the host as an id means that we always need to convert from `xxxx` to
`xxxx.zim` (and the contrary). It is prone to mistake when we forget to
convert to the correct format.

We must use `xxxx.zim` only in the url as is it use to identify what is
asked in the urlschemehandler. Everywhere else, we only need the real
zimId.
2018-12-10 15:17:55 +01:00
Matthieu Gautier
f0e61d31bf Do not do too many request as we try the search in the contentManager.
Wait 200ms before doing the request. It will avoid contentManager to do
too many (and useless) requests.
2018-12-10 15:17:55 +01:00
Matthieu Gautier
7b1d302a78 Do not crash if contentManager view and backend are out of sync.
In case of rapid input in the contentManager's search entry, the
search request will be launch rapidly. As the view is updated async, the
`getBookInfos` may be used to get information on a book not in the
library anymore. We must handle this to avoid crashing.

Fix #65
2018-12-10 15:17:45 +01:00