[quadrapassel/revert-0b3f8792] Revert "Merge branch 'master' into 'master'"
- From: John Ward <jward src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel/revert-0b3f8792] Revert "Merge branch 'master' into 'master'"
- Date: Mon, 1 Jun 2020 15:12:21 +0000 (UTC)
commit 9269413dd41263823792d788537f4f7d67e597e2
Author: John Ward <john johnward net>
Date: Mon Jun 1 15:12:09 2020 +0000
Revert "Merge branch 'master' into 'master'"
This reverts merge request !16
data/org.gnome.Quadrapassel.gschema.xml | 6 ------
src/game.vala | 9 ++------
src/quadrapassel.vala | 37 +++++++--------------------------
3 files changed, 10 insertions(+), 42 deletions(-)
---
diff --git a/data/org.gnome.Quadrapassel.gschema.xml b/data/org.gnome.Quadrapassel.gschema.xml
index befc5cb..f2a2f40 100644
--- a/data/org.gnome.Quadrapassel.gschema.xml
+++ b/data/org.gnome.Quadrapassel.gschema.xml
@@ -48,12 +48,6 @@
<summary>The density of filled rows</summary>
<description>The density of blocks in rows filled at the start of the game. The value is between 0
(for no blocks) and 10 (for a completely filled row).</description>
</key>
- <key name="input-repeat-delay" type="i">
- <default>250</default>
- <range min="0" max="1000"/>
- <summary>The input repeat delay</summary>
- <description>The input repeat delay in milliseconds. The value is between 0 and 1000.</description>
- </key>
<key name="sound" type="b">
<default>true</default>
<summary>Whether to play sounds</summary>
diff --git a/src/game.vala b/src/game.vala
index a60221f..256d1fe 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -254,9 +254,6 @@ public class Game : Object
/* true if we are in fast forward mode */
private bool fast_forward = false;
- /* input repeat delay */
- private int input_repeat_delay;
-
/* Timer to animate block drops */
private uint drop_timeout = 0;
@@ -305,7 +302,7 @@ public class Game : Object
public signal void pause_changed ();
public signal void complete ();
- public Game (int lines = 20, int columns = 14, int starting_level = 1, int filled_lines = 0, int
fill_prob = 5, int repeat_delay = 250, bool pick_difficult_blocks = false)
+ public Game (int lines = 20, int columns = 14, int starting_level = 1, int filled_lines = 0, int
fill_prob = 5, bool pick_difficult_blocks = false)
{
this.starting_level = starting_level;
this.pick_difficult_blocks = pick_difficult_blocks;
@@ -333,8 +330,6 @@ public class Game : Object
if (!pick_difficult_blocks)
next_shape = pick_random_shape ();
-
- input_repeat_delay = repeat_delay;
}
public Game copy ()
@@ -447,7 +442,7 @@ public class Game : Object
if (!move ())
return false;
- fast_move_timeout = Timeout.add (input_repeat_delay, setup_fast_move_cb);
+ fast_move_timeout = Timeout.add (500, setup_fast_move_cb);
return true;
}
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index f236a02..efdfca5 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -51,7 +51,6 @@ public class Quadrapassel : Gtk.Application
private Preview theme_preview;
private Gtk.SpinButton fill_height_spinner;
private Gtk.SpinButton fill_prob_spinner;
- private Gtk.SpinButton input_repeat_delay_spinner;
private Gtk.CheckButton do_preview_toggle;
private Gtk.CheckButton difficult_blocks_toggle;
private Gtk.CheckButton rotate_counter_clock_wise_toggle;
@@ -324,59 +323,45 @@ public class Quadrapassel : Gtk.Application
grid.attach (fill_prob_spinner, 1, 1, 1, 1);
label.set_mnemonic_widget (fill_prob_spinner);
- /* input repeat delay */
- label = new Gtk.Label.with_mnemonic (_("_Input repeat delay:"));
- label.set_alignment (0, 0.5f);
- label.set_hexpand (true);
- grid.attach (label, 0, 2, 1, 1);
-
- adj = new Gtk.Adjustment (settings.get_int ("input-repeat-delay"), 0, 1000, 1, 5, 0);
- input_repeat_delay_spinner = new Gtk.SpinButton (adj, 10, 0);
- input_repeat_delay_spinner.set_update_policy (Gtk.SpinButtonUpdatePolicy.ALWAYS);
- input_repeat_delay_spinner.set_snap_to_ticks (true);
- input_repeat_delay_spinner.value_changed.connect (input_repeat_delay_spinner_value_changed_cb);
- grid.attach (input_repeat_delay_spinner, 1, 2, 1, 1);
- label.set_mnemonic_widget (input_repeat_delay_spinner);
-
/* starting level */
label = new Gtk.Label.with_mnemonic (_("_Starting level:"));
label.set_alignment (0, 0.5f);
label.set_hexpand (true);
- grid.attach (label, 0, 3, 1, 1);
+ grid.attach (label, 0, 2, 1, 1);
adj = new Gtk.Adjustment (settings.get_int ("starting-level"), 1, 20, 1, 5, 0);
starting_level_spin = new Gtk.SpinButton (adj, 10.0, 0);
starting_level_spin.set_update_policy (Gtk.SpinButtonUpdatePolicy.ALWAYS);
starting_level_spin.set_snap_to_ticks (true);
starting_level_spin.value_changed.connect (starting_level_value_changed_cb);
- grid.attach (starting_level_spin, 1, 3, 1, 1);
+ grid.attach (starting_level_spin, 1, 2, 1, 1);
label.set_mnemonic_widget (starting_level_spin);
sound_toggle = new Gtk.CheckButton.with_mnemonic (_("_Enable sounds"));
sound_toggle.set_active (settings.get_boolean ("sound"));
sound_toggle.toggled.connect (sound_toggle_toggled_cb);
- grid.attach (sound_toggle, 0, 4, 2, 1);
+ grid.attach (sound_toggle, 0, 3, 2, 1);
difficult_blocks_toggle = new Gtk.CheckButton.with_mnemonic (_("Choose difficult _blocks"));
difficult_blocks_toggle.set_active (settings.get_boolean ("pick-difficult-blocks"));
difficult_blocks_toggle.toggled.connect (difficult_blocks_toggled_cb);
- grid.attach (difficult_blocks_toggle, 0, 5, 2, 1);
+ grid.attach (difficult_blocks_toggle, 0, 4, 2, 1);
do_preview_toggle = new Gtk.CheckButton.with_mnemonic (_("_Preview next block"));
do_preview_toggle.set_active (settings.get_boolean ("do-preview"));
do_preview_toggle.toggled.connect (do_preview_toggle_toggled_cb);
- grid.attach (do_preview_toggle, 0, 6, 2, 1);
+ grid.attach (do_preview_toggle, 0, 5, 2, 1);
/* rotate counter clock wise */
rotate_counter_clock_wise_toggle = new Gtk.CheckButton.with_mnemonic (_("_Rotate blocks
counterclockwise"));
rotate_counter_clock_wise_toggle.set_active (settings.get_boolean ("rotate-counter-clock-wise"));
rotate_counter_clock_wise_toggle.toggled.connect (set_rotate_counter_clock_wise);
- grid.attach (rotate_counter_clock_wise_toggle, 0, 7, 2, 1);
+ grid.attach (rotate_counter_clock_wise_toggle, 0, 6, 2, 1);
show_shadow_toggle = new Gtk.CheckButton.with_mnemonic (_("Show _where the block will land"));
show_shadow_toggle.set_active (settings.get_boolean ("show-shadow"));
show_shadow_toggle.toggled.connect (user_target_toggled_cb);
- grid.attach (show_shadow_toggle, 0, 8, 2, 1);
+ grid.attach (show_shadow_toggle, 0, 7, 2, 1);
/* controls page */
controls_model = new Gtk.ListStore (4, typeof (string), typeof (string), typeof (uint), typeof
(uint));
@@ -576,12 +561,6 @@ public class Quadrapassel : Gtk.Application
settings.set_int ("line-fill-probability", value);
}
- private void input_repeat_delay_spinner_value_changed_cb (Gtk.SpinButton spin)
- {
- int value = spin.get_value_as_int ();
- settings.set_int ("input-repeat-delay", value);
- }
-
private void starting_level_value_changed_cb (Gtk.SpinButton spin)
{
int value = spin.get_value_as_int ();
@@ -777,7 +756,7 @@ public class Quadrapassel : Gtk.Application
SignalHandler.disconnect_matched (game, SignalMatchType.DATA, 0, 0, null, null, this);
}
- game = new Game (20, 14, settings.get_int ("starting-level"), settings.get_int ("line-fill-height"),
settings.get_int ("line-fill-probability"), settings.get_int ("input-repeat-delay"), settings.get_boolean
("pick-difficult-blocks"));
+ game = new Game (20, 14, settings.get_int ("starting-level"), settings.get_int ("line-fill-height"),
settings.get_int ("line-fill-probability"), settings.get_boolean ("pick-difficult-blocks"));
game.pause_changed.connect (pause_changed_cb);
game.shape_landed.connect (shape_landed_cb);
game.complete.connect (complete_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]