more QIcon.ic() usage

This commit is contained in:
Kovid Goyal 2022-01-08 15:53:02 +05:30
parent 3d025c46b1
commit bcf05dfe20
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
24 changed files with 46 additions and 46 deletions

View file

@ -1097,7 +1097,7 @@ class ActionPluginUpdater(InterfaceActionBase):
class LookAndFeel(PreferencesPlugin):
name = 'Look & Feel'
icon = I('lookfeel.png')
icon = 'lookfeel.png'
gui_name = _('Look & feel')
category = 'Interface'
gui_category = _('Interface')
@ -1110,7 +1110,7 @@ class LookAndFeel(PreferencesPlugin):
class Behavior(PreferencesPlugin):
name = 'Behavior'
icon = I('config.png')
icon = 'config.png'
gui_name = _('Behavior')
category = 'Interface'
gui_category = _('Interface')
@ -1122,7 +1122,7 @@ class Behavior(PreferencesPlugin):
class Columns(PreferencesPlugin):
name = 'Custom Columns'
icon = I('column.png')
icon = 'column.png'
gui_name = _('Add your own columns')
category = 'Interface'
gui_category = _('Interface')
@ -1134,7 +1134,7 @@ class Columns(PreferencesPlugin):
class Toolbar(PreferencesPlugin):
name = 'Toolbar'
icon = I('wizard.png')
icon = 'wizard.png'
gui_name = _('Toolbars & menus')
category = 'Interface'
gui_category = _('Interface')
@ -1147,7 +1147,7 @@ class Toolbar(PreferencesPlugin):
class Search(PreferencesPlugin):
name = 'Search'
icon = I('search.png')
icon = 'search.png'
gui_name = _('Searching')
category = 'Interface'
gui_category = _('Interface')
@ -1159,7 +1159,7 @@ class Search(PreferencesPlugin):
class InputOptions(PreferencesPlugin):
name = 'Input Options'
icon = I('arrow-down.png')
icon = 'arrow-down.png'
gui_name = _('Input options')
category = 'Conversion'
gui_category = _('Conversion')
@ -1176,7 +1176,7 @@ def create_widget(self, *args, **kwargs):
class CommonOptions(PreferencesPlugin):
name = 'Common Options'
icon = I('convert.png')
icon = 'convert.png'
gui_name = _('Common options')
category = 'Conversion'
gui_category = _('Conversion')
@ -1188,7 +1188,7 @@ class CommonOptions(PreferencesPlugin):
class OutputOptions(PreferencesPlugin):
name = 'Output Options'
icon = I('arrow-up.png')
icon = 'arrow-up.png'
gui_name = _('Output options')
category = 'Conversion'
gui_category = _('Conversion')
@ -1200,7 +1200,7 @@ class OutputOptions(PreferencesPlugin):
class Adding(PreferencesPlugin):
name = 'Adding'
icon = I('add_book.png')
icon = 'add_book.png'
gui_name = _('Adding books')
category = 'Import/Export'
gui_category = _('Import/export')
@ -1213,7 +1213,7 @@ class Adding(PreferencesPlugin):
class Saving(PreferencesPlugin):
name = 'Saving'
icon = I('save.png')
icon = 'save.png'
gui_name = _('Saving books to disk')
category = 'Import/Export'
gui_category = _('Import/export')
@ -1226,7 +1226,7 @@ class Saving(PreferencesPlugin):
class Sending(PreferencesPlugin):
name = 'Sending'
icon = I('sync.png')
icon = 'sync.png'
gui_name = _('Sending books to devices')
category = 'Import/Export'
gui_category = _('Import/export')
@ -1239,7 +1239,7 @@ class Sending(PreferencesPlugin):
class Plugboard(PreferencesPlugin):
name = 'Plugboard'
icon = I('plugboard.png')
icon = 'plugboard.png'
gui_name = _('Metadata plugboards')
category = 'Import/Export'
gui_category = _('Import/export')
@ -1251,7 +1251,7 @@ class Plugboard(PreferencesPlugin):
class TemplateFunctions(PreferencesPlugin):
name = 'TemplateFunctions'
icon = I('template_funcs.png')
icon = 'template_funcs.png'
gui_name = _('Template functions')
category = 'Advanced'
gui_category = _('Advanced')
@ -1263,7 +1263,7 @@ class TemplateFunctions(PreferencesPlugin):
class Email(PreferencesPlugin):
name = 'Email'
icon = I('mail.png')
icon = 'mail.png'
gui_name = _('Sharing books by email')
category = 'Sharing'
gui_category = _('Sharing')
@ -1276,7 +1276,7 @@ class Email(PreferencesPlugin):
class Server(PreferencesPlugin):
name = 'Server'
icon = I('network-server.png')
icon = 'network-server.png'
gui_name = _('Sharing over the net')
category = 'Sharing'
gui_category = _('Sharing')
@ -1290,7 +1290,7 @@ class Server(PreferencesPlugin):
class MetadataSources(PreferencesPlugin):
name = 'Metadata download'
icon = I('download-metadata.png')
icon = 'download-metadata.png'
gui_name = _('Metadata download')
category = 'Sharing'
gui_category = _('Sharing')
@ -1302,7 +1302,7 @@ class MetadataSources(PreferencesPlugin):
class IgnoredDevices(PreferencesPlugin):
name = 'Ignored Devices'
icon = I('reader.png')
icon = 'reader.png'
gui_name = _('Ignored devices')
category = 'Sharing'
gui_category = _('Sharing')
@ -1315,7 +1315,7 @@ class IgnoredDevices(PreferencesPlugin):
class Plugins(PreferencesPlugin):
name = 'Plugins'
icon = I('plugins.png')
icon = 'plugins.png'
gui_name = _('Plugins')
category = 'Advanced'
gui_category = _('Advanced')
@ -1328,7 +1328,7 @@ class Plugins(PreferencesPlugin):
class Tweaks(PreferencesPlugin):
name = 'Tweaks'
icon = I('tweaks.png')
icon = 'tweaks.png'
gui_name = _('Tweaks')
category = 'Advanced'
gui_category = _('Advanced')
@ -1340,7 +1340,7 @@ class Tweaks(PreferencesPlugin):
class Keyboard(PreferencesPlugin):
name = 'Keyboard'
icon = I('keyboard-prefs.png')
icon = 'keyboard-prefs.png'
gui_name = _('Shortcuts')
category = 'Advanced'
gui_category = _('Advanced')
@ -1352,7 +1352,7 @@ class Keyboard(PreferencesPlugin):
class Misc(PreferencesPlugin):
name = 'Misc'
icon = I('exec.png')
icon = 'exec.png'
gui_name = _('Miscellaneous')
category = 'Advanced'
gui_category = _('Advanced')

