104 Commits

Author SHA1 Message Date
Veloman Yunkan
aa4ce594b8 Revert "Custom Paint Suggestion Icon&Text Spacing"
This reverts commit 651c88be9f3bbcb30708c48138e7842a5ff46493.
2024-10-24 21:13:04 +04:00
ShaopengLin
651c88be9f Custom Paint Suggestion Icon&Text Spacing
Qt does not provide css style or API for modifying icon and text spacing in QTreeView. This is a long issue in buttons as well, as Qt draws icon and texts instead of having them as widgets that can be applied styles.
2024-10-23 16:29:17 -04:00
ShaopengLin
c5f4c4df88 Introduce src/css_constants.h
Effort to reduce css value dependency
2024-10-23 15:42:13 -04:00
ShaopengLin
6e1e0b8c60 Introduce suggestionlistmodel.{h, cpp}
Allow future customizing of suggestions.
2024-10-21 14:16:15 -04:00
sgourdas
10f3f5cfbb Fix network share launch popup 2024-09-23 16:46:28 +00:00
Veloman Yunkan
482e4c6dfd Fixed CI build
In CI build, dependencies are put in the build install location rather than
in the system libs directory, hence that path must be included in the
search for shared libraries.

The problem seems to have been triggered by recent change in the
libkiwix.pc pkg-config file which resulted in the version of some
of libkiwix dependencies (recorded in libkiwix.so) being bumped up.
As a result, previous/older versions of those dependencies embedded in
the CI build docker image
(ghcr.io/kiwix/kiwix-build_ci_focal:2024-06-03) no longer matched the
requirements of libkiwix.so, whereas the up-to-date versions of those
dependencies (that are downloaded during each build procedure) were not
used because they were not in the search path.
2024-09-23 17:59:13 +04:00
Veloman Yunkan
268363f2fd libkiwix now identifies itself as libkiwix 2024-09-23 17:59:13 +04:00
Emmanuel Engelhart
67ba3d059d
Requires libkiwix14+ 2024-09-01 16:07:09 +02:00
Matthieu Gautier
55b058d10e Fix static linking on Windows
On Windows, static libraries are using "foo.lib" naming.
On Unix, they are in the form of "libfoo.a"
On Windows, "foo.lib" can also the definition of symbols in a foo.dll.
So you can link to "foo.lib", whatever you are doing static or dynamic linking and you are good.
However, meson is always creating static library as "libfoo.a"
'to avoid a potential name clash with shared libraries which also generate import libraries with a lib suffix.' [1]
On top of that, qmake is replacing all `-lfoo` in LIBS by `foo.lib` (on Windows).
So at the end, we try to link with `foo.lib` but we have `libfoo.a`
Solution could be :
- Rename `libfoo.a` to `foo.lib`, but it would mean modify deps libraries on the FS
- Don't use LIBS and directly set QMAKE_LFLAGS but we would have to handle different command line option format
  between g++/clang and msvc
- Update meson build system of each projet to explicitly set the library naming.
- Replace `-lfoo` with absolute path to static library. This is what meson is doing internally and what
  we are doing here

Any `-lfoo` is replace with absolute path to static library (`libfoo.a`) if we found one.
Else, it is keep unchanged.

