Changeset c634a870dc41…
Parent 80def0153b78…
by
Changes to one file · Browse files at c634a870dc41 Showing diff from parent 80def0153b78 Diff from another changeset...
@@ -125,6 +125,8 @@
self.messageEditor = commit.MessageEntry(self)
self.messageEditor.installEventFilter(qscilib.KeyPressInterceptor(self))
+ self.messageEditor.setContextMenuPolicy(Qt.CustomContextMenu)
+ self.messageEditor.customContextMenuRequested.connect(self.menuRequested)
self.messageEditor.refresh(repo)
layout.addWidget(self.messageEditor, 1)
@@ -190,6 +192,10 @@ self.loadConfigs()
QTimer.singleShot(0, self.reload)
+ def menuRequested(self, point):
+ point = self.messageEditor.mapToGlobal(point)
+ return self.messageEditor.createStandardContextMenu().exec_(point)
+
def getUserOptions(self, *optionlist):
out = []
for opt in optionlist:
@@ -645,6 +651,7 @@ self.splitter.restoreState(s.value('mq/splitter').toByteArray())
userhist = s.value('commit/userhist').toStringList()
self.opts['userhist'] = [hglib.fromunicode(u) for u in userhist if u]
+ self.messageEditor.loadSettings(s, 'mq/editor')
if not self.parent():
self.restoreGeometry(s.value('mq/geom').toByteArray())
@@ -652,6 +659,7 @@ 'Save history, etc, in QSettings instance'
s = QSettings()
s.setValue('mq/splitter', self.splitter.saveState())
+ self.messageEditor.saveSettings(s, 'mq/editor')
if not self.parent():
s.setValue('mq/geom', self.saveGeometry())
|
Loading...