[gnome-music] Use the new close method from gtk+ and drop GdHeaderCloseButton



commit c17c1bdfed0bc58527c8a3434ba1e5f2ee53023e
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 99be24c..14fd249 100644
--- a/src/toolbar.js
+++ b/src/toolbar.js
@@ -110,7 +110,7 @@ const Toolbar = new Lang.Class({
             'go-previous-rtl-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]