[gnome-sudoku] Using the ui file for the radiogroup.



commit 6c040608ad0697e6a823caf0d98ed63ef74a5d59
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Aug 23 04:51:48 2014 +0200

    Using the ui file for the radiogroup.

 data/print-games.ui     |    3 +++
 src/sudoku-printer.vala |   10 ----------
 2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/data/print-games.ui b/data/print-games.ui
index 6c4a741..703bd01 100644
--- a/data/print-games.ui
+++ b/data/print-games.ui
@@ -174,6 +174,7 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
+                        <property name="group">easyRadioButton</property>
                       </object>
                       <packing>
                         <property name="expand">True</property>
@@ -190,6 +191,7 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
+                        <property name="group">easyRadioButton</property>
                       </object>
                       <packing>
                         <property name="expand">True</property>
@@ -206,6 +208,7 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
+                        <property name="group">easyRadioButton</property>
                       </object>
                       <packing>
                         <property name="expand">True</property>
diff --git a/src/sudoku-printer.vala b/src/sudoku-printer.vala
index 9f80280..b94a7c5 100644
--- a/src/sudoku-printer.vala
+++ b/src/sudoku-printer.vala
@@ -1,7 +1,6 @@
 /* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
 using Gtk;
-using Gee;
 using Gdk;
 
 public class SudokuPrinter : GLib.Object {
@@ -254,19 +253,10 @@ public class GamePrinter: GLib.Object
         dialog.set_default_response (Gtk.ResponseType.OK);
         dialog.response.connect (response_cb);
 
-        SList<RadioButton> radio_group = new SList<RadioButton> ();
-
         easy_button = builder.get_object ("easyRadioButton") as RadioButton;
-        easy_button.set_group (radio_group);
-
         medium_button = builder.get_object ("mediumRadioButton") as RadioButton;
-        medium_button.join_group (easy_button);
-
         hard_button = builder.get_object ("hardRadioButton") as RadioButton;
-        hard_button.join_group (easy_button);
-
         very_hard_button = builder.get_object ("very_hardRadioButton") as RadioButton;
-        very_hard_button.join_group (easy_button);
 
         var saved_difficulty = (DifficultyCategory) settings.get_enum (DIFFICULTY_KEY_NAME);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]