mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1927688 [Open icon folder produces error](https://bugs.launchpad.net/calibre/+bug/1927688)
This commit is contained in:
parent
752f8de057
commit
43c70c10d0
@ -975,8 +975,7 @@ class EditRules(QWidget): # {{{
|
|||||||
|
|
||||||
self.open_icon_folder_button = b = QPushButton(QIcon(I('icon_choose.png')),
|
self.open_icon_folder_button = b = QPushButton(QIcon(I('icon_choose.png')),
|
||||||
_('Open icon folder'), self)
|
_('Open icon folder'), self)
|
||||||
connect_lambda(b.clicked, self,
|
b.clicked.connect(self.open_icon_folder)
|
||||||
lambda _: open_local_file(os.path.join(config_dir, 'cc_icons')))
|
|
||||||
hb.addWidget(b)
|
hb.addWidget(b)
|
||||||
sep = Separator(self, b)
|
sep = Separator(self, b)
|
||||||
hb.addWidget(sep)
|
hb.addWidget(sep)
|
||||||
@ -989,6 +988,11 @@ class EditRules(QWidget): # {{{
|
|||||||
b.clicked.connect(self.import_rules)
|
b.clicked.connect(self.import_rules)
|
||||||
hb.addWidget(b)
|
hb.addWidget(b)
|
||||||
|
|
||||||
|
def open_icon_folder(self):
|
||||||
|
path = os.path.join(config_dir, 'cc_icons')
|
||||||
|
os.makedirs(path, exist_ok=True)
|
||||||
|
open_local_file(path)
|
||||||
|
|
||||||
def initialize(self, fm, prefs, mi, pref_name):
|
def initialize(self, fm, prefs, mi, pref_name):
|
||||||
self.pref_name = pref_name
|
self.pref_name = pref_name
|
||||||
self.model = RulesModel(prefs, fm, self.pref_name)
|
self.model = RulesModel(prefs, fm, self.pref_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user