1291 Commits

Author SHA1 Message Date
Veloman Yunkan
e42a83dae6 Simplified checking of the click location 2024-07-19 07:12:43 +02:00
Veloman Yunkan
17f3692669 Moved error detection to DownloadManager 2024-07-19 07:12:43 +02:00
Veloman Yunkan
cdd5353859 ContentManagerError -> KiwixAppError
Also introduced `showErrorBox()`
2024-07-19 07:12:43 +02:00
Veloman Yunkan
c7295fbc05 Moved code across ContentManager::downloadBook() overloads 2024-07-19 07:12:43 +02:00
Veloman Yunkan
b43607a919 Got rid of ContentManager::downloadStarted() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
4f6b0f1bab ContentManagerModel::{removeDownload -> setDownloadState}() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
a7fb85b8b0 Got rid of unjustified code 2024-07-19 07:12:43 +02:00
Veloman Yunkan
04a6d6c05a Moved the check for availability of downloading functionality 2024-07-19 07:12:43 +02:00
Veloman Yunkan
f8a140404e Got rid of ContentManager::startDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
6bbbe7dafc Made DownloadManager::mp_downloader private 2024-07-19 07:12:43 +02:00
Veloman Yunkan
fffe7586b4 Moved DownloadManager code across .cpp files 2024-07-19 07:12:43 +02:00
Veloman Yunkan
8fbb867270 DownloadManager::startDownloadUpdaterThread()
Moved the download updater thread from ContentManager to
DownloadManager.
2024-07-19 07:12:43 +02:00
Veloman Yunkan
e5f4a4b55f Made DownloadManager::m_downloads private 2024-07-19 07:12:43 +02:00
Veloman Yunkan
efddb36fef Made DownloadManager::Downloads private 2024-07-19 07:12:43 +02:00
Veloman Yunkan
e6c2effa0f DownloadManager::getDownloadState() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
be017b7e2c DownloadManager::removeDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
88eb29f791 DownloadManager::cancelDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
28c52e7884 Fixed cancellation of a paused download after app restart
Before this fix when kiwix-desktop was launched with a paused download
inherited from a previous session, cancelling that download didn't
remove the download files (incomplete .zim and .zim.aria2 files) because
the path of a paused Aria2 download is not available until it is
resumed. Now the path of a book being downloaded is taken from the
library (thanks to the previous commit).
2024-07-19 07:12:43 +02:00
Veloman Yunkan
77ee3a2936 Library maintains "correct" paths of books being downloaded
When a book is downloaded via a metalink URL the fake path (with a
".beingdownloadedbykiwix" suffix appended to it) recorded for it in
the library could not in general be used to obtain the real name (and,
hence, path) of the ZIM file. Now the book path is "corrected" as soon
as the file name becomes available.
2024-07-19 07:12:43 +02:00
Veloman Yunkan
b5e3c30d46 DownloadManager::startDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
f0e91f11f9 DownloadManager::resumeDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
24cce79c1e DownloadManager::pauseDownload() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
1354363bfc {Content->Download}Manager::updateDownloads()
One subtlety of this refactoring is that
ContentManager::downloadDisappeared() is now NOT called from
updateDownloads() directly/synchronously but is invoked via a signal
and is thus executed in the main thread.
2024-07-19 07:12:43 +02:00
Veloman Yunkan
300873a301 Dropped the QObject param from ContentManager's ctor 2024-07-19 07:12:43 +02:00
Veloman Yunkan
7d36f046d8 {Content->Download}Manager::restoreDownloads() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
ff48029f01 {Content->Download}Manager::getDownloadInfo() 2024-07-19 07:12:43 +02:00
Veloman Yunkan
bfad2291c8 DownloadManager starts robbing ContentManager
DownloadManager stole from ContentManager its two data members
mp_downloader and m_downloads.
2024-07-19 07:12:43 +02:00
Veloman Yunkan
16b89a54e3 Relocated ContentManagerModel::Downloads
A new class DownloadManager was introduced as a new home for
ContentManagerModel::Downloads, but it is going to grow into a more
serious unit of code that will consolidate most functionality
related to download management.
2024-07-19 07:12:43 +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
Kelson
57f475f04a
Merge pull request #1144 from kiwix/action-fixes
Fix and update a few actions
2024-07-19 07:11:58 +02:00
Emmanuel Engelhart
8cee30a391
Fix and update a few actions 2024-07-18 11:14:08 +02:00
Veloman Yunkan
1623d8729c
Merge pull request #1125 from sgourdas/feature/settings_dir
Download path setting QOL improvements
2024-06-25 12:23:23 +04:00
sgourdas
418309336a Download path setting QOL improvements
Download path shown in settings now has a tooltip, truncation and copy functionalities
2024-06-25 11:18:16 +03:00
Kelson
1cad7057b2
Merge pull request #1120 from kiwix/Issue#1073-remember-current-tab-from-prev-session
Remembers Previous Current Tab Index From Last Session
2024-06-17 15:20:25 +02:00
ShaopengLin
65fe4b4997 Restores the previous current tab index on startup
Current tab index will be saved now and will be reset with respect to the reopened tabs upon startup
2024-06-16 17:20:10 -04:00
ShaopengLin
9bd598b00e Saves settings tab for reopen
Settings tab is saved to be reopened on startup.
2024-06-16 17:13:10 -04:00
ShaopengLin
60cc7f1dde Added restoration of blank tab
Blank tab is now being tracked for tab restoration on startup.
2024-06-16 17:03:16 -04:00
ShaopengLin
a179749d03 Reverted error handling of tab restoration
The change in #1048 prevented opening of blank tab and urls that are no longer valid. Now, we will need to open them as well, as we will need the exact number of tabs to reopen in order to correctly restore current tab index.
2024-06-14 23:31:31 -04:00
Kelson
6ed46b0738
Merge pull request #1130 from kiwix/use_new_ipv6_api
Use new libkiwix API to get network interfaces
2024-06-14 11:16:26 +02:00
Matthieu Gautier
b8a22bb5dc Use new libkiwix API to get network interfaces
Fix #1129
2024-06-13 17:12:47 +02:00
Kelson
b59155aeb0
Merge pull request #1115 from ShaopengLin/Issue#1112-fix-bookmark-description
Fixed Whiteouts of Book Descriptions on Hover
2024-06-11 21:02:37 +02:00
ShaopengLin
fa2d42554d Description row fits to content when screen size change
Already expanded description row will now adjust with respect to any window size changes to fit the content.
2024-06-11 14:50:24 -04:00
ShaopengLin
ef7645ec67 Description row fits now content on expand
The description row height fits the text context when expanded.
2024-06-11 14:49:38 -04:00
ShaopengLin
e63561161b Fixed hover misbehaviour over zim description
Clicking and hovering the description dropdown of zim no longer whites out. Replaced manual drawing with default handling as it is no longer necessary.
2024-06-11 14:49:38 -04:00
ShaopengLin
bc1107b076 Introduce method to decide whether index contain description
index.parent().isValid replaced with static function isDescriptionNode.
2024-06-11 14:49:38 -04:00
ShaopengLin
2f4a36f0ff Refactored ContentManager click signal handler
Handler is now a slot function instead of a lambda.
2024-06-11 14:49:38 -04:00
Kelson
a4194cebbf
Merge pull request #1126 from kiwix/Issue#837-remember-window-size-and-position
Window position and size is remembered
2024-06-11 08:11:28 +02:00
ShaopengLin
495e8e5db5 Window position and size is remembered
Position and size of the window is saved and restored on startup.
2024-06-07 19:05:01 -04:00
Kelson
324b1e0ab4
Merge pull request #1122 from aryanA101a/main
Fix to adapt libkiwix IPv6 related API changes
2024-06-01 15:00:13 +02:00
Aryan Arora
89c3086914 fix for breaking changes in libkiwix api 2024-06-01 14:53:10 +02:00