From d9a6a0295cc147333329e288d1903d717240a955 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Jun 2011 12:01:02 -0600 Subject: [PATCH 1/3] Fix #801266 (howto suggest original translation changes) --- src/calibre/customize/builtins.py | 2 +- src/calibre/translations/calibre.pot | 436 +++++++++++++-------------- src/calibre/utils/mem.py | 2 + 3 files changed, 221 insertions(+), 219 deletions(-) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index ce7297ef9a..e3b7bef5d8 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -875,7 +875,7 @@ class ActionCopyToLibrary(InterfaceActionBase): class ActionTweakEpub(InterfaceActionBase): name = 'Tweak ePub' actual_plugin = 'calibre.gui2.actions.tweak_epub:TweakEpubAction' - description = _('Make small twekas to epub files in your calibre library') + description = _('Make small tweaks to epub files in your calibre library') class ActionNextMatch(InterfaceActionBase): name = 'Next Match' diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index c371179704..5f080cf28d 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: calibre 0.8.6\n" -"POT-Creation-Date: 2011-06-22 18:55+MDT\n" -"PO-Revision-Date: 2011-06-22 18:55+MDT\n" +"POT-Creation-Date: 2011-06-23 12:00+MDT\n" +"PO-Revision-Date: 2011-06-23 12:00+MDT\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" @@ -150,9 +150,9 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/library/models.py:1193 #: /home/kovid/work/calibre/src/calibre/gui2/library/models.py:1196 #: /home/kovid/work/calibre/src/calibre/gui2/library/models.py:1281 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:82 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:212 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:231 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:83 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:221 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:240 #: /home/kovid/work/calibre/src/calibre/gui2/metadata/bulk_download.py:119 #: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:362 #: /home/kovid/work/calibre/src/calibre/gui2/metadata/single_download.py:161 @@ -395,7 +395,7 @@ msgid "Copy a book from one calibre library to another" msgstr "" #: /home/kovid/work/calibre/src/calibre/customize/builtins.py:878 -msgid "Make small twekas to epub files in your calibre library" +msgid "Make small tweaks to epub files in your calibre library" msgstr "" #: /home/kovid/work/calibre/src/calibre/customize/builtins.py:883 @@ -833,85 +833,85 @@ msgstr "" msgid "Communicate with S60 phones." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:47 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:46 msgid "

If you do not want calibre to recognize your Apple iDevice when it is connected to your computer, click Disable Apple Driver.

To transfer books to your iDevice, click Disable Apple Driver, then use the 'Connect to iTunes' method recommended in the Calibre + iDevices FAQ, using the Connect/Share|Connect to iTunes menu item.

Enabling the Apple driver for direct connection to iDevices is an unsupported advanced user mode.

" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:65 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:64 msgid "Disable Apple driver" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:69 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:68 msgid "Enable Apple driver" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:118 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:117 msgid "Use Series as Category in iTunes/iBooks" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:119 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:118 msgid "Enable to use the series name as the iTunes Genre, iBooks Category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:121 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:120 msgid "Cache covers from iTunes/iBooks" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:123 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:122 msgid "Enable to cache and display covers from iTunes/iBooks" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:180 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:183 msgid "Apple device" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:182 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:185 msgid "Communicate with iTunes/iBooks." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:194 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:197 msgid "Apple device detected, launching iTunes, please wait ..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:196 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:199 msgid "Cannot copy books directly from iDevice. Drag from iTunes Library to desktop, then add to calibre's Library window." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:359 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:362 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:361 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:364 msgid "Updating device metadata listing..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:438 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:477 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1059 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1103 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3109 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3149 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:440 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:479 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1058 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1101 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3098 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3138 msgid "%d of %d" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:484 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1108 -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3155 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:486 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1106 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3144 #: /home/kovid/work/calibre/src/calibre/gui2/ebook_download.py:106 msgid "finished" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:669 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:671 msgid "" "Some books not found in iTunes database.\n" "Delete using the iBooks app.\n" "Click 'Show Details' for a list." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1020 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:1022 msgid "" "Some cover art could not be converted.\n" "Click 'Show Details' for a list." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:2680 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:2669 #: /home/kovid/work/calibre/src/calibre/devices/nook/driver.py:102 #: /home/kovid/work/calibre/src/calibre/devices/prs505/sony_cache.py:447 #: /home/kovid/work/calibre/src/calibre/devices/prs505/sony_cache.py:470 @@ -920,8 +920,8 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:951 #: /home/kovid/work/calibre/src/calibre/gui2/actions/fetch_news.py:73 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:445 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1657 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1659 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1661 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1663 #: /home/kovid/work/calibre/src/calibre/library/database2.py:328 #: /home/kovid/work/calibre/src/calibre/library/database2.py:341 #: /home/kovid/work/calibre/src/calibre/library/database2.py:2949 @@ -929,7 +929,7 @@ msgstr "" msgid "News" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:2681 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:2670 #: /home/kovid/work/calibre/src/calibre/gui2/catalog/catalog_epub_mobi.py:65 #: /home/kovid/work/calibre/src/calibre/library/catalog.py:652 #: /home/kovid/work/calibre/src/calibre/library/database2.py:2909 @@ -937,7 +937,7 @@ msgstr "" msgid "Catalog" msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3011 +#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:3000 msgid "Communicate with iTunes." msgstr "" @@ -1390,35 +1390,35 @@ msgstr "" msgid "Communicate with the Teclast K3/K5 reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:36 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:37 msgid "Communicate with the Newsmy reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:47 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:48 msgid "Communicate with the Archos reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:57 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:58 msgid "Communicate with the Pico reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:67 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:68 msgid "Communicate with the iPapyrus reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:78 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:79 msgid "Communicate with the Sovos reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:88 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:89 msgid "Communicate with the Sunstech EB700 reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:99 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:100 msgid "Communicate with the Stash W950 reader." msgstr "" -#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:111 +#: /home/kovid/work/calibre/src/calibre/devices/teclast/driver.py:112 msgid "Communicate with the Wexler reader." msgstr "" @@ -2436,14 +2436,14 @@ msgid "TEMPLATE ERROR" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:632 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:63 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:561 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:66 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:564 msgid "No" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:632 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:63 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:561 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:66 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:564 #: /home/kovid/work/calibre/src/calibre/utils/formatter_functions.py:667 msgid "Yes" msgstr "" @@ -2482,7 +2482,7 @@ msgid "Producer" msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:737 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:879 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:886 #: /home/kovid/work/calibre/src/calibre/gui2/preferences/metadata_sources.py:147 #: /home/kovid/work/calibre/src/calibre/library/field_metadata.py:228 msgid "Comments" @@ -2623,7 +2623,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/opf2.py:1363 #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1499 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:891 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:898 #: /home/kovid/work/calibre/src/calibre/gui2/store/search/models.py:36 msgid "Cover" msgstr "" @@ -2827,7 +2827,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/cover.py:98 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.py:176 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:806 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:843 msgid "Book %s of %s" msgstr "" @@ -3346,7 +3346,7 @@ msgid "Choose Files" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/actions/add.py:29 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:621 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:656 msgid "Books" msgstr "" @@ -4626,7 +4626,7 @@ msgstr "" msgid "Collecting data, please wait..." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/add.py:517 +#: /home/kovid/work/calibre/src/calibre/gui2/add.py:520 msgid "Saved" msgstr "" @@ -5792,33 +5792,33 @@ msgid "Set the metadata. The output file will contain as much of this metadata a msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:180 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:749 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:786 msgid "Choose cover for " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:187 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:757 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:794 msgid "Cannot read" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:188 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:758 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:795 msgid "You do not have permission to read the file: " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:196 #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:203 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:766 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:803 msgid "Error reading file" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:197 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:767 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:804 msgid "

