[gnome-games] Remove Clear Others tracker option (none of the devs can work out what it does)
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] Remove Clear Others tracker option (none of the devs can work out what it does)
- Date: Fri, 23 Apr 2010 04:59:19 +0000 (UTC)
commit ba1f4acc43622157be8e2a92119c70c30e00e288
Author: Robert Ancell <robert ancell gmail com>
Date: Fri Apr 23 14:59:10 2010 +1000
Remove Clear Others tracker option (none of the devs can work out what it does)
gnome-sudoku/data/tracker.ui | 58 +++---------------------------------------
gnome-sudoku/src/lib/main.py | 27 +------------------
2 files changed, 6 insertions(+), 79 deletions(-)
---
diff --git a/gnome-sudoku/data/tracker.ui b/gnome-sudoku/data/tracker.ui
index 3da023d..2f6b876 100644
--- a/gnome-sudoku/data/tracker.ui
+++ b/gnome-sudoku/data/tracker.ui
@@ -116,8 +116,8 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -166,61 +166,11 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="KeepTrackerButton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-clear</property>
- <property name="icon-size">4</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Clear _Others</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 0cc33fb..bd89d89 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -745,18 +745,10 @@ class TrackerBox (gtk.VBox):
None, _('Clear all moves tracked by selected tracker.'),
self.clear_cb
),
- ('Keep', None,
- _('_Clear Others'),
- None,
- _('Clear all moves not tracked by selected tracker.'),
- self.keep_cb),
]
)
- for action, widget_name in [('Clear', 'ClearTrackerButton'),
- ('Keep', 'KeepTrackerButton'),
- ]:
- a = self.tracker_actions.get_action(action)
- a.connect_proxy(self.builder.get_object(widget_name))
+ a = self.tracker_actions.get_action('Clear')
+ a.connect_proxy(self.builder.get_object('ClearTrackerButton'))
self.builder.get_object('AddTrackerButton').connect('clicked',
self.add_tracker)
# Default to insensitive (they only become sensitive once a tracker is added)
@@ -824,12 +816,6 @@ class TrackerBox (gtk.VBox):
self.tracker_delete_tracks(selected_tracker_id)
@simple_debug
- 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)
-
- @simple_debug
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)),
@@ -837,15 +823,6 @@ class TrackerBox (gtk.VBox):
self.main_ui.history)
clearer.perform()
- @simple_debug
- 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()],
- self.main_ui.history)
- clearer.perform()
-
-
def start_game ():
if options.debug:
print 'Starting GNOME Sudoku in debug mode'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]