Merge from trunk

This commit is contained in:
Charles Haley 2010-06-03 20:26:37 +01:00
commit 45eb98c319
5 changed files with 9 additions and 9 deletions

View File

@ -222,6 +222,8 @@ class DBAdder(Thread):
class Adder(QObject): class Adder(QObject):
ADD_TIMEOUT = 600 # seconds
def __init__(self, parent, db, callback, spare_server=None): def __init__(self, parent, db, callback, spare_server=None):
QObject.__init__(self, parent) QObject.__init__(self, parent)
self.pd = ProgressDialog(_('Adding...'), parent=parent) self.pd = ProgressDialog(_('Adding...'), parent=parent)
@ -328,7 +330,7 @@ class Adder(QObject):
except Empty: except Empty:
pass pass
if (time.time() - self.last_added_at) > 300: if (time.time() - self.last_added_at) > self.ADD_TIMEOUT:
self.timer.stop() self.timer.stop()
self.pd.hide() self.pd.hide()
self.db_adder.end = True self.db_adder.end = True

View File

@ -3,14 +3,12 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
from PyQt4.QtCore import SIGNAL, Qt from PyQt4.QtCore import SIGNAL
from PyQt4.QtGui import QDialog, QIcon, QListWidgetItem from PyQt4.QtGui import QDialog
from calibre.gui2.dialogs.saved_search_editor_ui import Ui_SavedSearchEditor from calibre.gui2.dialogs.saved_search_editor_ui import Ui_SavedSearchEditor
from calibre.utils.config import prefs
from calibre.utils.search_query_parser import saved_searches from calibre.utils.search_query_parser import saved_searches
from calibre.gui2.dialogs.confirm_delete import confirm from calibre.gui2.dialogs.confirm_delete import confirm
from calibre.constants import islinux
class SavedSearchEditor(QDialog, Ui_SavedSearchEditor): class SavedSearchEditor(QDialog, Ui_SavedSearchEditor):

View File

@ -145,7 +145,7 @@ class TagsView(QTreeView): # {{{
if tag_name and \ if tag_name and \
(key in ['authors', 'tags', 'series', 'publisher', 'search'] or \ (key in ['authors', 'tags', 'series', 'publisher', 'search'] or \
self.db.field_metadata[key]['is_custom']): self.db.field_metadata[key]['is_custom']):
self.context_menu.addAction(_('Rename item') + " '" + tag_name + "'", self.context_menu.addAction(_('Rename') + " '" + tag_name + "'",
partial(self.context_menu_handler, action='edit_item', partial(self.context_menu_handler, action='edit_item',
category=tag_item, index=index)) category=tag_item, index=index))
self.context_menu.addSeparator() self.context_menu.addSeparator()

View File

@ -241,9 +241,9 @@ Now, you can access your saved search in the Tag Browser under "Searches". A sin
.. _configuration: .. _configuration:
Configuration Preferences
--------------- ---------------
The configuration dialog allows you to set some global defaults used by all of |app|. To access it, click the |cbi|. The Preferences dialog allows you to set some global defaults used by all of |app|. To access it, click the |cbi|.
.. |cbi| image:: images/configuration.png .. |cbi| image:: images/configuration.png

View File

@ -5,7 +5,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
from lxml import html, etree from lxml import html, etree
from lxml.html.builder import HTML, HEAD, TITLE, STYLE, DIV, BODY, \ from lxml.html.builder import HTML, HEAD, TITLE, STYLE, DIV, BODY, \
STRONG, BR, H1, SPAN, A, HR, UL, LI, H2, IMG, P as PT, \ STRONG, BR, SPAN, A, HR, UL, LI, H2, IMG, P as PT, \
TABLE, TD, TR TABLE, TD, TR
from calibre import preferred_encoding, strftime, isbytestring from calibre import preferred_encoding, strftime, isbytestring