Commits

Yuya Nishihara committed ace9bb2

mq: pass opts table to OptionsDialog explicitly

It allows to switch the parent of OptionsDialog to RepoWidget.

  • Participants
  • Parent commits 4e2a2a7

Comments (0)

Files changed (1)

File tortoisehg/hgqt/mq.py

 
     @pyqtSlot()
     def launchOptionsDialog(self):
-        dlg = OptionsDialog(self)
+        dlg = OptionsDialog(self.opts, self)
         dlg.finished.connect(dlg.deleteLater)
         dlg.setWindowFlags(Qt.Sheet)
         dlg.setWindowModality(Qt.WindowModal)
 
 class OptionsDialog(QDialog):
     'Utility dialog for configuring uncommon options'
-    def __init__(self, parent):
+    def __init__(self, opts, parent=None):
         QDialog.__init__(self, parent)
         self.setWindowTitle(_('MQ options'))
 
             _('Force push or pop (--force)'))
         layout.addWidget(self.forcecb)
 
-        self.forcecb.setChecked(parent.opts.get('force', False))
+        self.forcecb.setChecked(opts.get('force', False))
 
         BB = QDialogButtonBox
         bb = QDialogButtonBox(BB.Ok|BB.Cancel)