[gnome-sudoku/gnome-3-16: 12/14] Connect to size_allocate.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/gnome-3-16: 12/14] Connect to size_allocate.
- Date: Mon, 16 Feb 2015 21:13:13 +0000 (UTC)
commit 83136e2e5d2072fe5fde0c64b493fcc1e60ce1ac
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Jan 31 13:22:49 2015 +0100
Connect to size_allocate.
src/gnome-sudoku.vala | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index 8892ba1..49a02d8 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -158,7 +158,7 @@ public class Sudoku : Gtk.Application
var builder = new Builder.from_resource ("/org/gnome/sudoku/ui/gnome-sudoku.ui");
window = (ApplicationWindow) builder.get_object ("sudoku_app");
- window.configure_event.connect (window_configure_event_cb);
+ window.size_allocate.connect (size_allocate_cb);
window.window_state_event.connect (window_state_event_cb);
window.set_default_size (settings.get_int ("window-width"), settings.get_int ("window-height"));
if (settings.get_boolean ("window-is-maximized"))
@@ -232,15 +232,12 @@ public class Sudoku : Gtk.Application
base.shutdown ();
}
- private bool window_configure_event_cb (Gdk.EventConfigure event)
+ private void size_allocate_cb (Allocation allocation)
{
- if (!is_maximized)
- {
- window_width = event.width;
- window_height = event.height;
- }
-
- return false;
+ if (is_maximized)
+ return;
+ window_width = allocation.width;
+ window_height = allocation.height;
}
private bool window_state_event_cb (Gdk.EventWindowState event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]