View file

@ -105,7 +105,7 @@ def widget_factory(cls):
output_widget = importlib.import_module(
'calibre.gui2.convert.'+name)
pw = output_widget.PluginWidget
pw.ICON = I('back.png')
pw.ICON = 'back.png'
pw.HELP = _('Options specific to the output format.')
return widget_factory(pw)
except ImportError:
@ -115,7 +115,7 @@ def widget_factory(cls):
input_widget = importlib.import_module(
'calibre.gui2.convert.'+name)
pw = input_widget.PluginWidget
pw.ICON = I('forward.png')
pw.ICON = 'forward.png'
pw.HELP = _('Options specific to the input format.')
return widget_factory(pw)
except ImportError:

View file

@ -18,7 +18,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('AZW3 output')
HELP = _('Options specific to')+' AZW3 '+_('output')
COMMIT_NAME = 'azw3_output'
ICON = I('mimetypes/azw3.png')
ICON = 'mimetypes/azw3.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['azw3'])

View file

@ -16,7 +16,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('Comic input')
HELP = _('Options specific to')+' comic '+_('input')
COMMIT_NAME = 'comic_input'
ICON = I('mimetypes/png.png')
ICON = 'mimetypes/png.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['comic'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('DOCX input')
HELP = _('Options specific to')+' DOCX '+_('input')
COMMIT_NAME = 'docx_input'
ICON = I('mimetypes/docx.png')
ICON = 'mimetypes/docx.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['docx'])

View file

@ -16,7 +16,7 @@ class PluginWidget(Widget):
TITLE = _('DOCX output')
HELP = _('Options specific to')+' DOCX '+_('output')
COMMIT_NAME = 'docx_output'
ICON = I('mimetypes/docx.png')
ICON = 'mimetypes/docx.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['docx'])

View file

@ -16,7 +16,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('EPUB output')
HELP = _('Options specific to')+' EPUB '+_('output')
COMMIT_NAME = 'epub_output'
ICON = I('mimetypes/epub.png')
ICON = 'mimetypes/epub.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['epub'])

View file

@ -12,7 +12,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('FB2 input')
HELP = _('Options specific to')+' FB2 '+_('input')
COMMIT_NAME = 'fb2_input'
ICON = I('mimetypes/fb2.png')
ICON = 'mimetypes/fb2.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['fb2'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('FB2 output')
HELP = _('Options specific to')+' FB2 '+_('output')
COMMIT_NAME = 'fb2_output'
ICON = I('mimetypes/fb2.png')
ICON = 'mimetypes/fb2.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['fb2'])

View file