[1] https://mesonbuild.com/Reference-manual_functions.html#library_name_suffix
2024-08-22 10:53:33 +02:00
Matthieu Gautier
adb948756b Link with User32 library on Windows 2024-08-21 10:40:48 +02:00
Veloman Yunkan
c245a5669a Enter downloadmanagement.{h,cpp}
Moved DownloadInfo and DownloadState into new files
downloadmanagement.{h,cpp}.
2024-07-19 07:12:43 +02:00
Matthieu Gautier
d896c17096 Remove -Werror on Windozs.
`-Werror` make compilation fails on Windows.
2024-04-15 10:22:41 +02:00
sgourdas
54a3f2596c Use CONFIG nostrip on WSL due to illegal strips 2024-04-07 20:23:58 +02:00
Adam Lamar
fc67c0d76c Fix warnings and enable Werror 2024-04-01 15:46:59 +00:00
Adam Lamar
d842a288f7 Initial Qt6 support 2024-03-01 22:12:06 +00:00
Emmanuel Engelhart
ae32843574 New libzim/libkiwix version reqs. in kiwix-desktop.pro 2024-02-27 20:13:22 +01:00
Emmanuel Engelhart
aeaa570786
Requires libkiwix13 2023-11-19 14:26:34 +01:00
Nikhil Tanwar
b3a0542ba7 Navigate through choices using up,down keys
This change allows one to navigate through the choices using up and down arrow keys from keyboard
Enter/Return key can be pressed to select the current item
2023-10-04 16:53:04 +02:00
Nikhil Tanwar
e6cb442dc6 New widget: KiwixChoiceBox
This change adds a new widget called KiwixChoiceBox
The design inspiration is taken from here: https://harvesthq.github.io/chosen/#multiple-select
setType() takes a string to put on the label
We can add possible choices using the setSelections() method
2023-10-04 16:53:04 +02:00
Matthieu Gautier
fd46760c27 Move to c++17.
All our compilers should handle c++17. Let's move on.
2023-09-29 10:45:39 +02:00
Nikhil Tanwar
5da7609cde So long, static_content.h/cpp
Removed references to static_content, now that it has been replaced by libkiwix API
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
bf1c317f10 Split view nodes into RowNode and DescriptionNode
Splitted the views into RowNode and DescriptionNode for consistency
RowNode represents one row with thumbnail, name, data, size, etc.
DescriptionNode shows the description
2023-07-31 20:03:56 +05:30
Nikhil Tanwar
797aceebbe Hide sort indicator for icons column, put it on left for other columns
created ContentManagerHeader, inherited from QHeaderView, to implement not showing the sort indicator for first column.
Changed sort indicator position to left of text
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
3abb4b4b4c Loader widget is shown while catalog is being downloaded
Added a new widget (KiwixLoader) which is displayed when the catalog is being downloaded.
2023-07-28 17:45:13 +05:30
Nikhil Tanwar
d90158b789 Confirmation dialog box for delete book and cancel download
Added a new custom dialog box for confirmations.
Currently, it popups when a book is deleted or a download has to be cancelled
2023-07-28 17:43:10 +05:30
Nikhil Tanwar
ff5f022cd6 Icon downloader util for all files view
Added an icon downloader to display icons for remote library.
While the icons are being downloaded, a placeholder icon is shown.
2023-07-28 17:41:15 +05:30
Nikhil Tanwar
20f082f73b Search books function
Added a search book function in the library
2023-07-28 17:13:56 +05:30
Nikhil Tanwar
1f33d86340 Delegate for ContentManagerView
Added a new delegate to style the view.
Added the following things:
1. Button styling and click to open book
2. Increased size of rows
2023-07-28 17:03:11 +05:30
Nikhil Tanwar
e5c8a31ec0 Basic model implemented for TreeView
This implements a basic model for QTreeModel
Currently, it only shows 1 row with some random data.
In future commits, data from ContentManager::getBookInfos will be taken
2023-07-24 13:24:16 +05:30
Matthieu Gautier
7cd4a027db New version 2.3.1
* Fix the AppImage packaging. Now published AppImages work correctly on recent
   distrubution (@mgautierfr #905)
 * Improve zim file picker (@kelson42 #886)
 * Do not show ServiceWorker zim file from the remote catalog (@kelson42 #887)
2022-11-30 18:05:57 +01:00
Matthieu Gautier
df7f657a61 New version 2.3.0 2022-09-07 16:58:35 +02:00
Matthieu Gautier
0629251ad2 Use last version of libzim (8.0.0) 2022-09-07 16:58:13 +02:00
Matthieu Gautier
69a7277354 New version 2.2.2 2022-06-22 15:51:54 +02:00
Matthieu Gautier
b6934d707b kiwix-desktop now need libkiwix >= 11.0.0 2022-06-16 14:39:21 +02:00
Matthieu Gautier
b692debeab New version 2.2.1 2022-03-11 17:16:00 +01:00
Matthieu Gautier
27bd61c62f New version 2.2.0 2022-03-04 16:39:08 +01:00
Vitaly Zaitsev
e9855d7aeb
Fixed SVG icon installation.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2022-02-02 18:47:40 +01:00
Matthieu Gautier
8dc1984f0b Check for the version of kiwix and libzim. 2022-01-20 14:38:59 +01:00
Matthieu Gautier
7f5fe877f9 New version 2.1.0 2022-01-20 14:38:59 +01:00
Alexander Sashnov
9bb32e19f1 Fixes #525 Kiwix icon low resolution
Set white background to kiwix-desktop.svg, include it into .deb
2022-01-12 14:46:54 +07:00
Han Young
bace78ae1a add ui to qmake 2021-10-19 05:09:07 +02:00
Han Young
93854011eb port settings to Qt Widget 2021-10-19 05:09:07 +02:00
Pierre Neidhardt
a0d3b106b1
Fix printsupport in .pro file (#557)
This may be required to avoid errors like:

    src/kiwixapp.cpp:12:10: fatal error: QPrinter: No such file or directory
2020-12-12 16:28:53 +01:00
Matthieu Gautier
bd54ad9d79 New version 2.0.5 2020-11-17 16:40:45 +01:00
Kunal Mehta
89a5e7994e Fix version
The PPA integration will look at this version to determine what it's
packaging.
2020-07-28 21:45:45 -07:00
Matthieu Gautier
3193889dad Do not call date and git describe for reproducible build.
`GIT_VERSION` and `BUILD_DATE` are only displayed to the user.
It was useful pre-release to identify the exact version of the build in
bug report.

Now than, we are now releasing kiwix-desktop, we don't need the
`BUILD_DATE` and we must use the exact version instead of the git version.

Fix #476
2020-07-06 16:04:18 +02:00
luddens
efbfc3374e fluid suggestions list UX
- add a delay before searching suggestions
  A timer of 100ms is started each time the text is edited, if the timer
  time-outs the suggestion's search is executed.

- foreach search a worker with a token is launched in another thread
  Once the search is done, the worker sends the suggestions list and the corresponding urls list to the main thread.
  if the token of the worker matches with the last token used, the main thread displays the suggestions.
2020-06-30 16:22:30 +02:00
luddens
54d181fc43 add content type filter
The ContentTypeFilter Class is a custom QCheckBox.
These are stored in a QList that is sended to the ContentManager each time they are clicked.
The ContentManager sets the acceptedTags according to the state of the ContentTypeFilters
The "All" button resets the filters
2020-05-27 16:21:27 +02:00
luddens
03796affbe implement the qtsingleapplication solution 2020-05-12 06:20:20 +02:00
Matthieu Gautier
475061296b Remove old configuration of translation system. 2020-04-29 17:25:10 +02:00