mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
...
This commit is contained in:
parent
1f1128d5a4
commit
aaefd462d9
@ -6,11 +6,11 @@ import time, os
|
||||
from PyQt4.Qt import SIGNAL, QUrl, QAbstractListModel, Qt, \
|
||||
QVariant
|
||||
|
||||
from calibre.web.feeds.recipes import compile_recipe
|
||||
from calibre.web.feeds.recipes import compile_recipe, custom_recipes
|
||||
from calibre.web.feeds.news import AutomaticNewsRecipe
|
||||
from calibre.gui2.dialogs.user_profiles_ui import Ui_Dialog
|
||||
from calibre.gui2 import error_dialog, question_dialog, open_url, \
|
||||
choose_files, ResizableDialog, NONE
|
||||
choose_files, ResizableDialog, NONE, open_local_file
|
||||
from calibre.gui2.widgets import PythonHighlighter
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.utils.icu import sort_key
|
||||
@ -93,6 +93,7 @@ class UserProfiles(ResizableDialog, Ui_Dialog):
|
||||
self.connect(self.load_button, SIGNAL('clicked()'), self.load)
|
||||
self.connect(self.builtin_recipe_button, SIGNAL('clicked()'), self.add_builtin_recipe)
|
||||
self.connect(self.share_button, SIGNAL('clicked()'), self.share)
|
||||
self.show_recipe_files_button.clicked.connect(self.show_recipe_files)
|
||||
self.connect(self.down_button, SIGNAL('clicked()'), self.down)
|
||||
self.connect(self.up_button, SIGNAL('clicked()'), self.up)
|
||||
self.connect(self.add_profile_button, SIGNAL('clicked(bool)'),
|
||||
@ -102,6 +103,10 @@ class UserProfiles(ResizableDialog, Ui_Dialog):
|
||||
self.connect(self.toggle_mode_button, SIGNAL('clicked(bool)'), self.toggle_mode)
|
||||
self.clear()
|
||||
|
||||
def show_recipe_files(self, *args):
|
||||
bdir = os.path.dirname(custom_recipes.file_path)
|
||||
open_local_file(bdir)
|
||||
|
||||
def break_cycles(self):
|
||||
self.recipe_model = self._model.recipe_model = None
|
||||
self.available_profiles = None
|
||||
|
@ -35,7 +35,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>730</width>
|
||||
<height>600</height>
|
||||
<height>601</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@ -102,6 +102,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="show_recipe_files_button">
|
||||
<property name="text">
|
||||
<string>S&how recipe files</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../resources/images.qrc">
|
||||
<normaloff>:/images/document_open.png</normaloff>:/images/document_open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="builtin_recipe_button">
|
||||
<property name="text">
|
||||
|
Loading…
x
Reference in New Issue
Block a user