[gnome-music: 7/11] toolbar: Destroy the window on close if GTK+ version is older than 3.9



commit dc79b8618f7ac64903ea2542d7d4d6d4f2b4ad40
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Sat Aug 3 20:29:56 2013 +0800

    toolbar: Destroy the window on close if GTK+ version is older than 3.9
    
    gtk_window_close was introduced in 3.9.

 gnomemusic/toolbar.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/toolbar.py b/gnomemusic/toolbar.py
index 082b08c..8ea49d6 100644
--- a/gnomemusic/toolbar.py
+++ b/gnomemusic/toolbar.py
@@ -40,7 +40,10 @@ class Toolbar(GObject.GObject):
         self._close_button.connect('clicked', self._close_button_clicked)
 
     def _close_button_clicked(self, btn):
-        self._close_button.get_toplevel().close()
+        if Gtk.get_minor_version() > 8:
+            self._close_button.get_toplevel().close()
+        else:
+            self._close_button.get_toplevel().destroy()
 
     def reset_header_title(self):
         self.header_bar.set_custom_title(self._stack_switcher)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]