[Sugar-devel] [PATCH Typing Turtle 1/2] Edit Lesson Radio Button

Manuel Kaufmann humitos at gmail.com
Mon Aug 13 10:58:47 EDT 2012


After the port to Gtk3 these radio buttons stop working. This commit
fixes this issue.

Signed-off-by: Manuel Kaufmann <humitos at 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/editlessonscreen.py
+++ b/editlessonscreen.py
@@ -288,10 +288,11 @@ class EditLessonScreen(Gtk.VBox):
         typelabel.set_alignment(0.0, 0.5)
         typelabel.set_padding(20, 0)
 
-        self.textradio = Gtk.RadioButton(None, _('Normal Lesson'))
+        self.textradio = Gtk.RadioButton(_('Normal Lesson'))
         self.textradio.connect('toggled', self.type_toggled_cb)
         
-        self.balloonradio = Gtk.RadioButton(self.textradio, _('Balloon Game'))
+        self.balloonradio = Gtk.RadioButton.new_with_label_from_widget(
+            self.textradio, _('Balloon Game'))
         self.balloonradio.connect('toggled', self.type_toggled_cb)
         
         self.textradio.set_active(self.lesson['type'] == 'normal')
-- 
1.7.11.2



More information about the Sugar-devel mailing list