puschschsch
This commit is contained in:
parent
36328a01a4
commit
afe45f9970
@ -343,9 +343,6 @@ class Application(QApplication):
|
||||
self.lastWindowClosed.connect(self.shutdown)
|
||||
config_obj.style_changed.connect(style.get_stylesheet.cache_clear)
|
||||
self.focusChanged.connect(self.on_focus_changed)
|
||||
quickmark_model = objreg.get('completer').models[usertypes.Completion.quickmark]
|
||||
quickmark_manager = objreg.get('quickmark-manager')
|
||||
quickmark_manager.changed.connect(quickmark_model.on_quickmarks.changed)
|
||||
|
||||
def _get_widgets(self):
|
||||
"""Get a string list of all widgets."""
|
||||
|
@ -203,6 +203,9 @@ class QuickmarkCompletionModel(basecompletion.BaseCompletionModel):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self._on_quickmarks_changed(self)
|
||||
|
||||
def _on_quickmarks_changed(self, parent=None):
|
||||
|
||||
qmlist = []
|
||||
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
|
||||
|
@ -186,7 +186,7 @@ class Completer(QObject):
|
||||
self._ignore_change = True
|
||||
self.change_completed_part.emit(data, False)
|
||||
|
||||
@pyqtSlot(str, list, int)
|
||||
@pyqtSlot()
|
||||
def on_quickmarks_changed(self):
|
||||
self.clear()
|
||||
self._init_quickmark_completions()
|
||||
|
@ -119,6 +119,10 @@ class MainWindow(QWidget):
|
||||
config.on_change(self.resize_completion, 'completion', 'height')
|
||||
config.on_change(self.resize_completion, 'completion', 'shrink')
|
||||
|
||||
quickmark_model = self._get_object('completer').models[usertypes.Completion.quickmark]
|
||||
quickmark_manager = objreg.get('quickmark-manager')
|
||||
quickmark_manager.changed.connect(quickmark_model.srcmodel.on_quickmarks_changed)
|
||||
|
||||
#self.retranslateUi(MainWindow)
|
||||
#self.tabWidget.setCurrentIndex(0)
|
||||
#QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user