Comment 17 for bug 349336

Revision history for this message
Cody Russell (bratsche) wrote :

If I'm reading the patch correctly, it seems that you're changing the response types in the buttons but not in the actual dialog response handling.

dialog = self.gtk.MessageDialog(parent=self.window_main,
                                         type=self.gtk.MESSAGE_WARNING,
- buttons=self.gtk.BUTTONS_YES_NO,
+ buttons=self.gtk.BUTTONS_NONE,
                                         message_format=msg)

The response types were GTK_RESPONSE_YES and GTK_RESPONSE_NO before..

+ dialog.add_button(self.gtk.STOCK_CANCEL, self.gtk.RESPONSE_CLOSE)
+ remove = dialog.add_button(self.gtk.STOCK_OK,self.gtk.RESPONSE_YES)

And here the buttons added use GTK_RESPONSE_YES and GTK_RESPONSE_CLOSE.