2022-09-05 22:34:40 +06:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# GUI for the ACSM plugin.
|
|
|
|
#
|
|
|
|
|
|
|
|
from calibre.customize import InterfaceActionBase # type: ignore
|
2022-10-09 14:56:44 +06:00
|
|
|
try:
|
|
|
|
from calibre.customize import PluginInstallationType
|
|
|
|
except:
|
|
|
|
pass
|
2022-09-05 22:34:40 +06:00
|
|
|
|
2022-10-23 14:06:54 +06:00
|
|
|
from calibre_plugins.deacsm.__init__ import ACSMInput
|
2022-09-05 22:34:40 +06:00
|
|
|
|
|
|
|
|
|
|
|
#@@CALIBRE_COMPAT_CODE@@
|
|
|
|
|
2022-10-08 21:51:15 +06:00
|
|
|
class ACSMInputGUIExtension(InterfaceActionBase):
|
2022-09-05 22:34:40 +06:00
|
|
|
name = "ACSM Input Plugin GUI Extension"
|
2022-10-08 21:51:15 +06:00
|
|
|
description = "GUI code for ACSM Input Plugin. This is automatically installed and updated with the ACSM plugin."
|
2022-09-05 22:34:40 +06:00
|
|
|
supported_platforms = ['linux', 'osx', 'windows']
|
|
|
|
author = "Leseratte10"
|
|
|
|
minimum_calibre_version = (4, 0, 0)
|
|
|
|
|
|
|
|
can_be_disabled = False
|
|
|
|
# This plugin will be auto-loaded from the ACSM Input plugin. It doesn't make sense for the user
|
|
|
|
# to disable it. If necessary, the menu bar button can be removed through the Calibre settings.
|
|
|
|
|
2022-10-23 14:06:54 +06:00
|
|
|
type = ACSMInput.type
|
2022-09-05 22:34:40 +06:00
|
|
|
# Just so that the GUI extension shows up at the same place as the actual ACSM Input plugin.
|
|
|
|
|
2022-10-09 14:56:44 +06:00
|
|
|
try:
|
|
|
|
installation_type = PluginInstallationType.EXTERNAL
|
|
|
|
# Mark this as user-installed so it shows up in the plugin list by default.
|
|
|
|
except:
|
|
|
|
# Setting the Installation type doesn't always work on Calibre 4 and below.
|
|
|
|
pass
|
2022-09-05 22:34:40 +06:00
|
|
|
|
2022-10-08 21:51:15 +06:00
|
|
|
actual_plugin = "calibre_plugins.deacsm.gui_main:ActualACSMInputGUIExtension"
|
2022-09-05 22:34:40 +06:00
|
|
|
|
|
|
|
def is_customizable(self):
|
|
|
|
return False
|
|
|
|
|
|
|
|
|