There was an error reading from file:
" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata.py:204 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:777 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:814 msgid " is not a valid picture" msgstr "" @@ -5843,7 +5843,7 @@ msgid "&Title: " msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:165 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:72 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:73 msgid "Change the title of this book" msgstr "" @@ -5871,14 +5871,14 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:171 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:537 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:932 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:973 msgid "Tags categorize the book. This is particularly useful while searching.

They can be any words or phrases, separated by commas." msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:172 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:544 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_ui.py:214 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:377 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:403 msgid "&Series:" msgstr "" @@ -5886,7 +5886,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/convert/metadata_ui.py:174 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:545 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:546 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:376 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:402 msgid "List of known series. You can add new series." msgstr "" @@ -6476,16 +6476,16 @@ msgstr "" msgid "Cover browser could not be loaded" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:63 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:88 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:112 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:149 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:183 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:300 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:565 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:606 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:629 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:680 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:66 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:91 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:115 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:152 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:186 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:303 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:568 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:609 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:632 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:683 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.py:307 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.py:312 #: /home/kovid/work/calibre/src/calibre/gui2/library/delegates.py:128 @@ -6493,67 +6493,67 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/library/delegates.py:230 #: /home/kovid/work/calibre/src/calibre/gui2/library/delegates.py:279 #: /home/kovid/work/calibre/src/calibre/gui2/library/delegates.py:283 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1198 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1239 msgid "Undefined" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:126 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:637 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:129 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:640 msgid "star(s)" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:127 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:638 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:130 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:641 msgid "Unrated" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:170 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:667 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:173 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:670 msgid "Set '%s' to today" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:172 -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:669 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:175 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:672 msgid "Clear '%s'" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:296 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:299 msgid " index:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:365 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:368 msgid "The enumeration \"{0}\" contains an invalid value that will be set to the default" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:520 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:523 msgid "Apply changes" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:713 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:716 msgid "Remove series" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:716 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:719 msgid "Automatically number books" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:719 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:722 msgid "Force numbers to start with " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:790 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:793 msgid "The enumeration \"{0}\" contains invalid values that will not appear in the list" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:834 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:837 msgid "Remove all tags" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:854 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:857 msgid "tags to add" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:861 +#: /home/kovid/work/calibre/src/calibre/gui2/custom_column_widgets.py:864 msgid "tags to remove" msgstr "" @@ -7115,14 +7115,14 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf_ui.py:97 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_ui.py:211 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:73 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:74 #: /home/kovid/work/calibre/src/calibre/gui2/store/mobileread/adv_search_builder_ui.py:181 #: /home/kovid/work/calibre/src/calibre/gui2/store/search/adv_search_builder_ui.py:199 msgid "&Title:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf_ui.py:98 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:178 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:186 msgid "&Author(s):" msgstr "" @@ -7279,13 +7279,13 @@ msgstr "" #: #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/edit_authors_dialog.py:271 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1449 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1453 msgid "Invalid author name" msgstr "" #: #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/edit_authors_dialog.py:272 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1450 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1454 msgid "Author names cannot contain & characters." msgstr "" @@ -7303,7 +7303,7 @@ msgstr "" #: #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/edit_authors_dialog_ui.py:90 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2130 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2134 msgid "F&ind" msgstr "" @@ -7405,7 +7405,7 @@ msgid "Standard metadata" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.py:60 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:860 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:867 msgid "Custom metadata" msgstr "" @@ -7414,7 +7414,7 @@ msgid "Search/Replace" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk.py:65 -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/progress.py:76 +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/progress.py:83 msgid "Working" msgstr "" @@ -7545,13 +7545,13 @@ msgid "Specify how the author(s) of this book should be sorted. For example Char msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:530 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:890 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:931 msgid "&Rating:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:531 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:532 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:891 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:932 msgid "Rating of this book. 0-5 stars" msgstr "" @@ -7621,7 +7621,7 @@ msgid "&Force numbers to start with:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:558 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1182 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1223 msgid "&Date:" msgstr "" @@ -7692,13 +7692,13 @@ msgid "Set from &ebook file(s)" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:581 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:503 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:667 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:510 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:674 msgid "&Basic metadata" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_bulk_ui.py:582 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:510 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:517 msgid "&Custom metadata" msgstr "" @@ -8163,7 +8163,7 @@ msgstr "" msgid "The plugin: %s cannot be disabled" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/progress.py:59 +#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/progress.py:66 msgid "Aborting..." msgstr "" @@ -8628,7 +8628,7 @@ msgid "&Author:" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/search_ui.py:215 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:931 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:972 msgid "Ta&gs:" msgstr "" @@ -8807,12 +8807,12 @@ msgid "%s (was %s)" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/tag_list_editor.py:85 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1395 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1399 msgid "Item is blank" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/tag_list_editor.py:86 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1396 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1400 msgid "An item cannot be set to nothing. Delete it instead." msgstr "" @@ -9301,7 +9301,7 @@ msgid "Regular expression (?P)" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/filename_pattern_ui.py:149 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1087 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1128 msgid "ISBN:" msgstr "" @@ -9525,7 +9525,7 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/library/models.py:758 #: /home/kovid/work/calibre/src/calibre/gui2/library/models.py:1317 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:806 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:807 msgid "The lookup/search name is \"{0}\"" msgstr "" @@ -9801,215 +9801,215 @@ msgstr "" msgid "Unhandled exception" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:101 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:246 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:102 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:255 #: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:405 msgid "Permission denied" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:102 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:247 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:103 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:256 #: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:406 msgid "Could not open %s. Is it being used by another program?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:132 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:136 msgid "Specify how this book should be sorted when by title. For example, The Exorcist might be sorted as Exorcist, The." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:134 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:138 msgid "Title &sort:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:142 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:146 msgid " The green color indicates that the current title sort matches the current title" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:145 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:149 msgid " The red color warns that the current title sort does not match the current title. No action is required if this is what you want." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:192 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:201 msgid "Authors changed" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:193 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:202 msgid "You have changed the authors for this book. You must save these changes before you can use Manage authors. Do you want to save these changes?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:274 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:287 msgid "" "Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.\n" "If the box is colored green, then text matches the individual author's sort strings. If it is colored red, then the authors and this text do not match." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:279 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:292 msgid "Author s&ort:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:289 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:302 msgid " The green color indicates that the current author sort matches the current author" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:292 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:305 msgid " The red color indicates that the current author sort does not match the current author. No action is required if this is what you want." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:433 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:463 msgid "&Number:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:514 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:549 msgid "" "Last modified: %s\n" "\n" "Double click to view" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:531 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:566 msgid "Set the cover for the book from the selected format" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:539 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:574 msgid "Set metadata for the book from the selected format" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:546 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:581 msgid "Add a format to this book" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:553 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:588 msgid "Remove the selected format from this book" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:619 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:654 msgid "Choose formats for " msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:651 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:686 msgid "No permission" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:652 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:687 msgid "You do not have permission to read the following files:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:682 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:683 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:717 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:718 msgid "No format selected" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:695 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:730 msgid "Could not read metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:696 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:731 msgid "Could not read metadata from %s format" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:715 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:752 msgid "&Browse" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:717 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:754 msgid "T&rim" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:719 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:756 msgid "&Remove" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:725 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:762 msgid "Download co&ver" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:726 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:763 msgid "&Generate cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:776 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:813 msgid "Not a valid picture" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:800 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:837 msgid "Specify title and author" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:801 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:838 msgid "You must specify a title and author before generating a cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:819 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:856 msgid "Invalid cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:820 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:857 msgid "Could not change cover as the image is invalid." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:847 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:884 msgid "This book has no cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:849 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:886 msgid "Cover size: %dx%d pixels" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:898 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:939 msgid "stars" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:967 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1008 msgid "Tags changed" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:968 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1009 msgid "You have changed the tags. In order to use the tags editor, you must either discard or apply these changes. Apply changes?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:994 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1035 msgid "I&ds:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:995 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1036 msgid "" "Edit the identifiers for this book. For example: \n" "\n" "%s" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1056 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1118 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1097 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1159 msgid "This ISBN number is valid" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1059 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1121 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1100 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1162 msgid "This ISBN number is invalid" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1084 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1106 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1125 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1147 msgid "Invalid ISBN" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1085 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1126 msgid "Enter an ISBN" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1107 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1148 msgid "The ISBN you entered is not valid. Try again." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1131 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1172 msgid "&Publisher:" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1201 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1242 msgid "Clear date" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1233 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/basic_widgets.py:1275 msgid "Publishe&d:" msgstr "" @@ -10154,33 +10154,33 @@ msgstr "" msgid "Save changes and edit the metadata of %s" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:553 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:755 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:560 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:762 msgid "Change cover" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:610 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:617 msgid "Co&mments" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:650 -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:796 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:657 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:803 msgid "&Metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:655 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:662 msgid "&Cover and formats" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:724 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:731 msgid "C&ustom metadata" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:736 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:743 msgid "&Comments" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:802 +#: /home/kovid/work/calibre/src/calibre/gui2/metadata/single.py:809 msgid "Basic metadata" msgstr "" @@ -12839,13 +12839,13 @@ msgid "Manage %s" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:454 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1869 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1873 msgid "Manage Saved Searches" msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:462 #: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:466 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1867 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1871 msgid "Manage User Categories" msgstr "" @@ -12857,108 +12857,108 @@ msgstr "" msgid "Change sub-categorization scheme" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:801 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:802 msgid "The grouped search term name is \"{0}\"" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1074 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1075 msgid "Changing the authors for several books can take a while. Are you sure?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1079 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1080 msgid "Changing the metadata for that many books can take a while. Are you sure?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1166 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1167 #: /home/kovid/work/calibre/src/calibre/library/database2.py:447 msgid "Searches" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1401 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1421 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1430 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1405 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1425 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1434 msgid "Rename user category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1402 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1406 msgid "You cannot use periods in the name when renaming user categories" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1422 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1431 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1426 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1435 msgid "The name %s is already used" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1454 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1458 msgid "Duplicate search name" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1455 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1459 msgid "The saved search name %s is already used." msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1859 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1863 msgid "Manage Authors" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1861 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1865 msgid "Manage Series" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1863 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1867 msgid "Manage Publishers" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1865 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1869 msgid "Manage Tags" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1877 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1881 msgid "Invalid search restriction" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1878 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1882 msgid "The current search restriction is invalid" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1894 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1898 msgid "New Category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1945 -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1948 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1949 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1952 msgid "Delete user category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1946 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1950 msgid "%s is not a user category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1949 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1953 msgid "%s contains items. Do you really want to delete it?" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1970 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1974 msgid "Remove category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1971 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1975 msgid "User category %s does not exist" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1990 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1994 msgid "Add to user category" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1991 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:1995 msgid "A user category %s does not exist" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2114 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2118 msgid "Find item in tag browser" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2117 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2121 msgid "" "Search for items. This is a \"contains\" search; items containing the\n" "text anywhere in the name will be found. You can limit the search\n" @@ -12968,55 +12968,55 @@ msgid "" "containing the text \"foo\"" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2126 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2130 msgid "ALT+f" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2131 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2135 msgid "Find the first/next matching item" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2136 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2140 msgid "Collapse all categories" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2160 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2164 msgid "No More Matches.