@ -16,7 +16,7 @@ class HeuristicsWidget(Widget, Ui_Form):
TITLE = _('Heuristic\nprocessing')
HELP = _('Modify the document text and structure using common patterns.')
COMMIT_NAME = 'heuristics'
ICON = I('heuristics.png')
ICON = 'heuristics.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['pipe']['heuristics'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('HTMLZ output')
HELP = _('Options specific to')+' HTMLZ '+_('output')
COMMIT_NAME = 'htmlz_output'
ICON = I('mimetypes/html.png')
ICON = 'mimetypes/html.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['htmlz'])

View file

@ -17,7 +17,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('LRF output')
HELP = _('Options specific to')+' LRF '+_('output')
COMMIT_NAME = 'lrf_output'
ICON = I('mimetypes/lrf.png')
ICON = 'mimetypes/lrf.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['lrf'])

View file

@ -18,7 +18,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('MOBI output')
HELP = _('Options specific to')+' MOBI '+_('output')
COMMIT_NAME = 'mobi_output'
ICON = I('mimetypes/mobi.png')
ICON = 'mimetypes/mobi.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['mobi'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('PDB output')
HELP = _('Options specific to')+' PDB '+_('output')
COMMIT_NAME = 'pdb_output'
ICON = I('mimetypes/unknown.png')
ICON = 'mimetypes/unknown.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['pdb'])

View file

@ -12,7 +12,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('PDF input')
HELP = _('Options specific to')+' PDF '+_('input')
COMMIT_NAME = 'pdf_input'
ICON = I('mimetypes/pdf.png')
ICON = 'mimetypes/pdf.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['pdf'])

View file

@ -19,7 +19,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('PDF output')
HELP = _('Options specific to')+' PDF '+_('output')
COMMIT_NAME = 'pdf_output'
ICON = I('mimetypes/pdf.png')
ICON = 'mimetypes/pdf.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['pdf'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('PMLZ output')
HELP = _('Options specific to')+' PMLZ '+_('output')
COMMIT_NAME = 'pmlz_output'
ICON = I('mimetypes/unknown.png')
ICON = 'mimetypes/unknown.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['pml'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('RB output')
HELP = _('Options specific to')+' RB '+_('output')
COMMIT_NAME = 'rb_output'
ICON = I('mimetypes/unknown.png')
ICON = 'mimetypes/unknown.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['rb'])

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('RTF input')
HELP = _('Options specific to')+' RTF '+_('input')
COMMIT_NAME = 'rtf_input'
ICON = I('mimetypes/rtf.png')
ICON = 'mimetypes/rtf.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['rtf'])

View file

@ -21,7 +21,7 @@ class SearchAndReplaceWidget(Widget, Ui_Form):
TITLE = _('Search &\nreplace')
HELP = _('Modify the document text and structure using user defined patterns.')
COMMIT_NAME = 'search_and_replace'
ICON = I('search.png')
ICON = 'search.png'
STRIP_TEXT_FIELDS = False
def __init__(self, parent, get_option, get_help, db=None, book_id=None):

View file

@ -14,7 +14,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('SNB output')
HELP = _('Options specific to')+' SNB '+_('output')
COMMIT_NAME = 'snb_output'
ICON = I('mimetypes/snb.png')
ICON = 'mimetypes/snb.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['snb'])

View file

@ -16,7 +16,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('TXT input')
HELP = _('Options specific to')+' TXT '+_('input')
COMMIT_NAME = 'txt_input'
ICON = I('mimetypes/txt.png')
ICON = 'mimetypes/txt.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['input']['txt'])

View file

@ -13,7 +13,7 @@ class PluginWidget(Widget, Ui_Form):
TITLE = _('TXT output')
HELP = _('Options specific to')+' TXT '+_('output')
COMMIT_NAME = 'txt_output'
ICON = I('mimetypes/txt.png')
ICON = 'mimetypes/txt.png'
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['txt'])

View file

@ -53,7 +53,7 @@ def __init__(self, parent, dbspec, ids, db):
pw = catalog_widget.PluginWidget()
pw.parent_ref = weakref.ref(self)
pw.initialize(name, db)
pw.ICON = I('forward.png')
pw.ICON = 'forward.png'
self.widgets.append(pw)
[self.fmts.append([file_type.upper(), pw.sync_enabled,pw]) for file_type in plugin.file_types]
except ImportError:
@ -86,7 +86,7 @@ def __init__(self, parent, dbspec, ids, db):
catalog_widget = importlib.import_module(name)
pw = catalog_widget.PluginWidget()
pw.initialize(name)
pw.ICON = I('forward.png')
pw.ICON = 'forward.png'
self.widgets.append(pw)
[self.fmts.append([file_type.upper(), pw.sync_enabled,pw]) for file_type in plugin.file_types]
except ImportError: