Commit Graph

46051 Commits

Author SHA1 Message Date
Kovid Goyal f810bb7974 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-20 07:41:54 +05:30
Charles Haley 83c00e877f Re:
The buttons on the search bar dont behave like they do in the toolbars.
    Clicking on a button with a menu pops up the menu but does not perform
    the action. And right clicking on them has no effect. This will be
    confusing and a source of bug report noise. So maybe if the action has a
    menu, have it open on right click only, depending on popup_type in the
    action definition.

This problem arose because my code for keyboard shortcuts in Saved searches and Manage categories didn't work if the buttons on the search toolbar had menus. The popup menu appeared in some seemingly random spot. Of course it wasn't random, but ... I fixed it by changing the button to pop up the menu. That caused the behavior change.

I fixed this by removing the shortcuts from the main actions of Saved searches and Manage categories. Instead I used the API you provided in InterfaceAction to create menu items with shortcuts. With the change the 'main' qaction acts like it should, triggering the action for the button pressed. Right-click shows the menu as does clicking the down arrow.

Using a shortcut triggers the hidden menu action, which causes the code to search for any convenient place to put the menu. FWIW: this is a much better implementation. The 'hunt around' code only executes when the user presses a shortcut.

As a consequence existing shortcuts for Manage categories are lost because the shortcut name changed. Oh well. I doubt there are many, probably not any, calibre users who have defined a keyboard shortcut. They haven't had long -- only a release or two.
2022-10-19 21:32:46 +01:00
Charles Haley 288212f016 Update the search bar when closing the search preferences window. 2022-10-19 21:12:59 +01:00
Charles Haley b2e43c4101 Bug #1993574: virtual libraries don't work 2022-10-19 20:46:23 +01:00
Kovid Goyal 005fae39c2 pep8 2022-10-19 20:48:54 +05:30
Kovid Goyal 49a2150b08 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-19 20:48:24 +05:30
Charles Haley 0a6d1b4b4a Sorry, I forgot the separator. 2022-10-19 15:00:59 +01:00
Kovid Goyal db2bf66f97 Uf there is only one screen of matching size, use it 2022-10-19 17:00:17 +05:30
Kovid Goyal de88d2fd39 Use the new restore geometry code 2022-10-19 16:55:42 +05:30
Kovid Goyal 0d8c25f89e allow getting legacy geometry more flexibly 2022-10-19 16:31:53 +05:30
Charles Haley f20e426efb Make tools on the search bar customizable.
Given that the saved searches action and the saved search button on the search bar now do the same thing, it seems reasonable to allow the user to choose whether the saved search button shows. I went from there to "Why not allow adding other buttons to the bar?" There is a lot of available real estate on that bar. This commit does that using a new toolbar in preferences / toolbars.

I didn't use a QToolBar, instead constructing a 'classic' toolbar in an QHBoxLayout. That gave me more control over the look and placement. And also, I had no end of trouble trying to work through how to use a QToolBar that isn't attached to a QMainWIndow.

