[gnome-games/sudoku-tube] Fix bad naming
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/sudoku-tube] Fix bad naming
- Date: Sun, 12 Jul 2009 14:14:54 +0000 (UTC)
commit 6d39520b2727afa2242912bb998a0f1a31f9098e
Author: Zhang Sen <zh jesse gmail com>
Date: Sun Jul 12 21:51:37 2009 +0800
Fix bad naming
gnome-sudoku/src/lib/tracker_box.py | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/tracker_box.py b/gnome-sudoku/src/lib/tracker_box.py
index effc6ce..acc2d0b 100644
--- a/gnome-sudoku/src/lib/tracker_box.py
+++ b/gnome-sudoku/src/lib/tracker_box.py
@@ -36,7 +36,7 @@ class TrackerBox (gtk.VBox):
self.builder = gtk.Builder()
self.builder.add_from_file(os.path.join(defaults.UI_DIR,
'tracker.ui'))
- self._tracker_model = TrackerModel(main_ui)
+ self._view_controller = ViewController(main_ui)
vbox = self.builder.get_object('vbox1')
vbox.unparent()
self.pack_start(vbox, expand = True, fill = True)
@@ -89,10 +89,10 @@ class TrackerBox (gtk.VBox):
self.tracker_actions.set_sensitive(False)
def add_tracker (self):
- tracker_id = self._tracker_model.create_tracker()
+ tracker_id = self._view_controller.create_tracker()
pixbuf = self._pixbuf_transform_color(
STOCK_PIXBUFS['tracks'],
- self._tracker_model.get_tracker_color(tracker_id),
+ self._view_controller.get_tracker_color(tracker_id),
)
# select our new tracker
self.tracker_tree.get_selection().select_iter(
@@ -133,7 +133,7 @@ class TrackerBox (gtk.VBox):
for row in self.tracker_model:
tid = row[0]
if tid != -1: # -1 == no tracker
- self._tracker_model.toggle_tracker(tid, tid == selected_tracker_id)
+ self._view_controller.toggle_tracker(tid, tid==selected_tracker_id)
self.tracker_actions.set_sensitive(selected_tracker_id != -1)
def _clear_cb (self, action):
@@ -150,15 +150,15 @@ class TrackerBox (gtk.VBox):
self._tracker_keep_tracks(selected_tracker_id)
def _tracker_delete_tracks (self, tracker_id):
- self._tracker_model.delete_by_tracker(tracker_id)
+ self._view_controller.delete_by_tracker(tracker_id)
def _tracker_keep_tracks (self, tracker_id):
- self._tracker_model.delete_except_for_tracker(tracker_id)
+ self._view_controller.delete_except_for_tracker(tracker_id)
-class TrackerModel:
- """The 'model' that really perform the change on the SudokuView, e.g. set
- the color"""
+class ViewController:
+ """The controller that really perform the changes on the SudokuView, e.g.
+ set the color"""
TRACKER_COLORS = [
# Use tango colors recommended here:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]