[gnome-mines] Remove "use number border" preference
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Remove "use number border" preference
- Date: Wed, 16 Oct 2013 02:16:31 +0000 (UTC)
commit a7db41832be99a411b5ddb9eccfe3a8baf5e3c29
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Oct 15 21:14:34 2013 -0500
Remove "use number border" preference
The option to draw borders around the numbers is excessive
configurability. It doesn't even look good. Bye.
src/gnome-mines.vala | 15 ---------------
src/minefield-view.vala | 23 -----------------------
2 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 81c6e55..cdad4d4 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -23,7 +23,6 @@ public class Mines : Gtk.Application
private const string KEY_USE_QUESTION_MARKS = "use-question-marks";
private const string KEY_USE_OVERMINE_WARNING = "use-overmine-warning";
private const string KEY_USE_AUTOFLAG = "use-autoflag";
- private const string KEY_USE_NUMBER_BORDER = "use-number-border";
private Gtk.Box buttons_box;
private Gtk.Button new_game_button;
@@ -158,7 +157,6 @@ public class Mines : Gtk.Application
minefield_view.set_use_question_marks (settings.get_boolean (KEY_USE_QUESTION_MARKS));
minefield_view.set_use_overmine_warning (settings.get_boolean (KEY_USE_OVERMINE_WARNING));
minefield_view.set_use_autoflag (settings.get_boolean (KEY_USE_AUTOFLAG));
- minefield_view.set_use_number_border (settings.get_boolean (KEY_USE_NUMBER_BORDER));
minefield_view.button_press_event.connect (view_button_press_event);
view_box.pack_start (minefield_view, true, true, 0);
@@ -776,13 +774,6 @@ public class Mines : Gtk.Application
minefield_view.set_use_overmine_warning (use_overmine_warning);
}
- private void use_number_border_toggle_cb (Gtk.ToggleButton button)
- {
- var use_number_border = button.get_active ();
- settings.set_boolean (KEY_USE_NUMBER_BORDER, use_number_border);
- minefield_view.set_use_number_border (use_number_border);
- }
-
private Gtk.Dialog create_preferences ()
{
var dialog = new Gtk.Dialog.with_buttons (_("Mines Preferences"),
@@ -815,12 +806,6 @@ public class Mines : Gtk.Application
overmine_toggle.set_active (settings.get_boolean (KEY_USE_OVERMINE_WARNING));
grid.attach (overmine_toggle, 0, 1, 1, 1);
- var border_toggle = new Gtk.CheckButton.with_mnemonic (_("_Display numbers with border"));
- border_toggle.show ();
- border_toggle.toggled.connect (use_number_border_toggle_cb);
- border_toggle.set_active (settings.get_boolean (KEY_USE_NUMBER_BORDER));
- grid.attach (border_toggle, 0, 2, 1, 1);
-
return dialog;
}
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index 4944e8a..d9ae119 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -105,9 +105,6 @@ public class MinefieldView : Gtk.DrawingArea
private Position keyboard_cursor;
private Position selected;
- /* true if numbers should be drawn with border */
- private bool use_number_border;
-
/* Pre-rendered images */
private uint render_size = 0;
private Cairo.Pattern? flag_pattern;
@@ -214,14 +211,6 @@ public class MinefieldView : Gtk.DrawingArea
this.use_autoflag = use_autoflag;
}
- public void set_use_number_border (bool use_number_border)
- {
- if (this.use_number_border != use_number_border)
- render_size = 0;
-
- this.use_number_border = use_number_border;
- }
-
private void explode_cb (Minefield minefield)
{
/* Show the mines that we missed or the flags that were wrong */
@@ -327,18 +316,6 @@ public class MinefieldView : Gtk.DrawingArea
c.move_to (dx, dy);
Pango.cairo_show_layout (c, layout);
- if (use_number_border)
- {
- c.save ();
- c.set_line_width(1.0);
- c.set_source_rgb(color_outline[0],
- color_outline[1],
- color_outline[2]);
- Pango.cairo_layout_path(c, layout);
- c.stroke_preserve();
- c.restore ();
- }
-
var pattern = new Cairo.Pattern.for_surface (surface);
pattern.set_extend (Cairo.Extend.REPEAT);
return pattern;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]