[gnome-sudoku] Always name arguments to GObject constructors



commit a0457a602cae9f318688a373b6a6f9f19f143e19
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jan 12 11:39:44 2014 -0600

    Always name arguments to GObject constructors
    
    Resolves several PyGTKDeprecationWarnings

 src/lib/gsudoku.py |    2 +-
 src/lib/main.py    |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/lib/gsudoku.py b/src/lib/gsudoku.py
index 409d7eb..1528ec4 100644
--- a/src/lib/gsudoku.py
+++ b/src/lib/gsudoku.py
@@ -17,7 +17,7 @@ def gtkcolor_to_rgb (color):
 class SudokuNumberGrid (Gtk.AspectFrame):
 
     def __init__ (self, group_size = 9):
-        self.table = Gtk.Table(rows = group_size, columns = group_size, homogeneous = True)
+        self.table = Gtk.Table(n_rows = group_size, n_columns = group_size, homogeneous = True)
         self.group_size = group_size
         self.__entries__ = {}
         for x in range(self.group_size):
diff --git a/src/lib/main.py b/src/lib/main.py
index 5243780..cbd1820 100644
--- a/src/lib/main.py
+++ b/src/lib/main.py
@@ -119,7 +119,7 @@ class UI:
         run_selector=False to this method to avoid running the dialog
         and allow a tester to set up a game programmatically.
         """
-        self.settings = Gio.Settings("org.gnome.gnome-sudoku")
+        self.settings = Gio.Settings(schema="org.gnome.gnome-sudoku")
         self.setup_gui()
         self.timer = timer.ActiveTimer(self.w)
         self.gsd.set_timer(self.timer)
@@ -191,7 +191,7 @@ class UI:
         self.uimanager = Gtk.UIManager()
 
     def setup_actions (self):
-        self.main_actions = Gtk.ActionGroup('MainActions')
+        self.main_actions = Gtk.ActionGroup(name='MainActions')
         self.main_actions.add_actions([
             ('Game', None, _('_Game')),
             ('New', Gtk.STOCK_NEW, None, '<Control>n', _('New game'), self.new_cb),
@@ -738,7 +738,7 @@ class TrackerBox (Gtk.VBox):
 
     @simple_debug
     def setup_actions (self):
-        self.tracker_actions = Gtk.ActionGroup('tracker_actions')
+        self.tracker_actions = Gtk.ActionGroup(name='tracker_actions')
         self.tracker_actions.add_actions(
             [('Remove',
               Gtk.STOCK_CLEAR,


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