1362 Commits

Author SHA1 Message Date
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
Kelson
79efd58e1b
Merge pull request #1116 from kiwix/Issue#904-block-non-zim-external-requests
Block External Content from Zim Web Pages
2024-06-01 14:52:39 +02:00
ShaopengLin
f8d646db40 Disables external resource fetching
Webpages blocks all requests with Url not starting with "zim://", i.e. native to the Zim file.
2024-06-01 14:47:22 +02:00
Kelson
e3745f0113
Merge pull request #1117 from kiwix/qt_6.7
Do not use removed `setHasBorderInFullScreen` with qt >= 6.0
2024-05-27 15:57:39 +02:00
Matthieu Gautier
456c58b7c8 Do not use removed setHasBorderInFullScreen with qt >= 6.0
`QWindowsWindowFunctions` class has been removed in Qt 6.

See https://doc-snapshots.qt.io/qt5-5.15/windows-issues.html vs
https://doc-snapshots.qt.io/qt6-6.2/windows-issues.html

I haven't found more specific documentation.
2024-05-23 17:11:34 +02:00
Kelson
78cfc4ce83
Merge pull request #1111 from ShaopengLin/Issue#1032-add-context-for-search-filter
Added Context for Filter Placeholder Text Translation
2024-05-22 13:31:53 +02:00
ShaopengLin
e71dd85ca0 Added Context for Missing clauses and changed text for filters
Changed the text for filters from "Filter <type>" to "Filter by <type>". Added contexts that are in en.json but not present in qqq.json.
2024-05-22 13:31:44 +02:00
Kelson
332f38141b
Merge pull request #1109 from kiwix/full_line_highlighting
Proper highlighting of library items
2024-05-22 10:41:49 +02:00
Veloman Yunkan
aa256d6e1e Text remains readable on selected library entry
Before this change a library entry having keyboard focus (selected with
tab and up/down keys) was not readable since the text was displayed in
white colour on light blue background.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
b0ce8c583f Full length library entry line separator
Now the library entry line separator extends all the way to the right
(into the book open/download control column).

This is achieved by having QStyledItemDelegate::paint() execute before
ContentManagerDelegate::paintBookState() and the latter must take care
to not paint over the line separator painted by the former.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
4e166398b5 Suppressed the focusable widget between the book icon and name 2024-05-22 10:56:48 +04:00
Veloman Yunkan
b91712422b ContentManagerModel accesses ContentManager directly
Indirect access from ContentManagerModel to ContentManager (via
KiwixApp) contained a race condition that could lead to a crash.

Here is the call chain:

- In KiwixApp::init() the KiwixApp::mp_manager data member is initialized
  as follows:

    mp_manager = new ContentManager(&m_library, mp_downloader);

- ContentManager's constructor creates the model and the view:

    mp_view = new ContentManagerView();
    managerModel = new ContentManagerModel(this);
    updateModel();
    auto treeView = mp_view->getView();
    treeView->setModel(managerModel);
    treeView->show();

- This starts a cascade of asynchronous events that will eventually
  result in ContentManagerModel::sort() being executed. The latter has
  to call ContentManager::sortBy() and if it does so indirectly via
  `KiwixApp::getContentManager()` before the constructor of
  ContentManager has completed (and KiwixApp::mp_manager has been
  assigned to) a crash is imminent.

This commit eliminates that issue.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
83d72d3b5a Library line highlighting includes the last column
- made the download ring a little darker so that it doesn't become
  invisible when highlighted

- changed the background color of the button for the Open/Download actions
  (drawn in the last column) from white to transparent so that it
  doesn't look ugly on the highlighted line.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
301efe2b7a Longer library line separator
Now the library line separator extends to below the collapse/expand
control and highlighting on mouse hover covers the latter too.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
24d6ac7162 Got rid of custom painting of the book thumbnail
Now ContentManagerModel returns for 0th column an icon object that can
be painted by `QStyledItemDelegate::paint()` correctly (albeit in a
slightly less indented position).

As a side-effect of this minor improvement of the design, the thumbnail
column is included in highlighting on mouse hover.
2024-05-22 10:53:26 +04:00
Kelson
a529627449
Merge pull request #1079 from sgourdas/feature/reading_list
Library list pinning behavior
2024-05-21 18:11:55 +02:00
sgourdas
3b895c6f69 Library list pinning behavior 2024-05-21 18:11:35 +02:00
Kelson
ba6fee9d3f
Merge pull request #1110 from ShaopengLin/Issue#1100-add-preview-button
Added ContextMenu Button for Previewing Online Books
2024-05-18 21:05:52 +02:00
ShaopengLin
0c865181c8 Added ContextMenu button for Book Preview
Added action to open preview of an online book in native web browser. The option is available for books with states  Online, Downloading, and Paused.
2024-05-18 14:37:45 -04:00
ShaopengLin
3b2019bb94 Created method to generate remote library url
Refactored existing file static function makeHttpUrl to a member function that retrieves the remote library url from the request manager. Will be used for implementing the preview functionality.
2024-05-18 14:30:56 -04:00
Kelson
a394efcda8
Merge pull request #1058 from sgourdas/feature/import_settings
Import file path memorization
2024-05-12 15:05:30 +02:00
vinurk
bee0c20de5 Import file path memorization 2024-05-12 13:10:30 +03:00
Kelson
921bc729a6
Merge pull request #1060 from ShaopengLin/Issue#832-fix-book-mark
Fix #832: Seperated Bookmark Button from Search Icon
2024-05-11 13:01:41 +02:00
ShaopengLin
b49d6ec8ca Updated styles for the QToolBar
Redefined styles sheets for new widgets. Increased button svg size since QToolButton doesn't increase button size to be larger than source.
2024-05-11 13:00:50 +02:00
ShaopengLin
3c6454d8f4 Connected actions to Bookmark Button
BookmarkButton is now a QToolButton to better work with actions. Now clicks can modify menu text displays and menu displays can simulate clicks.
2024-05-11 13:00:50 +02:00
ShaopengLin
fb1d5ea25a Create Action and Shortcut for Bookmark
Created a ON-OFF action for Bookmark and added in Edit Menu Actions. Assigned shortcut Ctrl + D, which the Donation shortcut is now Ctrl + SHIFT + D. Action disabled for non-Zim tabs
2024-05-11 13:00:50 +02:00
ShaopengLin
c4c3367c78 Seperate SearchButton (now BookmarkButton)from LineEdit
Renamed SearchButton to BookmarkButton since it no longer has the search icon. Moved BookmarkButton to the right side of SearchBar
2024-05-11 13:00:50 +02:00
ShaopengLin
ea0a682af9 Seperate QLabel from SearchButton to SearchBar
Since we will be seperate search icon from bookmark button, we remove the logic in SearchButton and simply put an equivalent QLabel in SearchBar.
2024-05-11 13:00:50 +02:00
ShaopengLin
9f1c8ef497 Refactor SearchBar to QToolBar
SearchBar becomes QToolBar instead of QLineEdit. The previous LineEdit is now a child of SearchBar
2024-05-11 13:00:50 +02:00
Kelson
ee3a2be2e8
Merge pull request #1101 from kiwix/Route_de_Lausanne_107_Bourg-en-Lavaux
Fixed detection of clicks on download control buttons
2024-05-11 12:59:17 +02:00