-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.py
41 lines (29 loc) · 1.17 KB
/
ui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2017, Kerim Ölçer <[email protected]>, Ali Güven Odabaşıoğlu <[email protected]>'
__docformat__ = 'restructuredtext en'
if False:
get_icons = get_resources = None
# The class that all interface action plugins must inherit from
from calibre.gui2.actions import InterfaceAction
try:
from calibre_plugins.cloud_sync.main import DemoDialog, MainWindowForm
except:
from calibre_plugins.cloud_sync.emain import DemoDialog, MainWindowForm
class InterfacePlugin(InterfaceAction):
name = 'Cloud Sync'
action_spec = ('Cloud Sync', None,
'Cloud Sync', 'Ctrl+Shift+F1')
def genesis(self):
icon = get_icons('images/icon.png')
self.qaction.setIcon(icon)
self.qaction.triggered.connect(self.show_dialog)
def show_dialog(self):
self.mainwindow=MainWindowForm()
self.mainwindow.show()
def apply_settings(self):
from calibre_plugins.cloud_sync.config import prefs
prefs