Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.3, 1.0, and 1.0.1

stable quickop: prevent AttributeError caused by 'self.abortbtn'

Finally, I figured out that 'set_no_show_all()' can not be used to prevent
adding bottom buttons by 'add_button()'. So I had to defer it and add it
in 'after_init()'.

Fixes #888

Changeset d0cbd66e993e

Parent eabe6ecff707

by Yuki KODAMA

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

 
56
57
58
 
 
 
59
60
61
 
178
179
180
181
182
183
 
 
184
185
186
 
56
57
58
59
60
61
62
63
64
 
181
182
183
 
 
 
184
185
186
187
188
@@ -56,6 +56,9 @@
  # add dialog buttons   self.gobutton = self.add_button(labels[command][1], gtk.RESPONSE_OK)   self.closebtn = self.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CLOSE) + self.abortbtn = gtk.Button(_('Abort')) + self.abortbtn.connect('clicked', + lambda *a: self.response(gtk.RESPONSE_CANCEL))     lbl = gtk.Label(labels[command][0])   lbl.set_alignment(0, 0) @@ -178,9 +181,8 @@
  self.cmd.hide()   self.vbox.pack_start(self.cmd, False, False, 6)   - # abort button - self.abortbtn = self.add_button(_('Abort'), gtk.RESPONSE_CANCEL) - self.abortbtn.hide() + # add Abort button + self.action_area.add(self.abortbtn)     def abort(self):   self.cmd.stop()