[gnome-mines] Fixes #39: Remove overmine warnings feature
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Fixes #39: Remove overmine warnings feature
- Date: Wed, 13 Nov 2019 23:24:18 +0000 (UTC)
commit 41c43d132a2bae2c002025e1c1bb1084186c5093
Author: Robert Roth <robert roth off gmail com>
Date: Thu Nov 14 01:23:54 2019 +0200
Fixes #39: Remove overmine warnings feature
data/meson.build | 2 +-
data/org.gnome.Mines.gschema.xml | 5 -
data/themes/bgcolors/overmine.svg | 182 ---------------------------------
data/themes/classic/overmine.svg | 210 --------------------------------------
data/themes/default/overmine.svg | 182 ---------------------------------
src/gnome-mines.css | 4 -
src/gnome-mines.vala | 4 -
src/minefield-view.vala | 15 ---
8 files changed, 1 insertion(+), 603 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 9835b6b..82d5582 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -10,7 +10,7 @@ install_data ('@0 gschema xml'.format(app_id),
foreach theme: [ 'default', 'bgcolors', 'classic' ]
foreach file: [ 'theme.css',
'1mines.svg', '2mines.svg', '3mines.svg', '4mines.svg', '5mines.svg', '6mines.svg',
'7mines.svg', '8mines.svg',
- 'mine.svg', 'flag.svg', 'incorrect.svg', 'exploded.svg', 'overmine.svg', 'maybe.svg' ]
+ 'mine.svg', 'flag.svg', 'incorrect.svg', 'exploded.svg', 'maybe.svg' ]
install_data (join_paths ('themes', theme, file), install_dir: join_paths (pkgdatadir, 'themes',
theme))
endforeach
endforeach
diff --git a/data/org.gnome.Mines.gschema.xml b/data/org.gnome.Mines.gschema.xml
index a88dad9..b3edfc1 100644
--- a/data/org.gnome.Mines.gschema.xml
+++ b/data/org.gnome.Mines.gschema.xml
@@ -10,11 +10,6 @@
<summary>Use the unknown flag</summary>
<description>Set to true to be able to mark squares as unknown.</description>
</key>
- <key name="use-overmine-warning" type="b">
- <default>false</default>
- <summary>Warning about too many flags</summary>
- <description>Set to true to enable warning icons when too many flags are placed next to a numbered
tile.</description>
- </key>
<key name="use-autoflag" type="b">
<default>false</default>
<summary>Enable automatic placing of flags</summary>
diff --git a/src/gnome-mines.css b/src/gnome-mines.css
index 42f1c43..3456a00 100644
--- a/src/gnome-mines.css
+++ b/src/gnome-mines.css
@@ -75,10 +75,6 @@
background-image: -gtk-icontheme('maybe');
}
-.overmine {
- background-image: -gtk-icontheme('overmine');
-}
-
.exploded {
background-image: -gtk-icontheme('exploded');
}
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index f76d038..db03f6b 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -26,7 +26,6 @@ public class Mines : Gtk.Application
/* Shared Settings keys */
public const string KEY_USE_QUESTION_MARKS = "use-question-marks";
- public const string KEY_USE_OVERMINE_WARNING = "use-overmine-warning";
public const string KEY_USE_AUTOFLAG = "use-autoflag";
public const string KEY_THEME = "theme";
public const string KEY_USE_ANIMATIONS = "use-animations";
@@ -202,7 +201,6 @@ public class Mines : Gtk.Application
size_actions[2] = lookup_action ("large-size") as SimpleAction;
size_actions[3] = lookup_action ("custom-size") as SimpleAction;
- add_action (settings.create_action (KEY_USE_OVERMINE_WARNING));
add_action (settings.create_action (KEY_USE_QUESTION_MARKS));
window = (Gtk.ApplicationWindow) ui_builder.get_object ("main_window");
@@ -234,7 +232,6 @@ public class Mines : Gtk.Application
app_main_menu.append (_("A_ppearance"), "app.preferences");
var section = new Menu ();
menu.append_section (null, section);
- section.append (_("Show _Warnings"), "app.%s".printf (KEY_USE_OVERMINE_WARNING));
section.append (_("_Use Question Flags"), "app.%s".printf (KEY_USE_QUESTION_MARKS));
section = new Menu ();
menu.append_section (null, section);
@@ -255,7 +252,6 @@ public class Mines : Gtk.Application
mines_menu.append (_("_New Game"), "app.new-game");
mines_menu.append (_("_Scores"), "app.scores");
mines_menu.append (_("A_ppearance"), "app.preferences");
- mines_menu.append (_("Show _Warnings"), "app.%s".printf (KEY_USE_OVERMINE_WARNING));
mines_menu.append (_("_Use Question Flags"), "app.%s".printf (KEY_USE_QUESTION_MARKS));
mines_menu.append (_("_Quit"), "app.quit");
var help_menu = new Menu ();
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index cc5ab63..0a9c1e3 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -104,15 +104,6 @@ public class MinefieldView : Gtk.Grid
}
}
- /* true if should warn when too many flags set */
- private bool use_overmine_warning
- {
- get
- {
- return settings.get_boolean (Mines.KEY_USE_OVERMINE_WARNING);
- }
- }
-
/* true if automatically set flags on middle click... for debugging */
private bool use_autoflag
{
@@ -360,12 +351,6 @@ public class MinefieldView : Gtk.Grid
/* Indicate the number of mines around this location */
else
{
- /* Warn if more flags than the number of mines available */
- if (use_overmine_warning && minefield.has_flag_warning (x, y))
- {
- mines[x,y].add_class ("overmine");
- }
-
var n = minefield.get_n_adjacent_mines (x, y);
mines[x,y].remove_class ("maybe");
mines[x,y].remove_class ("flag");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]