[gnome-games/sudoku-tube] Mark methods as private with underscore



commit 8cb7238784e31d46b19a27d15ae384059c4452fd
Author: Zhang Sen <zh jesse gmail com>
Date:   Fri Jun 12 11:23:30 2009 +0800

    Mark methods as private with underscore
    
    The previous commmit log has a typo; should be 'prepend'.

 gnome-sudoku/src/lib/main.py |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 4b5f16f..8b91dfe 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -755,8 +755,8 @@ class TrackerBox (gtk.VBox):
         self.vb = self.builder.get_object('vbox1')
         self.vb.unparent()
         self.pack_start(self.vb, expand = True, fill = True)
-        self.setup_actions()
-        self.setup_tree()
+        self._setup_actions()
+        self._setup_tree()
         self.show_all()
 
     @simple_debug
@@ -767,7 +767,7 @@ class TrackerBox (gtk.VBox):
                 self.tracker_model.remove(tree.iter)
 
     @simple_debug
-    def setup_tree (self):
+    def _setup_tree (self):
         self.tracker_tree = self.builder.get_object('treeview1')
         self.tracker_model = gtk.ListStore(int, gtk.gdk.Pixbuf, str)
         self.tracker_tree.set_model(self.tracker_model)
@@ -777,23 +777,23 @@ class TrackerBox (gtk.VBox):
         self.tracker_tree.append_column(col1)
         # Our initial row...
         self.tracker_model.append([-1, None, _('No Tracker')])
-        self.tracker_tree.get_selection().connect('changed', self.selection_changed_cb)
+        self.tracker_tree.get_selection().connect('changed', self._selection_changed_cb)
 
     @simple_debug
-    def setup_actions (self):
+    def _setup_actions (self):
         self.tracker_actions = gtk.ActionGroup('tracker_actions')
         self.tracker_actions.add_actions(
             [('Clear',
               gtk.STOCK_CLEAR,
               _('_Clear Tracker'),
               None, _('Clear all moves tracked by selected tracker.'),
-              self.clear_cb
+              self._clear_cb
               ),
              ('Keep', None,
               _('_Clear Others'),
               None,
               _('Clear all moves not tracked by selected tracker.'),
-              self.keep_cb),
+              self._keep_cb),
              ]
             )
         for action, widget_name in [('Clear', 'ClearTrackerButton'),
@@ -809,7 +809,7 @@ class TrackerBox (gtk.VBox):
     @simple_debug
     def add_tracker (self, *args):
         tracker_id = self.main_ui.gsd.create_tracker()
-        pixbuf = self.pixbuf_transform_color(
+        pixbuf = self._pixbuf_transform_color(
             STOCK_PIXBUFS['tracks'],
             self.main_ui.gsd.get_tracker_color(tracker_id),
             )
@@ -822,7 +822,7 @@ class TrackerBox (gtk.VBox):
             )
 
     @simple_debug
-    def pixbuf_transform_color (self, pixbuf, color):
+    def _pixbuf_transform_color (self, pixbuf, color):
         """Return new pixbuf with color changed to color"""
         pixbuf_str = pixbuf.get_pixels()
         pixbuf_str_new = ""
@@ -843,7 +843,7 @@ class TrackerBox (gtk.VBox):
                 self.tracker_tree.get_selection().select_iter(row.iter)
 
     @simple_debug
-    def selection_changed_cb (self, selection):
+    def _selection_changed_cb (self, selection):
         mod, itr = selection.get_selected()
         if itr:
             selected_tracker_id = mod.get_value(itr, 0)
@@ -859,22 +859,22 @@ class TrackerBox (gtk.VBox):
         self.tracker_actions.set_sensitive(selected_tracker_id != -1)
 
     @simple_debug
-    def clear_cb (self, action):
+    def _clear_cb (self, action):
         mod, itr = self.tracker_tree.get_selection().get_selected()
         # This should only be called if there is an itr, but we'll
         # double-check just in case.
         if itr:
             selected_tracker_id = mod.get_value(itr, 0)
-            self.tracker_delete_tracks(selected_tracker_id)
+            self._tracker_delete_tracks(selected_tracker_id)
 
     @simple_debug
-    def keep_cb (self, action):
+    def _keep_cb (self, action):
         mod, itr = self.tracker_tree.get_selection().get_selected()
         selected_tracker_id = mod.get_value(itr, 0)
-        self.tracker_keep_tracks(selected_tracker_id)
+        self._tracker_keep_tracks(selected_tracker_id)
 
     @simple_debug
-    def tracker_delete_tracks (self, tracker_id):
+    def _tracker_delete_tracks (self, tracker_id):
         clearer = Undo.UndoableObject(
             lambda *args: self.main_ui.cleared.append(self.main_ui.gsd.delete_by_tracker(tracker_id)),
             lambda *args: [self.main_ui.gsd.add_value(*entry) for entry in self.main_ui.cleared.pop()],
@@ -882,7 +882,7 @@ class TrackerBox (gtk.VBox):
         clearer.perform()
 
     @simple_debug
-    def tracker_keep_tracks (self, tracker_id):
+    def _tracker_keep_tracks (self, tracker_id):
         clearer = Undo.UndoableObject(
             lambda *args: self.main_ui.cleared.append(self.main_ui.gsd.delete_except_for_tracker(tracker_id)),
             lambda *args: [self.main_ui.gsd.add_value(*entry) for entry in self.main_ui.cleared.pop()],



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