[gnome-music: 1/2] Clear model variable instead of defining again



commit 5b7aa3f0794168e07c8b43f490589cb4735d219b
Author: Jackson Isaac <jacksonisaac2008 gmail com>
Date:   Sun Aug 11 19:48:27 2013 +0530

    Clear model variable instead of defining again

 gnomemusic/widgets.py |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 4829ef7..55eafac 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -181,17 +181,7 @@ class AlbumWidget(Gtk.EventBox):
             self.update_model(self.player, cached_playlist,
                               self.player.currentTrack)
         else:
-            self.model = Gtk.ListStore(GObject.TYPE_STRING,  # title
-                                       GObject.TYPE_STRING,
-                                       GObject.TYPE_STRING,
-                                       GObject.TYPE_STRING,
-                                       GdkPixbuf.Pixbuf,    # icon
-                                       GObject.TYPE_OBJECT,  # song object
-                                       GObject.TYPE_BOOLEAN,  # icon shown
-                                       GObject.TYPE_STRING,
-                                       GObject.TYPE_BOOLEAN,
-                                       GObject.TYPE_BOOLEAN,
-                                       )
+            self.model.clear()
             GLib.idle_add(grilo.populate_album_songs, item.get_id(),
                           self._on_populate_album_songs)
         header_bar._select_button.connect(


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