Ticket #3772: 0001-Edit-Lesson-Radio-Button.patch

File 0001-Edit-Lesson-Radio-Button.patch, 1.2 KB (added by humitos, 12 years ago)
  • editlessonscreen.py

    From ecbc179f8d6a1c4b86f8a56a7b2173db75cbf680 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Mon, 13 Aug 2012 11:52:10 -0300
    Subject: [PATCH Typing Turtle 1/2] Edit Lesson Radio Button
    
    After the port to Gtk3 these radio buttons stop working. This commit
    fixes this issue.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     editlessonscreen.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/editlessonscreen.py b/editlessonscreen.py
    index d81d250..2ba6449 100644
    a b class EditLessonScreen(Gtk.VBox): 
    288288        typelabel.set_alignment(0.0, 0.5)
    289289        typelabel.set_padding(20, 0)
    290290
    291         self.textradio = Gtk.RadioButton(None, _('Normal Lesson'))
     291        self.textradio = Gtk.RadioButton(_('Normal Lesson'))
    292292        self.textradio.connect('toggled', self.type_toggled_cb)
    293293       
    294         self.balloonradio = Gtk.RadioButton(self.textradio, _('Balloon Game'))
     294        self.balloonradio = Gtk.RadioButton.new_with_label_from_widget(
     295            self.textradio, _('Balloon Game'))
    295296        self.balloonradio.connect('toggled', self.type_toggled_cb)
    296297       
    297298        self.textradio.set_active(self.lesson['type'] == 'normal')