Move action definitions into ui file
This commit is contained in:
parent
bf87a76fdf
commit
24002c66e7
@ -1,4 +1,4 @@
|
||||
exclude: ^scripts
|
||||
exclude: ^(scripts|comictaggerlib/graphics/resources.py)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
|
@ -26,7 +26,6 @@ import pathlib
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets, uic
|
||||
|
||||
from comicapi.comicarchive import ComicArchive
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
from comictaggerlib.imagefetcher import ImageFetcher
|
||||
from comictaggerlib.imagepopup import ImagePopup
|
||||
from comictaggerlib.pageloader import PageLoader
|
||||
@ -102,8 +101,8 @@ class CoverImageWidget(QtWidgets.QWidget):
|
||||
self.imageCount = 1
|
||||
self.imageData = b""
|
||||
|
||||
self.btnLeft.setIcon(QtGui.QIcon(str(graphics_path / "left.png")))
|
||||
self.btnRight.setIcon(QtGui.QIcon(str(graphics_path / "right.png")))
|
||||
self.btnLeft.setIcon(QtGui.QIcon(":/graphics/left.png"))
|
||||
self.btnRight.setIcon(QtGui.QIcon(":/graphics/right.png"))
|
||||
|
||||
self.btnLeft.clicked.connect(self.decrement_image)
|
||||
self.btnRight.clicked.connect(self.increment_image)
|
||||
@ -263,7 +262,7 @@ class CoverImageWidget(QtWidgets.QWidget):
|
||||
self.page_loader = None
|
||||
|
||||
def load_default(self) -> None:
|
||||
self.current_pixmap = QtGui.QPixmap(str(graphics_path / "nocover.png"))
|
||||
self.current_pixmap = QtGui.QPixmap(":/graphics/nocover.png")
|
||||
self.set_display_pixmap()
|
||||
|
||||
def resizeEvent(self, resize_event: QtGui.QResizeEvent) -> None:
|
||||
|
@ -111,10 +111,8 @@ def open_tagger_window(
|
||||
|
||||
# needed to catch initial open file events (macOS)
|
||||
app.openFileRequest.connect(lambda x: config[0].Runtime_Options__files.append(x.toLocalFile()))
|
||||
|
||||
if platform.system() == "Darwin":
|
||||
# Set the MacOS dock icon
|
||||
app.setWindowIcon(QtGui.QIcon(str(graphics_path / "app.png")))
|
||||
# The window Icon needs to be set here. It's also set in taggerwindow.ui but it doesn't seem to matter
|
||||
app.setWindowIcon(QtGui.QIcon(":/graphics/app.png"))
|
||||
|
||||
if platform.system() == "Windows":
|
||||
# For pure python, tell windows that we're not python,
|
||||
@ -139,7 +137,6 @@ def open_tagger_window(
|
||||
|
||||
try:
|
||||
tagger_window = TaggerWindow(config[0].Runtime_Options__files, config, talkers)
|
||||
tagger_window.setWindowIcon(QtGui.QIcon(str(graphics_path / "app.png")))
|
||||
tagger_window.show()
|
||||
|
||||
# Catch open file events (macOS)
|
||||
|
@ -20,7 +20,6 @@ import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets, sip, uic
|
||||
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
from comictaggerlib.ui import ui_path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -50,7 +49,7 @@ class ImagePopup(QtWidgets.QDialog):
|
||||
# TODO: macOS denies this
|
||||
screen = QtWidgets.QApplication.primaryScreen()
|
||||
self.desktopBg = screen.grabWindow(sip.voidptr(0), 0, 0, screen_size.width(), screen_size.height())
|
||||
bg = QtGui.QPixmap(str(graphics_path / "popup_bg.png"))
|
||||
bg = QtGui.QPixmap(":/graphics/popup_bg.png")
|
||||
self.clientBgPixmap = bg.scaled(
|
||||
screen_size.width(),
|
||||
screen_size.height(),
|
||||
|
@ -17,14 +17,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import platform
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets, uic
|
||||
|
||||
from comicapi.comicarchive import ComicArchive
|
||||
from comicapi.genericmetadata import GenericMetadata
|
||||
from comictaggerlib.coverimagewidget import CoverImageWidget
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
from comictaggerlib.ui import ui_path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -57,12 +55,8 @@ class PageBrowserWindow(QtWidgets.QDialog):
|
||||
self.metadata = metadata
|
||||
|
||||
self.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Close).setDefault(True)
|
||||
if platform.system() == "Darwin":
|
||||
self.btnPrev.setText("<<")
|
||||
self.btnNext.setText(">>")
|
||||
else:
|
||||
self.btnPrev.setIcon(QtGui.QIcon(str(graphics_path / "left.png")))
|
||||
self.btnNext.setIcon(QtGui.QIcon(str(graphics_path / "right.png")))
|
||||
self.btnPrev.setIcon(QtGui.QIcon(":/graphics/left.png"))
|
||||
self.btnNext.setIcon(QtGui.QIcon(":/graphics/right.png"))
|
||||
|
||||
self.btnNext.clicked.connect(self.next_page)
|
||||
self.btnPrev.clicked.connect(self.prev_page)
|
||||
|
@ -32,6 +32,7 @@ import settngs
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets, uic
|
||||
|
||||
import comicapi.merge
|
||||
import comictaggerlib.graphics.resources
|
||||
import comictaggerlib.ui
|
||||
from comicapi import utils
|
||||
from comicapi.comicarchive import ComicArchive, metadata_styles
|
||||
@ -412,134 +413,42 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
|
||||
def config_menus(self) -> None:
|
||||
# File Menu
|
||||
self.actionExit.setShortcut("Ctrl+Q")
|
||||
self.actionExit.setStatusTip("Exit application")
|
||||
self.actionExit.triggered.connect(self.close)
|
||||
|
||||
self.actionLoad.setShortcut("Ctrl+O")
|
||||
self.actionLoad.setStatusTip("Load comic archive")
|
||||
self.actionLoad.triggered.connect(self.select_file)
|
||||
|
||||
self.actionLoadFolder.setShortcut("Ctrl+Shift+O")
|
||||
self.actionLoadFolder.setStatusTip("Load folder with comic archives")
|
||||
self.actionLoadFolder.triggered.connect(self.select_folder)
|
||||
|
||||
self.actionOpenFolderAsComic.setShortcut("Ctrl+Shift+Alt+O")
|
||||
self.actionOpenFolderAsComic.setStatusTip("Load folder as a comic archives")
|
||||
self.actionOpenFolderAsComic.triggered.connect(self.select_folder_archive)
|
||||
|
||||
self.actionWrite_Tags.setShortcut("Ctrl+S")
|
||||
self.actionWrite_Tags.setStatusTip("Save tags to comic archive")
|
||||
self.actionWrite_Tags.triggered.connect(self.commit_metadata)
|
||||
|
||||
self.actionAutoTag.setShortcut("Ctrl+T")
|
||||
self.actionAutoTag.setStatusTip("Auto-tag multiple archives")
|
||||
self.actionAutoTag.triggered.connect(self.auto_tag)
|
||||
|
||||
self.actionCopyTags.setShortcut("Ctrl+C")
|
||||
self.actionCopyTags.setStatusTip("Copy one tag style tags to enabled modify style(s)")
|
||||
self.actionCopyTags.triggered.connect(self.copy_tags)
|
||||
|
||||
self.actionRemoveAuto.setShortcut("Ctrl+D")
|
||||
self.actionRemoveAuto.setStatusTip("Remove currently selected modify tag style(s) from the archive")
|
||||
self.actionExit.triggered.connect(self.close)
|
||||
self.actionLoad.triggered.connect(self.select_file)
|
||||
self.actionLoadFolder.triggered.connect(self.select_folder)
|
||||
self.actionOpenFolderAsComic.triggered.connect(self.select_folder_archive)
|
||||
self.actionRemoveAuto.triggered.connect(self.remove_auto)
|
||||
|
||||
self.actionRepackage.setShortcut("Ctrl+E")
|
||||
self.actionRepackage.setStatusTip("Re-create archive as CBZ")
|
||||
self.actionRepackage.triggered.connect(self.repackage_archive)
|
||||
|
||||
self.actionRename.setShortcut("Ctrl+N")
|
||||
self.actionRename.setStatusTip("Rename archive based on tags")
|
||||
self.actionRename.triggered.connect(self.rename_archive)
|
||||
|
||||
self.actionSettings.setShortcut("Ctrl+Shift+S")
|
||||
self.actionSettings.setStatusTip("Configure ComicTagger")
|
||||
self.actionRepackage.triggered.connect(self.repackage_archive)
|
||||
self.actionSettings.triggered.connect(self.show_settings)
|
||||
|
||||
self.actionWrite_Tags.triggered.connect(self.commit_metadata)
|
||||
# Tag Menu
|
||||
self.actionParse_Filename.setShortcut("Ctrl+F")
|
||||
self.actionParse_Filename.setStatusTip("Try to extract tags from filename")
|
||||
self.actionParse_Filename.triggered.connect(self.use_filename)
|
||||
|
||||
self.actionParse_Filename_split_words.setShortcut("Ctrl+Shift+F")
|
||||
self.actionParse_Filename_split_words.setStatusTip("Try to extract tags from filename and split words")
|
||||
self.actionParse_Filename_split_words.triggered.connect(self.use_filename_split)
|
||||
|
||||
self.actionSearchOnline.setShortcut("Ctrl+W")
|
||||
self.actionSearchOnline.setStatusTip("Search online for tags")
|
||||
self.actionSearchOnline.triggered.connect(self.query_online)
|
||||
|
||||
self.actionAutoImprint.triggered.connect(self.auto_imprint)
|
||||
|
||||
self.actionAutoIdentify.setShortcut("Ctrl+I")
|
||||
self.actionAutoIdentify.triggered.connect(self.auto_identify_search)
|
||||
|
||||
self.actionLiteralSearch.triggered.connect(self.literal_search)
|
||||
|
||||
self.actionApplyCBLTransform.setShortcut("Ctrl+L")
|
||||
self.actionApplyCBLTransform.setStatusTip("Modify tags specifically for CBL format")
|
||||
self.actionApplyCBLTransform.triggered.connect(self.apply_cbl_transform)
|
||||
|
||||
self.actionReCalcPageDims.setShortcut("Ctrl+R")
|
||||
self.actionReCalcPageDims.setStatusTip(
|
||||
"Trigger re-calculating image size, height and width for all pages on the next save"
|
||||
)
|
||||
self.actionReCalcPageDims.triggered.connect(self.recalc_page_dimensions)
|
||||
|
||||
self.actionClearEntryForm.setShortcut("Ctrl+Shift+C")
|
||||
self.actionClearEntryForm.setStatusTip("Clear all the data on the screen")
|
||||
self.actionAutoIdentify.triggered.connect(self.auto_identify_search)
|
||||
self.actionAutoImprint.triggered.connect(self.auto_imprint)
|
||||
self.actionClearEntryForm.triggered.connect(self.clear_form)
|
||||
|
||||
self.actionLiteralSearch.triggered.connect(self.literal_search)
|
||||
self.actionParse_Filename.triggered.connect(self.use_filename)
|
||||
self.actionParse_Filename_split_words.triggered.connect(self.use_filename_split)
|
||||
self.actionReCalcPageDims.triggered.connect(self.recalc_page_dimensions)
|
||||
self.actionSearchOnline.triggered.connect(self.query_online)
|
||||
# Window Menu
|
||||
self.actionPageBrowser.setShortcut("Ctrl+P")
|
||||
self.actionPageBrowser.setStatusTip("Show the page browser")
|
||||
self.actionPageBrowser.triggered.connect(self.show_page_browser)
|
||||
self.actionLogWindow.setShortcut("Ctrl+Shift+L")
|
||||
self.actionLogWindow.setStatusTip("Show the log window")
|
||||
self.actionLogWindow.triggered.connect(self.log_window.show)
|
||||
|
||||
self.actionPageBrowser.triggered.connect(self.show_page_browser)
|
||||
# Help Menu
|
||||
self.actionAbout.setStatusTip("Show the " + self.appName + " info")
|
||||
self.actionAbout.triggered.connect(self.about_app)
|
||||
self.actionWiki.triggered.connect(self.show_wiki)
|
||||
self.actionReportBug.triggered.connect(self.report_bug)
|
||||
self.actionComicTaggerForum.triggered.connect(self.show_forum)
|
||||
|
||||
# Notes Menu
|
||||
self.btnOpenWebLink.setIcon(QtGui.QIcon(str(graphics_path / "open.png")))
|
||||
|
||||
# ToolBar
|
||||
self.actionLoad.setIcon(QtGui.QIcon(str(graphics_path / "open.png")))
|
||||
self.actionLoadFolder.setIcon(QtGui.QIcon(str(graphics_path / "longbox.png")))
|
||||
self.actionOpenFolderAsComic.setIcon(QtGui.QIcon(str(graphics_path / "open.png")))
|
||||
self.actionWrite_Tags.setIcon(QtGui.QIcon(str(graphics_path / "save.png")))
|
||||
self.actionParse_Filename.setIcon(QtGui.QIcon(str(graphics_path / "parse.png")))
|
||||
self.actionParse_Filename_split_words.setIcon(QtGui.QIcon(str(graphics_path / "parse.png")))
|
||||
self.actionSearchOnline.setIcon(QtGui.QIcon(str(graphics_path / "search.png")))
|
||||
self.actionLiteralSearch.setIcon(QtGui.QIcon(str(graphics_path / "search.png")))
|
||||
self.actionAutoIdentify.setIcon(QtGui.QIcon(str(graphics_path / "auto.png")))
|
||||
self.actionAutoTag.setIcon(QtGui.QIcon(str(graphics_path / "autotag.png")))
|
||||
self.actionAutoImprint.setIcon(QtGui.QIcon(str(graphics_path / "autotag.png")))
|
||||
self.actionClearEntryForm.setIcon(QtGui.QIcon(str(graphics_path / "clear.png")))
|
||||
self.actionPageBrowser.setIcon(QtGui.QIcon(str(graphics_path / "browse.png")))
|
||||
|
||||
self.toolBar.addAction(self.actionLoad)
|
||||
self.toolBar.addAction(self.actionLoadFolder)
|
||||
self.toolBar.addAction(self.actionWrite_Tags)
|
||||
self.toolBar.addAction(self.actionSearchOnline)
|
||||
self.toolBar.addAction(self.actionLiteralSearch)
|
||||
self.toolBar.addAction(self.actionAutoIdentify)
|
||||
self.toolBar.addAction(self.actionAutoTag)
|
||||
self.toolBar.addAction(self.actionClearEntryForm)
|
||||
self.toolBar.addAction(self.actionPageBrowser)
|
||||
self.toolBar.addAction(self.actionAutoImprint)
|
||||
|
||||
self.leWebLink.addAction(self.actionAddWebLink)
|
||||
self.leWebLink.addAction(self.actionRemoveWebLink)
|
||||
self.actionReportBug.triggered.connect(self.report_bug)
|
||||
self.actionWiki.triggered.connect(self.show_wiki)
|
||||
|
||||
self.actionAddWebLink.triggered.connect(self.add_weblink_item)
|
||||
self.actionRemoveWebLink.triggered.connect(self.remove_weblink_item)
|
||||
|
||||
self.leWebLink.addAction(self.actionAddWebLink)
|
||||
self.leWebLink.addAction(self.actionRemoveWebLink)
|
||||
|
||||
def add_weblink_item(self, url: str = "") -> None:
|
||||
item = ""
|
||||
if isinstance(url, str):
|
||||
@ -678,7 +587,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
msg_box = QtWidgets.QMessageBox()
|
||||
msg_box.setWindowTitle("About " + self.appName)
|
||||
msg_box.setTextFormat(QtCore.Qt.TextFormat.RichText)
|
||||
msg_box.setIconPixmap(QtGui.QPixmap(str(graphics_path / "about.png")))
|
||||
msg_box.setIconPixmap(QtGui.QPixmap(":/graphics/about.png"))
|
||||
msg_box.setText(
|
||||
"<br><br><br>"
|
||||
+ self.appName
|
||||
|
@ -10,7 +10,6 @@ from PyQt5 import QtGui, QtWidgets
|
||||
from PyQt5.QtCore import QEvent, QModelIndex, QPoint, QRect, QSize, Qt, pyqtSignal
|
||||
|
||||
from comicapi.utils import StrEnum
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
|
||||
|
||||
class ClickedButtonEnum(StrEnum):
|
||||
@ -133,8 +132,8 @@ class ReadStyleItemDelegate(QtWidgets.QStyledItemDelegate):
|
||||
super().__init__()
|
||||
self.combobox = parent
|
||||
|
||||
self.down_icon = QtGui.QImage(str(graphics_path / "down.png"))
|
||||
self.up_icon = QtGui.QImage(str(graphics_path / "up.png"))
|
||||
self.down_icon = QtGui.QImage(":/graphics/down.png")
|
||||
self.up_icon = QtGui.QImage(":/graphics/up.png")
|
||||
|
||||
self.button_width = self.down_icon.width()
|
||||
self.button_padding = 5
|
||||
|
@ -11,8 +11,6 @@ from collections.abc import Sequence
|
||||
from PyQt5.QtCore import QUrl
|
||||
from PyQt5.QtWidgets import QWidget
|
||||
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
@ -143,7 +141,7 @@ if qt_available:
|
||||
pass
|
||||
# if still nothing, go with default image
|
||||
if not success:
|
||||
img.load(str(graphics_path / "nocover.png"))
|
||||
img.load(":/graphics/nocover.png")
|
||||
return img
|
||||
|
||||
def qt_error(msg: str, e: Exception | None = None) -> None:
|
||||
|
@ -22,6 +22,10 @@
|
||||
<property name="windowTitle">
|
||||
<string>ComicTagger</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/app.png</normaloff>:/graphics/app.png</iconset>
|
||||
</property>
|
||||
<property name="unifiedTitleAndToolBarOnMac">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -1015,6 +1019,10 @@ border-radius: 4px;
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/open.png</normaloff>:/graphics/open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -1340,203 +1348,22 @@ border-radius: 4px;
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLoad"/>
|
||||
<addaction name="actionLoadFolder"/>
|
||||
<addaction name="actionWrite_Tags"/>
|
||||
<addaction name="actionSearchOnline"/>
|
||||
<addaction name="actionLiteralSearch"/>
|
||||
<addaction name="actionAutoIdentify"/>
|
||||
<addaction name="actionAutoImprint"/>
|
||||
<addaction name="actionClearEntryForm"/>
|
||||
<addaction name="actionPageBrowser"/>
|
||||
</widget>
|
||||
<action name="actionLoad">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWrite_Tags">
|
||||
<property name="text">
|
||||
<string>Save Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRepackage">
|
||||
<property name="text">
|
||||
<string>Export as Zip Archive</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="text">
|
||||
<string>About ComicTagger</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionParse_Filename">
|
||||
<property name="text">
|
||||
<string>Parse Filename</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSearchOnline">
|
||||
<property name="text">
|
||||
<string>Search Online</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClearEntryForm">
|
||||
<property name="text">
|
||||
<string>Clear Form</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemoveCRTags">
|
||||
<property name="text">
|
||||
<string>Remove ComicRack Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemoveCBLTags">
|
||||
<property name="text">
|
||||
<string>Remove ComicBookLover Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReloadCBLTags">
|
||||
<property name="text">
|
||||
<string>Reload ComicBookLover Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReloadCRTags">
|
||||
<property name="text">
|
||||
<string>Reload ComicRack Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReloadAuto">
|
||||
<property name="text">
|
||||
<string>Reload Selected Tag Style</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="text">
|
||||
<string>Settings...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoIdentify">
|
||||
<property name="text">
|
||||
<string>Auto-Identify</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Auto-Identify</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Search online for tags and auto-identify best match for single archive</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Search online for tags and auto-identify best match for single archive</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPageBrowser">
|
||||
<property name="text">
|
||||
<string>Show Page Browser</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Page Browser</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show the Page Browser to inspect the comic</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Show the Page Browser to inspect the comic</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewRawCRTags">
|
||||
<property name="text">
|
||||
<string>View Raw ComicRack Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewRawCBLTags">
|
||||
<property name="text">
|
||||
<string>View Raw ComicBookLover Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReportBug">
|
||||
<property name="text">
|
||||
<string>Report Bug...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionComicTaggerForum">
|
||||
<property name="text">
|
||||
<string>ComicTagger Discussions...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWiki">
|
||||
<property name="text">
|
||||
<string>Online Docs...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemoveAuto">
|
||||
<property name="text">
|
||||
<string>Remove Current 'Modify' Tag Style(s)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRename">
|
||||
<property name="text">
|
||||
<string>Rename</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionApplyCBLTransform">
|
||||
<property name="text">
|
||||
<string>Apply CBL Transform</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReCalcPageDims">
|
||||
<property name="text">
|
||||
<string>Re-Calculate Page Dimensions</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadFolder">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopyTags">
|
||||
<property name="text">
|
||||
<string>Copy Tags</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoTag">
|
||||
<property name="text">
|
||||
<string>Auto-Tag</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Search online for tags,auto-identify best match, and save to archive</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Search online for tags,auto-identify best match, and save to archive</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoImprint">
|
||||
<property name="text">
|
||||
<string>Auto Imprint</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Normalize the publisher and map imprints to their parent publisher (e.g. Vertigo is an imprint of DC Comics)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionParse_Filename_split_words">
|
||||
<property name="text">
|
||||
<string>Parse Filename and split words</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Parse Filename and split words</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLogWindow">
|
||||
<property name="text">
|
||||
<string>Show Log Window</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLiteralSearch">
|
||||
<property name="text">
|
||||
<string>Literal Search</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>perform a literal search on the series and return the first 50 results</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenFolderAsComic">
|
||||
<property name="text">
|
||||
<string>Open Folder as Comic</string>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddWebLink">
|
||||
@ -1544,10 +1371,330 @@ border-radius: 4px;
|
||||
<string>Add Item</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionApplyCBLTransform">
|
||||
<property name="text">
|
||||
<string>Apply CBL Transform</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Modify metadata specifically for the CBL tags</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+T</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoIdentify">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/auto.png</normaloff>:/graphics/auto.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-Identify</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Auto-Identify</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Search online for metadata and auto-identify best match for single archive</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoImprint">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/auto.png</normaloff>:/graphics/auto.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Imprint</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Normalize the publisher and map imprints to their parent publisher (e.g. Vertigo is an imprint of DC Comics)</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+I</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAutoTag">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/autotag.png</normaloff>:/graphics/autotag.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-Tag</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Auto-Tag multiple archives</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Search online for metadata, auto-identify best match, and save to archive</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+T</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClearEntryForm">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/clear.png</normaloff>:/graphics/clear.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear Form</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear all metadata for the current comic</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Clear all the data on the screen</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+C</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionComicTaggerForum">
|
||||
<property name="text">
|
||||
<string>ComicTagger Discussions...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopyTags">
|
||||
<property name="text">
|
||||
<string>Copy Tags</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Copy metadata from the selected 'read' tags to the selected 'modify' tags</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Copy metadata from one type of tag to another</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+C</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::QuitRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLiteralSearch">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/search.png</normaloff>:/graphics/search.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Literal Search</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>perform a literal search on the series and return the first 50 results</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+L</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoad">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/open.png</normaloff>:/graphics/open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Load comic archive</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+O</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadFolder">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/longbox.png</normaloff>:/graphics/longbox.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Load folder containing comic archives</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+O</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLogWindow">
|
||||
<property name="text">
|
||||
<string>Show Log Window</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenFolderAsComic">
|
||||
<property name="text">
|
||||
<string>Open Folder as a Comic</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Load images from a folder as a single comic archive</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Open Folder as a Comic</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Alt+Shift+O</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPageBrowser">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/browse.png</normaloff>:/graphics/browse.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Page Browser</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Page Browser</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show the Page Browser</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Show the Page Browser to inspect the comic</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+P</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionParse_Filename">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/parse.png</normaloff>:/graphics/parse.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parse Filename</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Parse metadata from filename</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+F</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionParse_Filename_split_words">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/parse.png</normaloff>:/graphics/parse.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parse Filename and split words</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Attempt to split words before parsing the filename (eg 'MonsterFunHalloweenSpooktacularSpecial.cbz' becomes 'Monster Fun Halloween Spook t acul ar Special.cbz')</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Parse Filename and split words</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+F</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReCalcPageDims">
|
||||
<property name="text">
|
||||
<string>Re-Calculate Page Dimensions</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+R</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemoveAuto">
|
||||
<property name="text">
|
||||
<string>Remove Current 'Modify' tag(s)</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Remove currently selected modify tag(s) from the archive</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+D</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemoveWebLink">
|
||||
<property name="text">
|
||||
<string>Remove Web Link</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Remove Web Link</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRename">
|
||||
<property name="text">
|
||||
<string>Rename</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+R</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRepackage">
|
||||
<property name="text">
|
||||
<string>Export as Zip Archive</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+E</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReportBug">
|
||||
<property name="text">
|
||||
<string>Report Bug...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSearchOnline">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/search.png</normaloff>:/graphics/search.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Search Online</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Search Online</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="text">
|
||||
<string>Settings...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+S</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::PreferencesRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWiki">
|
||||
<property name="text">
|
||||
<string>Online Docs...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWrite_Tags">
|
||||
<property name="icon">
|
||||
<iconset resource="../graphics/graphics.qrc">
|
||||
<normaloff>:/graphics/save.png</normaloff>:/graphics/save.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save tag(s)</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Write tag(s) to file</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
@ -1563,7 +1710,9 @@ border-radius: 4px;
|
||||
<header>comictaggerlib.ui.customwidgets</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../graphics/graphics.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>btnAddWebLink</sender>
|
||||
|
@ -10,7 +10,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from comictaggerlib.coverimagewidget import CoverImageWidget
|
||||
from comictaggerlib.ctsettings import ct_ns, group_for_plugin
|
||||
from comictaggerlib.graphics import graphics_path
|
||||
from comictalker.comictalker import ComicTalker
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -37,8 +36,8 @@ class PasswordEdit(QtWidgets.QLineEdit):
|
||||
def __init__(self, show_visibility: bool = True, *args: Any, **kwargs: Any) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.visibleIcon = QtGui.QIcon(str(graphics_path / "eye.svg"))
|
||||
self.hiddenIcon = QtGui.QIcon(str(graphics_path / "hidden.svg"))
|
||||
self.visibleIcon = QtGui.QIcon(":/graphics/eye.svg")
|
||||
self.hiddenIcon = QtGui.QIcon(":/graphics/hidden.svg")
|
||||
|
||||
self.setEchoMode(QtWidgets.QLineEdit.Password)
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
force-exclude = "scripts"
|
||||
extend-exclude = "comictaggerlib/graphics/resources.py"
|
||||
|
||||
[tool.isort]
|
||||
line_length = 120
|
||||
extend_skip = ["scripts"]
|
||||
extend_skip = ["scripts", "comictaggerlib/graphics/resources.py"]
|
||||
profile = "black"
|
||||
|
||||
[build-system]
|
||||
|
@ -242,6 +242,7 @@ deps =
|
||||
extras =
|
||||
all
|
||||
commands =
|
||||
pyrcc5 comictaggerlib/graphics/graphics.qrc -o comictaggerlib/graphics/resources.py
|
||||
pyinstaller -y build-tools/comictagger.spec
|
||||
python -c 'import importlib,platform; importlib.import_module("icu") if platform.system() != "Windows" else ...' # Sanity check for icu
|
||||
|
||||
@ -312,6 +313,7 @@ per-file-ignores =
|
||||
tests/*: L
|
||||
|
||||
[mypy]
|
||||
exclude = comictaggerlib/graphics/resources.py
|
||||
check_untyped_defs = true
|
||||
disallow_any_generics = true
|
||||
disallow_incomplete_defs = true
|
||||
@ -329,3 +331,6 @@ check_untyped_defs = false
|
||||
disallow_untyped_defs = false
|
||||
disallow_incomplete_defs = false
|
||||
check_untyped_defs = false
|
||||
|
||||
[mypy-comictaggerlib.graphics.resources]
|
||||
ignore_errors = True
|
||||
|
Loading…
Reference in New Issue
Block a user