[gnome-clocks] Use the new gtk_window_close method
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Use the new gtk_window_close method
- Date: Sun, 30 Jun 2013 10:03:27 +0000 (UTC)
commit 6aedcdec51995050c568d4ef3b779381076ec390
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Jun 30 11:59:12 2013 +0200
Use the new gtk_window_close method
configure.ac | 2 +-
src/window.vala | 11 ++---------
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 736467c..a518ef5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ PKG_PROG_PKG_CONFIG([0.22])
PKG_CHECK_MODULES(CLOCKS, [
gio-2.0 >= 2.30.0
glib-2.0 >= 2.36
- gtk+-3.0 >= 3.9.0
+ gtk+-3.0 >= 3.9.7
libcanberra >= 0.30
gweather-3.0 >= 3.9.3
gnome-desktop-3.0 >= 3.7.90
diff --git a/src/window.vala b/src/window.vala
index b3df1b7..b632771 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -80,20 +80,13 @@ public class Window : Gtk.ApplicationWindow {
Gtk.Image close_image = new Gtk.Image.from_icon_name ("window-close-symbolic", Gtk.IconSize.MENU);
close_button.set_image (close_image);
close_button.get_style_context ().add_class ("image-button");
+ close_button.no_show_all = true;
close_button.relief = Gtk.ReliefStyle.NONE;
close_button.valign = Gtk.Align.CENTER;
close_button.clicked.connect (() => {
- Gdk.Event event;
-
- event = new Gdk.Event (Gdk.EventType.DESTROY);
-
- event.any.window = this.get_window ();
- event.any.send_event = 1;
-
- Gtk.main_do_event (event);
+ close();
});
- close_button.no_show_all = true;
header_bar.pack_end (close_button);
var stack_id = stack.notify["visible-child"].connect (() => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]