1478 Commits

Author SHA1 Message Date
Matthieu Gautier
18f0e07116
Merge pull request #164 from kiwix/usb-flash-drive
choose the library.xml file in the binary's directory if it exists
2019-06-12 14:43:20 +02:00
luddens
19577ea924 Use the library.xml file of the binary directory if there is one
Check if there is a library.xml file in the binary directory, in this case,
set the m_libraryPath with the current binary path, otherwise set with the
default data directory. This member variable is used every time we want to
change the library's content.
2019-06-12 13:58:23 +02:00
Matthieu Gautier
8cdfe50033
Merge pull request #166 from kiwix/open-article-enter
Auto completion search bar
2019-06-12 10:06:13 +02:00
luddens
c8ace2fb7e re-use openCompletion method
Re-use the connect with openCompletion method that works fine to handle mouse
click and enter key press to open article
Remove the openTitle method that is no longer usefull.
2019-06-12 10:05:19 +02:00
luddens
18d123bcfb Set the completer case insensitive
Set the completer case insensitive to match with the suggestion's list
2019-06-12 10:05:19 +02:00
Matthieu Gautier
f47d8f2243
Merge pull request #174 from kiwix/download-dialog
add alert if there is not enough storage to download
2019-06-12 10:03:13 +02:00
luddens
6f10585d7f add alert if there is not enough storage to download
Check the available storage before the start of a download thanks to
QStorageInfo::bytesAvailable(), if the book size is bigger than this value
an alert message appears.
2019-06-12 10:02:00 +02:00
Matthieu Gautier
7c1ff57614
Merge pull request #173 from kiwix/fix-random-crash
Fix random crash
2019-06-11 15:49:09 +02:00
luddens
cb9707a511 Fix random crash
The buffers, where reply of a request is send, were deleted when they were about
to close but it makes the app crash, they have to be deleted when the request
object is deleted
2019-06-11 10:54:12 +02:00
Matthieu Gautier
d809533ee8 New version beta5 2.0-beta5 2019-05-29 12:11:49 +02:00
Matthieu Gautier
aa6a61ecd0
Merge pull request #155 from kiwix/delete-confirmation
add a confirmation message before deleting
2019-05-28 17:32:52 +02:00
luddens
2436248d22 add a confirmation msg before cancelling download 2019-05-28 17:32:20 +02:00
luddens
df4034ee09 add a confirmation message before deleting 2019-05-28 17:32:19 +02:00
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