Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

init: separate core logic from signal handlers

Changeset 485bb615a1fb

Parent 7d611277b59a

by Yuki KODAMA

Changes to one file · Browse files at 485bb615a1fb Showing diff from parent 7d611277b59a Diff from another changeset...

Change 1 of 4 Show Entire File hggtk/​hginit.py Stacked
 
28
29
30
31
 
32
33
34
 
60
61
62
63
 
64
65
66
 
85
86
87
88
89
90
91
92
93
 
97
98
99
100
 
101
102
103
 
28
29
30
 
31
32
33
34
 
60
61
62
 
63
64
65
66
 
85
86
87
 
 
 
88
89
90
 
94
95
96
 
97
98
99
100
@@ -28,7 +28,7 @@
    # add create button   createbutton = gtk.Button(_('Create')) - createbutton.connect('clicked', self.create_clicked) + createbutton.connect('clicked', lambda b: self.init())   self.action_area.pack_end(createbutton)     self.cwd = os.getcwd() @@ -60,7 +60,7 @@
  self.destentry.set_text(hglib.toutf(self.dest_path))   self.destentry.grab_focus()   self.destentry.set_position(-1) - self.destentry.connect('activate', self.dest_activated, createbutton) + self.destentry.connect('activate', lambda b: self.init())   destbox.pack_start(self.destentry, True, True, 2)     destbrowse = gtk.Button(_('Browse...')) @@ -85,9 +85,6 @@
  except:   pass   - def dest_activated(self, entry, button): - self.create_clicked(button) -   def dest_clicked(self, button):   """ select destination folder to clone """   response = gtklib.NativeFolderSelectDialog( @@ -97,7 +94,7 @@
  self.destentry.set_text(response)   self.destentry.set_position(-1)   - def create_clicked(self, button, data=None): + def init(self):   # gather input data   dest = hglib.fromutf(self.destentry.get_text())