mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e121e77b63
commit
9e10b0b71c
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from PyQt4.Qt import QIcon, Qt, QWidget, QAction, QToolBar, QSize, \
|
from PyQt4.Qt import QIcon, Qt, QWidget, QToolBar, QSize, \
|
||||||
pyqtSignal, QToolButton, \
|
pyqtSignal, QToolButton, \
|
||||||
QObject, QVBoxLayout, QSizePolicy, QLabel, QHBoxLayout, QActionGroup, \
|
QObject, QVBoxLayout, QSizePolicy, QLabel, QHBoxLayout, QActionGroup, \
|
||||||
QMenu
|
QMenu
|
||||||
@ -201,7 +201,7 @@ class SearchBar(QWidget): # {{{
|
|||||||
|
|
||||||
class ToolBar(QToolBar): # {{{
|
class ToolBar(QToolBar): # {{{
|
||||||
|
|
||||||
def __init__(self, actions, donate, location_manager, parent=None):
|
def __init__(self, donate, location_manager, parent):
|
||||||
QToolBar.__init__(self, parent)
|
QToolBar.__init__(self, parent)
|
||||||
self.setContextMenuPolicy(Qt.PreventContextMenu)
|
self.setContextMenuPolicy(Qt.PreventContextMenu)
|
||||||
self.setMovable(False)
|
self.setMovable(False)
|
||||||
@ -212,7 +212,6 @@ class ToolBar(QToolBar): # {{{
|
|||||||
self.donate = donate
|
self.donate = donate
|
||||||
self.apply_settings()
|
self.apply_settings()
|
||||||
|
|
||||||
self.all_actions = actions
|
|
||||||
self.location_manager = location_manager
|
self.location_manager = location_manager
|
||||||
self.location_manager.locations_changed.connect(self.build_bar)
|
self.location_manager.locations_changed.connect(self.build_bar)
|
||||||
self.d_widget = QWidget()
|
self.d_widget = QWidget()
|
||||||
@ -296,9 +295,6 @@ class ToolBar(QToolBar): # {{{
|
|||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
class Action(QAction):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class MainWindowMixin(object):
|
class MainWindowMixin(object):
|
||||||
|
|
||||||
def __init__(self, db):
|
def __init__(self, db):
|
||||||
@ -319,7 +315,7 @@ class MainWindowMixin(object):
|
|||||||
self.iactions['Fetch News'].init_scheduler(db)
|
self.iactions['Fetch News'].init_scheduler(db)
|
||||||
|
|
||||||
self.search_bar = SearchBar(self)
|
self.search_bar = SearchBar(self)
|
||||||
self.tool_bar = ToolBar(all_actions, self.donate_button,
|
self.tool_bar = ToolBar(self.donate_button,
|
||||||
self.location_manager, self)
|
self.location_manager, self)
|
||||||
self.addToolBar(Qt.TopToolBarArea, self.tool_bar)
|
self.addToolBar(Qt.TopToolBarArea, self.tool_bar)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user