Commit Graph

46084 Commits

Author SHA1 Message Date
Kovid Goyal c8fa0ca9b3 ... 2022-10-26 22:06:57 +05:30
Kovid Goyal 1564fe7bf7 Allow using a "plugin_tweak" to suppress geometry debug output 2022-10-26 21:55:17 +05:30
Kovid Goyal 98e59d96b7 For some reason the splitters are wider in the editor/viewer than in the main GUI so use the actual splitterhandle pixel metric to draw the dots otherwise they look too large 2022-10-26 21:46:18 +05:30
Kovid Goyal 45f82b9676 DRYer 2022-10-26 21:24:09 +05:30
Kovid Goyal cac7d37d50 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-26 20:58:16 +05:30
Kovid Goyal 957953a212 Get rid of BasicSplitter
Move custom drawing of splitter handle into the style where it belongs.
This means all splitters now use the custom handle without needing to
sprinkle a special class everywhere.

Note that this only works when using the calibre style not the system
one. This is by design, since we do not want to override drawing of
"system" components.
2022-10-26 20:53:45 +05:30
Charles Haley 8a693530b1 As I discussed in the previous PR, this commit makes the cover adapt to the new area when the book details pane changes size. I used the same technique you used in .widgets. 2022-10-26 16:14:40 +01:00
Kovid Goyal 98811a1999 Cleanup previous PR
- Improve rendering of splitter handle using fewer, closer spaced,
  circular dots

- Fix book details splitter not being rendered correctly on first start
  when there is no saved state to restore

- Remove geometry save/restore of splitter as this is handled by
  restore_state

- Remove call to setChildrenCollapsible before any children were added,
  causing Qt to print an error to stderr

Fixes #1994065 [Enhancement Request: Details pane: Splitter between cover and details](https://bugs.launchpad.net/calibre/+bug/1994065)
2022-10-26 20:16:53 +05:30
Kovid Goyal 2fb78716f9 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-26 19:48:12 +05:30
Charles Haley e6ca2217a2 Related to Enhancement Request #1994065: Details pane: Splitter between cover and details
This is a rather invoved PR. I first looked at putting a splitter in book details, and decided to in the process fix something that has bothered me for years. On Windows in light mode I can't see the splitter handles. In dark mode I can, but I run in light mode and don't want to change. This PR adds a custom QSplitterHandle class that draws the handle depending on the palatte.

The PR includes changes for the splitters in classes I know how to test: the main UI, Pinned columns, QuickView, Edit metadata, tweak books, single download metadata, Check library, Book info, and (of course) Book details.
2022-10-25 21:19:53 +01:00
Kovid Goyal b2eb525a42 When sending by email to kindle dont include the author in the filename as amazon is currently reading the author from the file metadata but not the title. Fixes #1994136 [Send to Kindle gets wrong title](https://bugs.launchpad.net/calibre/+bug/1994136)
Roll eyes.
2022-10-25 17:24:08 +05:30
Kovid Goyal c143ece70c py3: Type of exception raised has changed leading to corrupt trailing data becoming unrecoverable. Fixes #1994103 [[Bug] mobi convert TypeError: ord() expected a character, but string of length 0 found](https://bugs.launchpad.net/calibre/+bug/1994103) 2022-10-25 10:52:35 +05:30
Kovid Goyal 5be5d2fe09 Update Army and Navy Times 2022-10-25 09:25:39 +05:30
Kovid Goyal 7f274951fa Fix #1993913 [Private bug](https://bugs.launchpad.net/calibre/+bug/1993913) 2022-10-25 08:31:18 +05:30
Kovid Goyal 3c5b4bf212 Remove linux specific centering of preferences dialog 2022-10-24 22:48:15 +05:30
Kovid Goyal 7addd2b2d4 pep8 2022-10-24 21:31:01 +05:30
Kovid Goyal 0871ba81aa Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-24 21:30:34 +05:30
Charles Haley 6374517dd4 Template debugger: Add breakpoints for python templates. On a breakpoint open a dialog displaying variables in the current frame.
Also indicate when the debugger is waiting for the 'Go' button. This fixes problems when people don't notice they have checked the Enable breakpoints box.
2022-10-24 13:48:57 +01:00
Kovid Goyal 77dc74137f ... 2022-10-23 09:13:07 +05:30
Kovid Goyal 8537ba6de2 ... 2022-10-23 09:11:47 +05:30
Kovid Goyal 92b0f3e78d ... 2022-10-22 20:09:16 +05:30
Kovid Goyal 78c399c174 Merge branch 'master' of https://github.com/cbhaley/calibre
Fixes #1993756 [Calibre 6.7.1* (source): Check library fails](https://bugs.launchpad.net/calibre/+bug/1993756)
2022-10-21 13:40:53 +05:30
Charles Haley ff90485134 Bug 1993756: Check library fails 2022-10-21 09:02:16 +01:00
Kovid Goyal cafc1b44cd Also special case @kindle.cn as apparently that is used in China
See https://bugs.launchpad.net/calibre/+bug/1993728
2022-10-21 13:02:40 +05:30
Kovid Goyal 7fda097623 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-20 21:17:52 +05:30
Charles Haley 0f822adf73 I messed up widgetForAction(). list.index() raises an exception, not returning -1. 2022-10-20 16:41:39 +01:00
Kovid Goyal 140e9cd164 yes we need right click, its much easier to use than clicking the drop-down arrow 2022-10-20 21:07:29 +05:30
Kovid Goyal 47df5f10f2 Merge branch 'master' of https://github.com/cbhaley/calibre 2022-10-20 21:06:14 +05:30
Charles Haley f2a5c18a4f Bug 1993622: Toolbar button oddities on search bar
The major change is using a new class SearchToolBar to mimic a ToolBar. This lets the BarsManager treat the SearchToolBar as a "normal" toolbar. This fixed the two problems reported in this bug report.

In addition I fixed:
- "Mark Books" to install its event listener on SearchToolBar buttons.
- SavedSearchs to find SearchToolBar buttons when using keyboard shortcuts.
- Prevent the location manager and the donate action from being added to the SearchToolBar.
2022-10-20 16:13:06 +01:00
Kovid Goyal fd8270d72c Update eenadu_ap 2022-10-20 15:12:00 +05:30
Kovid Goyal 35cb784452 See if using python instead of curl bypasses the windows CI failure 2022-10-20 11:15:51 +05:30
Kovid Goyal d924db2fcd Fix #1993591 [Get eBooks: No option to clear search history](https://bugs.launchpad.net/calibre/+bug/1993591) 2022-10-20 08:13:01 +05:30
Kovid Goyal 851df00a06 unique_name should not be translated
Fixes #1993574 [Calibre 6.7.1* (source): Virtual library madness](https://bugs.launchpad.net/calibre/+bug/1993574)
2022-10-20 07:46:02 +05:30
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