Click Find again to go to first match" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2173 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2177 msgid "Sort by name" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2173 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2177 msgid "Sort by popularity" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2174 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2178 msgid "Sort by average rating" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2177 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2181 msgid "Set the sort order for entries in the Tag Browser" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2184 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2188 msgid "Match all" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2184 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2188 msgid "Match any" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2189 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2193 msgid "When selecting multiple entries in the Tag Browser match any or all of them" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2196 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2200 msgid "Manage authors, tags, etc" msgstr "" -#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2197 +#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:2201 msgid "All of these category_managers are available by right-clicking on items in the tag browser above" msgstr "" diff --git a/src/calibre/utils/mem.py b/src/calibre/utils/mem.py index 7dad5e4d0d..4358ec7522 100644 --- a/src/calibre/utils/mem.py +++ b/src/calibre/utils/mem.py @@ -208,6 +208,8 @@ def gc_histogram(): def diff_hists(h1, h2): """Prints differences between two results of gc_histogram().""" for k in h1: + if k not in h2: + h2[k] = 0 if h1[k] != h2[k]: print "%s: %d -> %d (%s%d)" % ( k, h1[k], h2[k], h2[k] > h1[k] and "+" or "", h2[k] - h1[k]) From 9b7363c283c40009517277c61a1719b6cb9de62c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Jun 2011 12:23:55 -0600 Subject: [PATCH 2/3] ... --- src/calibre/manual/conversion.rst | 1 + src/calibre/manual/faq.rst | 44 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/calibre/manual/conversion.rst b/src/calibre/manual/conversion.rst index 9244109ba7..029cc636ea 100644 --- a/src/calibre/manual/conversion.rst +++ b/src/calibre/manual/conversion.rst @@ -633,6 +633,7 @@ TXT input supports a number of options to differentiate how paragraphs are detec :guilabel:`Formatting Style: None` Applies no special formatting to the text, the document is converted to html with no other changes. +.. _pdfconversion: Convert PDF documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index 733adb65ee..97551b403f 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -35,29 +35,11 @@ What are the best source formats to convert? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order of decreasing preference: LIT, MOBI, EPUB, FB2, HTML, PRC, RTF, PDB, TXT, PDF -Why does the PDF conversion lose some images/tables? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The PDF conversion tries to extract the text and images from the PDF file and convert them to and HTML based ebook. Some PDF files have images in a format that cannot be extracted (vector images). All tables -are also represented as vector diagrams, thus they cannot be extracted. +I converted a PDF file, but the result has various problems? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -How do I convert a collection of HTML files in a specific order? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like:: +PDF is a terrible format to convert from. For a list of the various issues you will encounter when converting PDF, see: :ref:`pdfconversion`. - - -

Table of Contents

-

- First File
- Second File
- . - . - . -

- - - -Then just add this HTML file to the GUI and use the convert button to create your ebook. .. _char-encoding-faq: @@ -85,6 +67,26 @@ If you have a hand edited TOC in the input document, you can use the TOC detecti Finally, I encourage you to ditch the content TOC and only have a metadata TOC in your ebooks. Metadata TOCs will give the people reading your ebooks a much superior navigation experience (except on the Kindle, where they are essentially the same as a content TOC). +How do I convert a collection of HTML files in a specific order? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In order to convert a collection of HTML files in a specific oder, you have to create a table of contents file. That is, another HTML file that contains links to all the other files in the desired order. Such a file looks like:: + + + +

Table of Contents

+

+ First File
+ Second File
+ . + . + . +

+ + + +Then just add this HTML file to the GUI and use the convert button to create your ebook. + + How do I use some of the advanced features of the conversion tools? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can get help on any individual feature of the converters by mousing over it in the GUI or running ``ebook-convert dummy.html .epub -h`` at a terminal. A good place to start is to look at the following demo files that demonstrate some of the advanced features: From ddfc313efdaec4f326a4d19557cd1d39d65f56ed Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Jun 2011 12:36:19 -0600 Subject: [PATCH 3/3] Fix #800952 (Editing metadata appears to cause a memory leak) --- src/calibre/gui2/tag_view.py | 128 ++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 54 deletions(-) diff --git a/src/calibre/gui2/tag_view.py b/src/calibre/gui2/tag_view.py index c3f17105dc..730c91d37f 100644 --- a/src/calibre/gui2/tag_view.py +++ b/src/calibre/gui2/tag_view.py @@ -149,7 +149,8 @@ class TagsView(QTreeView): # {{{ hidden_categories=self.hidden_categories, search_restriction=None, drag_drop_finished=self.drag_drop_finished, - collapse_model=self.collapse_model) + collapse_model=self.collapse_model, + state_map={}) self.pane_is_visible = True # because TagsModel.init did a recount self.sort_by = sort_by self.tag_match = tag_match @@ -173,6 +174,7 @@ class TagsView(QTreeView): # {{{ self.made_connections = True self.refresh_signal_processed = True db.add_listener(self.database_changed) + self.expanded.connect(self.item_expanded) def database_changed(self, event, ids): if self.refresh_signal_processed: @@ -541,6 +543,10 @@ class TagsView(QTreeView): # {{{ return self.isExpanded(idx) def recount(self, *args): + ''' + Rebuild the category tree, expand any categories that were expanded, + reset the search states, and reselect the current node. + ''' if self.disable_recounting or not self.pane_is_visible: return self.refresh_signal_processed = True @@ -548,18 +554,23 @@ class TagsView(QTreeView): # {{{ if not ci.isValid(): ci = self.indexAt(QPoint(10, 10)) path = self.model().path_for_index(ci) if self.is_visible(ci) else None - try: - if not self.model().refresh(): # categories changed! - self.set_new_model() - path = None - except: #Database connection could be closed if an integrity check is happening - pass + expanded_categories, state_map = self.model().get_state() + self.set_new_model(state_map=state_map) + for category in expanded_categories: + self.expand(self.model().index_for_category(category)) self._model.show_item_at_path(path) - # If the number of user categories changed, if custom columns have come or - # gone, or if columns have been hidden or restored, we must rebuild the - # model. Reason: it is much easier than reconstructing the browser tree. - def set_new_model(self, filter_categories_by=None): + def item_expanded(self, idx): + ''' + Called by the expanded signal + ''' + self.setCurrentIndex(idx) + + def set_new_model(self, filter_categories_by=None, state_map={}): + ''' + There are cases where we need to rebuild the category tree without + attempting to reposition the current node. + ''' try: old = getattr(self, '_model', None) if old is not None: @@ -569,7 +580,8 @@ class TagsView(QTreeView): # {{{ search_restriction=self.search_restriction, drag_drop_finished=self.drag_drop_finished, filter_categories_by=filter_categories_by, - collapse_model=self.collapse_model) + collapse_model=self.collapse_model, + state_map=state_map) self.setModel(self._model) except: # The DB must be gone. Set the model to None and hope that someone @@ -752,7 +764,8 @@ class TagsModel(QAbstractItemModel): # {{{ def __init__(self, db, parent, hidden_categories=None, search_restriction=None, drag_drop_finished=None, - filter_categories_by=None, collapse_model='disable'): + filter_categories_by=None, collapse_model='disable', + state_map={}): QAbstractItemModel.__init__(self, parent) # must do this here because 'QPixmap: Must construct a QApplication @@ -776,10 +789,10 @@ class TagsModel(QAbstractItemModel): # {{{ self.filter_categories_by = filter_categories_by self.collapse_model = collapse_model - # get_node_tree cannot return None here, because row_map is empty. Note - # that get_node_tree can indirectly change the user_categories dict. + # Note that _get_category_nodes can indirectly change the + # user_categories dict. - data = self.get_node_tree(config['sort_tags_by']) + data = self._get_category_nodes(config['sort_tags_by']) gst = db.prefs.get('grouped_search_terms', {}) self.root_item = TagTreeItem(icon_map=self.icon_state_map) self.category_nodes = [] @@ -844,7 +857,7 @@ class TagsModel(QAbstractItemModel): # {{{ category_node_map[key] = node last_category_node = node self.category_nodes.append(node) - self.refresh(data=data) + self._create_node_tree(data, state_map) def break_cycles(self): self.root_item.break_cycles() @@ -1121,8 +1134,10 @@ class TagsModel(QAbstractItemModel): # {{{ def set_search_restriction(self, s): self.search_restriction = s - def get_node_tree(self, sort): - old_row_map_len = len(self.row_map) + def _get_category_nodes(self, sort): + ''' + Called by __init__. Do not directly call this method. + ''' self.row_map = [] self.categories = {} @@ -1176,19 +1191,27 @@ class TagsModel(QAbstractItemModel): # {{{ if category in data: # The search category can come and go self.row_map.append(category) self.categories[category] = tb_categories[category]['name'] - - if old_row_map_len != 0 and old_row_map_len != len(self.row_map): - # A category has been added or removed. We must force a rebuild of - # the model - return None return data def refresh(self, data=None): + ''' + Here to trap usages of refresh in the old architecture. Can eventually + be removed. + ''' + print 'TagsModel: refresh called!' + traceback.print_stack() + return False + + def _create_node_tree(self, data, state_map): + ''' + Called by __init__. Do not directly call this method. + ''' sort_by = config['sort_tags_by'] + if data is None: - data = self.get_node_tree(sort_by) # get category data - if data is None: - return False + print '_create_node_tree: no data!' + traceback.print_stack() + return collapse = gprefs['tags_browser_collapse_at'] collapse_model = self.collapse_model @@ -1354,29 +1377,23 @@ class TagsModel(QAbstractItemModel): # {{{ # }}} for category in self.category_nodes: - if len(category.children) > 0: - child_map = category.children - states = [c.tag.state for c in category.child_tags()] - names = [(c.tag.name, c.tag.category) for c in category.child_tags()] - state_map = dict(izip(names, states)) - # temporary sub-categories (the partitioning ones) must follow - # the permanent sub-categories. This will happen naturally if - # the temp ones are added by process_node - ctags = [c for c in child_map if - c.type == TagTreeItem.CATEGORY and not c.temporary] - start = len(ctags) - self.beginRemoveRows(self.createIndex(category.row(), 0, category), - start, len(child_map)-1) - category.children = ctags - for i in range(start, len(child_map)): - child_map[i].break_cycles() - child_map = None - self.endRemoveRows() - else: - state_map = {} + process_one_node(category, state_map.get(category.py_name, {})) - process_one_node(category, state_map) - return True + def get_state(self): + state_map = {} + expanded_categories = [] + for row, category in enumerate(self.category_nodes): + if self.tags_view.isExpanded(self.index(row, 0, QModelIndex())): + expanded_categories.append(category.py_name) + states = [c.tag.state for c in category.child_tags()] + names = [(c.tag.name, c.tag.category) for c in category.child_tags()] + state_map[category.py_name] = dict(izip(names, states)) + return expanded_categories, state_map + + def index_for_category(self, name): + for row, category in enumerate(self.category_nodes): + if category.py_name == name: + return self.index(row, 0, QModelIndex()) def columnCount(self, parent): return 1 @@ -1476,7 +1493,7 @@ class TagsModel(QAbstractItemModel): # {{{ self.tags_view.tag_item_renamed.emit() item.tag.name = val self.rename_item_in_all_user_categories(name, key, val) - self.refresh() # Should work, because no categories can have disappeared + self.refresh_required.emit() self.show_item_at_path(path) return True @@ -1789,19 +1806,22 @@ class TagsModel(QAbstractItemModel): # {{{ return v return None - def show_item_at_path(self, path, box=False): + def show_item_at_path(self, path, box=False, + position=QTreeView.PositionAtCenter): ''' Scroll the browser and open categories to show the item referenced by path. If possible, the item is placed in the center. If box=True, a box is drawn around the item. ''' if path: - self.show_item_at_index(self.index_for_path(path), box) + self.show_item_at_index(self.index_for_path(path), box=box, + position=position) - def show_item_at_index(self, idx, box=False): + def show_item_at_index(self, idx, box=False, + position=QTreeView.PositionAtCenter): if idx.isValid(): self.tags_view.setCurrentIndex(idx) - self.tags_view.scrollTo(idx, QTreeView.PositionAtCenter) + self.tags_view.scrollTo(idx, position) if box: tag_item = idx.internalPointer() tag_item.boxed = True