215 Commits

Author SHA1 Message Date
Matthieu Gautier
7e5d4708ee
Merge pull request #158 from kiwix/stay-in-current-tab
don't open new tab
2019-05-28 17:26:23 +02:00
luddens
badb43ec7b open random article doesn't open new tab 2019-05-27 17:41:55 +02:00
luddens
adc9f1a7ce searchbar research doesn't open new tab 2019-05-27 17:41:55 +02:00
Matthieu Gautier
25da15c2de
Merge pull request #163 from kiwix/fix_urlscheme_qtversion
QWebEngineUrlScheme exists only since 5.12.
2019-05-27 17:36:58 +02:00
Matthieu Gautier
b2416a591e QWebEngineUrlScheme exists only since 5.12.
As we are compiling using 5.11 on windows ci, we need to do conditional
compiling.
2019-05-27 17:18:33 +02:00
Matthieu Gautier
6aeb4085dc
Merge pull request #162 from kiwix/fix-minor-warning
remove the scheme warning
2019-05-27 14:40:28 +02:00
luddens
bf21a06828 remove the scheme warning 2019-05-23 15:51:58 +02:00
Matthieu Gautier
4d16e16faf
Merge pull request #154 from kiwix/fix-refresh-searchbar
fix search bar bad reset
2019-05-16 17:39:15 +02:00
luddens
d247f7e36e fix search bar bad reset
Clear the search bar only if the focus is due to a mouse click
2019-05-16 17:31:55 +02:00
Matthieu Gautier
38037bbcdf
Merge pull request #153 from kiwix/fix-crash-non-existing-file
Fix crash when trying to open non existing file
2019-05-16 17:31:04 +02:00
luddens
fcba24c119 Fix crash when trying to open non existing file
if the reader is null because the file doesn't exist, it returns
2019-05-15 10:46:29 +02:00
Matthieu Gautier
2adc00074e
Merge pull request #151 from kiwix/context-menu
add options in context menu
2019-05-13 15:51:23 +02:00
luddens
7cfc92c80f add options in context menu 2019-05-13 15:42:32 +02:00
Matthieu Gautier
9a3a554e6f
Merge pull request #138 from kiwix/split--contentManagerHtml
Split contentmanager.html
2019-05-13 15:33:27 +02:00
luddens
949d50866c Split ContentManager.html into 3 files (html, css, js) 2019-05-13 13:58:18 +02:00
Matthieu Gautier
227041f636
Merge pull request #137 from kiwix/stop-download
pause and resume button
2019-05-13 13:53:48 +02:00
luddens
badcbe7320 multi-click download button start only 1 download 2019-05-13 11:44:13 +02:00
luddens
0e2c2e5c5c add cancelBook 2019-05-13 11:44:11 +02:00
luddens
f5b7ce2c2c pause and resume button 2019-05-13 11:31:38 +02:00
Matthieu Gautier
2d52bab3fe
Merge pull request #130 from kiwix/unresponsive_desktopapp-server-down-fix
Unresponsive desktopapp server down fix
2019-05-02 17:00:56 +02:00
luddens
1714d8ca5a add a load icon during the remote library's update's request
add a div with the loading's animation. When the contentManager sends the
remote library's update's request, it emits a "true" displayLoadIcon signal
that remove the class "do-not-display" and it emits a "false" displayLoadIcon
signal when it has to display the local library.
2019-05-02 16:16:53 +02:00
luddens
b2c2004f72 new architecture for the remote library's update's request
Using Curl fct of the kiwix library is synchrone, so when the server accepts
the request but doesn't answer, the kiwix-desktop app is unresponsive.

To avoid that, this is a new architecture based on the Qt network request
management.

There is a new member in the contentmanager based on the new class
OpdsRequestManagerManager. It has two members : m_networkManager sends the
request and return a pointer stored in mp_reply which will receive the answer
of the request.

