[gnome-music/wip/gtkmaster: 23/23] Use the new close method from gtk+ and drop GdHeaderCloseButton
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/gtkmaster: 23/23] Use the new close method from gtk+ and drop GdHeaderCloseButton
- Date: Sat, 29 Jun 2013 17:46:54 +0000 (UTC)
commit bc8a57ff35748c16e26cee0933395d0ec99df700
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Jun 29 19:46:18 2013 +0200
Use the new close method from gtk+ and drop GdHeaderCloseButton
libgd | 2 +-
src/toolbar.js | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libgd b/libgd
index 8192ded..f3822bc 160000
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 8192ded5a63aff6f2528576009858bf0d61ec5de
+Subproject commit f3822bc9fa387076a8005fb2665cc13390055156
diff --git a/src/toolbar.js b/src/toolbar.js
index cf33c1f..8d5aeed 100644
--- a/src/toolbar.js
+++ b/src/toolbar.js
@@ -110,7 +110,7 @@ const Toolbar = new Lang.Class({
'go-next-symbolic' : 'go-previous-symbolic';
this._backButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: iconName,
label: _("Back") });
- this._backButton.connect('clicked', Lang.bind(this, this.setState))
+ this._backButton.connect('clicked', Lang.bind(this, this.setState));
this.pack_start(this._backButton);
},
@@ -128,11 +128,17 @@ const Toolbar = new Lang.Class({
this._selectButton.show();
},
+ _closeButtonClicked: function() {
+ this._closeButton.get_toplevel().close();
+ },
+
_addCloseButton: function() {
this._closeSeparator = new Gtk.Separator({ orientation: Gtk.Orientation.VERTICAL });
this.pack_end(this._closeSeparator);
- this._closeButton = new Gd.HeaderCloseButton();
+ this._closeButton = new Gd.HeaderSimpleButton({ symbolic_icon_name: 'window-close-symbolic' });
+ this._closeButton.set_relief(Gtk.ReliefStyle.NONE);
+ this._closeButton.connect('clicked', Lang.bind(this, this._closeButtonClicked));
this.pack_end(this._closeButton);
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]