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

clone: separate core logic from signal handlers

Changeset bb75991fa45a

Parent c159e77cf2da

by Yuki KODAMA

Changes to one file · Browse files at bb75991fa45a Showing diff from parent c159e77cf2da Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​clone.py Stacked
 
30
31
32
33
 
34
35
36
 
118
119
120
121
122
 
123
124
125
126
 
127
128
129
130
131
132
133
 
134
135
136
 
266
267
268
269
 
270
271
272
 
30
31
32
 
33
34
35
36
 
118
119
120
 
 
121
122
123
124
125
126
127
128
129
130
131
132
 
133
134
135
136
 
266
267
268
 
269
270
271
272
@@ -30,7 +30,7 @@
    # add clone button   clonebutton = gtk.Button(_('Clone')) - clonebutton.connect('clicked', self.clone_clicked) + clonebutton.connect('clicked', lambda b: self.clone())   self.action_area.pack_end(clonebutton)     self.ui = ui.ui() @@ -118,19 +118,19 @@
  for p in paths:   self.srclist.append([p])   - ## clone destination - destbox = gtk.HBox() + ## clone dest label   lbl = gtk.Label(_('Destination path:'))   lbl.set_alignment(1, 0.5)     ## comboentry for destination paths + destbox = gtk.HBox()   self.destlist = gtk.ListStore(str)   destcombo = gtk.ComboBoxEntry(self.destlist, 0)   setcombosize(destcombo)   self.destentry = destcombo.get_child()   self.destentry.set_text(destpath)   self.destentry.set_position(-1) - self.destentry.connect('activate', self.clone_clicked) + self.destentry.connect('activate', lambda b: self.clone())   destbox.pack_start(destcombo)     ## replace the drop-down widget so we can modify it's properties @@ -266,7 +266,7 @@
  for p in paths:   self.destlist.append([p])   - def clone_clicked(self, toolbutton, data=None): + def clone(self):   # gather input data   src = self.srcentry.get_text()   dest = self.destentry.get_text() or os.path.basename(src)