Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

hggtk: use new Settings class in clone and config dialogs

Changeset be9114b959cc

Parent e0c29a31db58

by TK Soh

Changes to 2 files · Browse files at be9114b959cc Showing diff from parent e0c29a31db58 Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​clone.py Stacked
 
35
36
37
38
 
39
40
41
 
95
96
97
98
 
99
100
101
 
212
213
214
215
216
217
218
 
 
 
 
219
220
221
 
35
36
37
 
38
39
40
41
 
95
96
97
 
98
99
100
101
 
212
213
214
 
 
 
 
215
216
217
218
219
220
221
@@ -35,7 +35,7 @@
    self._src_path = ''   self._dest_path = '' - self._history = shlib.read_history('clone') + self._settings = shlib.Settings('clone')     try:   self._src_path = repos[0] @@ -95,7 +95,7 @@
    # add pre-defined src paths to pull-down list   sympaths = [x[1] for x in ui.ui().configitems('paths')] - recentsrc = self._history.get('src_paths', []) + recentsrc = self._settings.get('src_paths', [])   paths = list(set(sympaths + recentsrc))   paths.sort()   for p in paths: self._srclist.append([p]) @@ -212,10 +212,10 @@
  self._srclist.append([p])     # save path to recent list in history - if not 'src_paths' in self._history: - self._history['src_paths'] = [] - self._history['src_paths'].append(src) - shlib.save_history(self._history, 'clone') + if not 'src_paths' in self._settings: + self._settings['src_paths'] = [] + self._settings['src_paths'].append(src) + self._settings.write()     def _btn_clone_clicked(self, toolbutton, data=None):   # gather input data
 
66
67
68
69
 
70
71
72
 
535
536
537
538
 
539
540
541
 
561
562
563
564
 
565
566
567
 
66
67
68
 
69
70
71
72
 
535
536
537
 
538
539
540
541
 
561
562
563
 
564
565
566
567
@@ -66,7 +66,7 @@
  self.dirty = False   self.pages = []   self.tooltips = gtk.Tooltips() - self.history = shlib.read_history() + self.history = shlib.Settings('config_history')     # create pages for each section of configuration file   self._tortoise_info = ( @@ -535,7 +535,7 @@
    def _apply_clicked(self, *args):   # Reload history, since it may have been modified externally - self.history = shlib.read_history() + self.history.read()     # flush changes on paths page   if len(self.pathlist): @@ -561,7 +561,7 @@
  newvalue = widgets[w].child.get_text()   self.record_new_value(cpath, newvalue)   - shlib.save_history(self.history) + self.history.write()   try:   f = open(self.fn, "w")   f.write(str(self.ini))