In the process I removed the legacy Saved Search combo box, its associated buttons, and the tweak. I am sure there are some people still using the years-old interface and that they will complain. I can accept that, given that the button is better in almost every way.
2022-10-19 11:54:41 +01:00
Kovid Goyal 3335ebafa3 ... 2022-10-19 08:13:48 +05:30
Kovid Goyal a63071b4fd Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-18 20:22:46 +05:30
Charles Haley ac7c20bf99 Fix manage categories and saved searches to allow assigning a shortcut without provoking a conflict. 2022-10-18 14:55:36 +01:00
Kovid Goyal 718cdffadd ... 2022-10-18 17:33:00 +05:30
Kovid Goyal 15d41840f5 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-18 17:31:37 +05:30
Charles Haley 70d5c98782 Several things:
- Add some "manage" actions to the saved searches menu
- Make the saved search button on the search toolbar and the saved searches action use the same menu
- Change some of the icons to use the existing dedicated saved search icons.
- Display the menu under a toolbar action or a menu action if either exists. NB: I don't know if this works on a Mac or Linux
- Make manage categories and saved searches use the same code to place the menu on the screen.
2022-10-18 12:22:45 +01:00
Kovid Goyal 6d2ea74a2c Use old Qt saved geometry data if new data is not available 2022-10-18 15:13:18 +05:30
Kovid Goyal 0f05cf7655 More work on geometry restoration 2022-10-18 14:13:34 +05:30
Kovid Goyal e53948ca39 No shortcut is indicated by None not '' 2022-10-18 11:13:27 +05:30
Kovid Goyal 0fbbc255b3 Debug information about screens on first restore 2022-10-18 09:16:40 +05:30
Kovid Goyal cd8308765a ... 2022-10-18 08:09:20 +05:30
Kovid Goyal 57a24aa767 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-17 21:48:22 +05:30
Charles Haley 096579e13b Formatter: Quick pass over messages and documentation. 2022-10-17 16:51:51 +01:00
Kovid Goyal a7eb71c343 ... 2022-10-17 21:05:54 +05:30
Kovid Goyal 37a8a403e9 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-17 20:44:35 +05:30
Charles Haley 7ec6619a0e Add an action to show saved searches in a menu.
The action can be triggered by a toolbar button, a shortcut, or on the booklist context menu.
2022-10-17 16:04:37 +01:00
Kovid Goyal dd8d3bfeef Cleanup previous PR 2022-10-17 20:11:16 +05:30
Kovid Goyal 8b270da20f Merge branch 'python_template_introspection' of https://github.com/un-pogaz/calibre 2022-10-17 19:58:34 +05:30
un-pogaz 02b2811892 chaley recommandation 2022-10-17 14:22:19 +02:00
Kovid Goyal 15b12738f8 Merge branch 'typos' of https://github.com/luzpaz/calibre 2022-10-17 09:52:29 +05:30
luz paz 424690e206 Fix various typos
Found via `codespell -q 3 -S./Changelog.*,./resources/dictionaries  -L alo,ans,pard,ro`
2022-10-16 23:33:44 -04:00
Kovid Goyal 1de95a2897 ... 2022-10-16 21:05:55 +05:30
Kovid Goyal 502cdadcd0 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-16 20:06:58 +05:30
Charles Haley b4acdab630 Permit passing a python template context object into the template tester. 2022-10-16 15:31:07 +01:00
Kovid Goyal aa4e61f744 Cleanup previous PR 2022-10-16 19:27:22 +05:30
Kovid Goyal 41e3770142 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-16 19:27:16 +05:30
un-pogaz e7cc30b3a9 add doc 2022-10-16 15:01:39 +02:00
un-pogaz 983bd742ab rearrange special function 2022-10-16 15:01:11 +02:00
Charles Haley f947e0df48 Two performance improvements related to large libraries.
See https://www.mobileread.com/forums/showthread.php?p=4265937#post4265937 for an explanation.

The "exotic" part is changing _map_filtered to a property with a setter. The setter constructs a dict {book_id:row}. view.id_to_index() uses the dict instead of .index on the list.
2022-10-16 13:24:26 +01:00
un-pogaz 62cda3ea2f fix None args to empty 2022-10-16 12:02:17 +02:00
Kovid Goyal 6c9551e570 Clean up previous PR 2022-10-16 14:04:11 +05:30
Kovid Goyal de01331f98 Merge branch 'fix_unlock_tab' of https://github.com/un-pogaz/calibre 2022-10-16 14:01:03 +05:30
Kovid Goyal 29dd4d718f Merge branch 'handelsblatt-oct2022' of https://github.com/aimylios/calibre 2022-10-16 13:44:19 +05:30
un-pogaz 2e829adf9f fix "unlock tabs" no close button for 'all book' 2022-10-16 10:10:54 +02:00
Aimylios 0d5fd6d260 Update Handelsblatt 2022-10-16 09:58:37 +02:00
Kovid Goyal 3beb835042 Use the correct style when custom painintg the icon 2022-10-16 10:36:10 +05:30
Kovid Goyal 3ff4979673 Book list: Fix incorrect rendering of yes/no icons when they are configured to have only two values. Fixes #1993051 [Improper display of custom column](https://bugs.launchpad.net/calibre/+bug/1993051) 2022-10-16 10:32:23 +05:30
Kovid Goyal 41668689d5 Assume all future Nooks are going to use NOOK as well 2022-10-16 09:03:01 +05:30
Kovid Goyal 480b9f44d1 Nook driver: Send books to the NOOK folder for the 2021 Nook model as well. Fixes #1990730 [books saved in wrong directory on nook 4e](https://bugs.launchpad.net/calibre/+bug/1990730) 2022-10-16 08:59:25 +05:30