[gnome-sudoku] Revert "Remove some dead code"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku] Revert "Remove some dead code"
- Date: Sat, 26 Dec 2020 20:29:28 +0000 (UTC)
commit 12170a699f32aa5abfa6404e290e3e17e843ed66
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Dec 26 14:27:42 2020 -0600
Revert "Remove some dead code"
This reverts commit 9ff45bc4b352b377c3ca1c3b09373947cd7e5552.
It's dead because I removed the code that connects the signal
handler....
src/gnome-sudoku.vala | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
---
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index 8760e4c5..bba966c8 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -498,6 +498,44 @@ public class Sudoku : Gtk.Application
);
}
+#if 0
+ // Unused?
+ private bool draw_cb ()
+ {
+ return check_layout_change ();
+ }
+
+ private bool check_layout_change ()
+ {
+ var layout = main_squeezer.visible_child;
+ if (! (layout is AspectFrame))
+ return false;
+ var changed = layout != previous_layout;
+ if (changed)
+ set_layout ((AspectFrame) layout);
+ return changed;
+ }
+
+ private void set_layout (AspectFrame new_layout)
+ {
+ if (new_layout == frame_h)
+ {
+ controls_box.halign = Align.END;
+ controls_box.orientation = Orientation.VERTICAL;
+ game_box.orientation = Orientation.HORIZONTAL;
+ }
+ else
+ {
+ controls_box.halign = Align.CENTER;
+ controls_box.orientation = Orientation.VERTICAL;
+ game_box.orientation = Orientation.VERTICAL;
+ }
+ previous_layout.remove (game_box);
+ new_layout.add (game_box);
+ previous_layout = new_layout;
+ }
+#endif
+
public static int main (string[] args)
{
return new Sudoku ().run (args);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]