mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-02 10:24:15 +01:00
...
This commit is contained in:
parent
9975995ed2
commit
a073f050ec
1 changed files with 5 additions and 3 deletions
|
|
@ -49,7 +49,7 @@ def contextMenuEvent(self, *args):
|
|||
|
||||
# Location View {{{
|
||||
|
||||
class LocationModel(QAbstractListModel):
|
||||
class LocationModel(QAbstractListModel): # {{{
|
||||
|
||||
devicesChanged = pyqtSignal()
|
||||
|
||||
|
|
@ -160,6 +160,8 @@ def location_for_row(self, row):
|
|||
if row == 3: return 'cardb'
|
||||
return 'carda' if self.free[1] > -1 else 'cardb'
|
||||
|
||||
# }}}
|
||||
|
||||
class LocationView(QListView):
|
||||
|
||||
unmount_device = pyqtSignal()
|
||||
|
|
@ -194,6 +196,7 @@ def __init__(self, parent):
|
|||
self.setViewMode(self.ListMode)
|
||||
self.setWordWrap(True)
|
||||
self.setObjectName("location_view")
|
||||
self.setMaximumHeight(74)
|
||||
|
||||
def eject_clicked(self, *args):
|
||||
self.unmount_device.emit()
|
||||
|
|
@ -359,8 +362,7 @@ def __init__(self, actions, donate, location_view, parent=None):
|
|||
self._layout.addWidget(donate)
|
||||
|
||||
self._layout.insertWidget(3, location_view)
|
||||
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
self.setMaximumHeight(but.sizeHint().height()+5)
|
||||
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Maximum)
|
||||
|
||||
def button_for_action(self, ac):
|
||||
b = QToolButton(self)
|
||||
|
|
|
|||
Loading…
Reference in a new issue