[quadrapassel] Hiding preview embed when preview is unavailable or disabled
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel] Hiding preview embed when preview is unavailable or disabled
- Date: Wed, 22 May 2013 20:13:06 +0000 (UTC)
commit d9cb3197470089cac14be053a080f935d406a6df
Author: Mario Wenzel <maweki gmail com>
Date: Mon May 20 16:24:09 2013 +0200
Hiding preview embed when preview is unavailable or disabled
If preview of next block is unavailable or disabled, the embed
is hidden. Also the gtk layout was changed slightly to allow
for the scoreboard to be displayed alone.
https://bugzilla.gnome.org/show_bug.cgi?id=700720
src/preview.vala | 5 +++++
src/quadrapassel.vala | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/preview.vala b/src/preview.vala
index 5f91d00..af92679 100644
--- a/src/preview.vala
+++ b/src/preview.vala
@@ -77,7 +77,12 @@ public class Preview : GtkClutter.Embed
piece.destroy ();
if (game == null || game.next_shape == null || !enabled)
+ {
+ set_visible(false);
return;
+ }
+
+ set_visible (true);
piece = new Clutter.Group ();
var stage = (Clutter.Stage) get_stage ();
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 26efad9..696883f 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -159,7 +159,7 @@ public class Quadrapassel : Gtk.Application
var vb2 = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
vb2.set_border_width (10);
vb2.show ();
- hb.pack_end (vb2, false, false, 0);
+ hb.pack_end (vb2, true, false, 0);
preview = new Preview ();
preview.theme = settings.get_string ("theme");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]