Commits

Yuya Nishihara  committed 5ec0472

graft: save/restore boolean command options

  • Participants
  • Parent commits b1532ad

Comments (0)

Files changed (1)

File tortoisehg/hgqt/graft.py

         return self._repoagent.rawRepo()
 
     def _readSettings(self):
+        ui = self.repo.ui
         qs = QSettings()
         qs.beginGroup('graft')
-        self._optchks['autoresolve'].setChecked(
-            self.repo.ui.configbool('tortoisehg', 'autoresolve',
-                                    qs.value('autoresolve', True).toBool()))
+        for n, w in self._optchks.iteritems():
+            if n == 'autoresolve':
+                w.setChecked(ui.configbool('tortoisehg', n,
+                                           qs.value(n, True).toBool()))
+            else:
+                w.setChecked(qs.value(n).toBool())
         qs.endGroup()
 
     def _writeSettings(self):
         qs = QSettings()
         qs.beginGroup('graft')
-        qs.setValue('autoresolve', self._optchks['autoresolve'].isChecked())
+        for n, w in self._optchks.iteritems():
+            qs.setValue(n, w.isChecked())
         qs.endGroup()
 
     def _updateSourceTitle(self, idx):