When the remote library has to be update, it calls
the doUpdate method. It checks if there already is a running request and
aborts it if yes. Then m_networkManager sends the
request and return a pointer stored in mp_reply which will receive the answer
of the request. The signal 'finished' of the mp_reply is connected to the slot
receiveContent. In this slot it checks if the signal 'finished' was emit
because of an abort, if not it reads and emit a signal bookChanged with the
content in parameter. This signal in connected in the ContentManager class
to the slot 'updateRemoteLibrary' which update the remote library member.
2019-05-02 16:15:55 +02:00
Matthieu Gautier
399a6cb4d5
Merge pull request #135 from kiwix/delete-button
Delete books in a custom contextmenu
2019-05-02 11:01:55 +02:00
luddens
a5c4beb612 erase book in a right-click context menu
Foreach "summary" element that represents a book, Vue.js binds its id with
the book's id.

When a "contextmenu" event (right-click) is emitted, it saves the mouse's
coordinates to set the contextmenu's position and display it if the cursor
is on a book.

The "displayMenu(book)" function displays the contextmenu if the "book"
parameter isn't null. It handles which options to show too (for now there is
the "delete" option only).

The delete option calls "eraseBook(book)" that uses
"getBookFromMousePosition()" to know which book has to be deleted.

"getBookFromMousePosition(info)" gets all elements at the mouse's
position, selects a "summary" element which has the "book-summary" class if
there is one, to get the book requested thanks to the id bind by Vue.js and
return it.
2019-05-02 10:54:55 +02:00
luddens
2848fc1e43 delete books with simple ui
add a column at the book's list's table with "delete" button. This ui
is temporary.

On click, this button sends the id of the selected book at the
ContentManager class which gets book by this id, and erases all files
in relationship with this book on the computer.
2019-05-02 10:49:56 +02:00
Matthieu Gautier
3a425980ef
Merge pull request #133 from Quentin-Hsk/mainwindow-title
Dynamic window title
2019-04-30 14:52:42 +02:00
Quentin Dussieaux
c507f2b5c8 New translated file generated 2019-04-30 14:44:50 +02:00
Quentin Dussieaux
e18401a245 Dynamic window title 2019-04-30 14:44:50 +02:00
Matthieu Gautier
c642209dc9
Merge pull request #131 from kiwix/fix_include_path
Correctly set include path in CFLAGS and CXXFLAGS
2019-04-30 11:58:23 +02:00
Matthieu Gautier
755ac40c04 Correctly set include path in CFLAGS and CXXFLAGS
It appears that setting `INCLUDEPATH` in qmake break things.
Because qmake add the include path using `-isystem`.

We don't need to extract include path and define  from PKGCONFIG_CFLAGS.
Updating `CFLAGS` and `CXXFLAGS` is enough. No need for complex things.

Fix #90
Fix kiwix/kiwix-build#260
2019-04-16 15:42:20 +02:00
Matthieu Gautier
a005a5cb25 Return doesn't take argument in a void method. 2019-04-15 17:25:34 +02:00
Matthieu Gautier
62ff207b1c
Merge pull request #126 from kiwix/zim-icon
fix Zim icon
2019-04-15 17:14:09 +02:00
luddens
7b49f08360 rename zim icon to "org.kiwix.desktop.x-zim"
flatpack doesn't export files that aren't prefixed like the app (org.kiwix.desktop)
so it has to be renamed and to be precised in the mimetype.xml file because it doesn't matched to the mimetype's name anymore
2019-04-15 17:12:54 +02:00
luddens
3cc06729d9 fix zim icon
named the mime icon like the mimetype
and installed it with the .pro file used by qt
2019-04-15 17:12:54 +02:00
Matthieu Gautier
36a5f5c22d
Merge pull request #125 from kiwix/filter-by-category
Filter by category on local files
2019-04-15 17:09:36 +02:00
luddens
684a646415 add filtering by category on local files
When a new file is downloaded, it extracts tags from xml to set m_book's taglist

rm useless 'emit(booksChanged())'

'emit(filterParamsChanged())' calls 'updateLibrary()' that calls 'emit(booksChanged())'
2019-04-15 11:51:01 +02:00
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