[rhythmbox/gobject-introspection] port links tab in context pane to pygi



commit 1cddae0a13dc11b8b72ff49b05652f0edfa6be71
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Jan 13 22:15:37 2011 +1000

    port links tab in context pane to pygi

 plugins/context/context/LinksTab.py |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/plugins/context/context/LinksTab.py b/plugins/context/context/LinksTab.py
index d801ee7..42fef8f 100644
--- a/plugins/context/context/LinksTab.py
+++ b/plugins/context/context/LinksTab.py
@@ -24,12 +24,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 
-import rhythmdb
-import gtk, gobject
+import gobject
 import os
 import cgi
 import urllib
 
+from gi.repository import Gtk
+from gi.repository import RB
+
 from gettext import gettext as _
 
 import webkit
@@ -50,14 +52,14 @@ class LinksTab (gobject.GObject):
         self.db         = shell.get_property ('db')
         self.buttons    = buttons
 
-        self.button     = gtk.ToggleButton (_("Links"))
+        self.button     = Gtk.ToggleButton (label=_("Links"))
         self.datasource = ds
         self.view       = view
         self.artist     = None
         self.album      = None
 
         self.button.show()
-        self.button.set_relief( gtk.RELIEF_NONE )
+        self.button.set_relief(Gtk.ReliefStyle.NONE)
         self.button.set_focus_on_click(False)
         self.button.connect ('clicked',
             lambda button : self.emit('switch-tab', 'links'))
@@ -77,8 +79,8 @@ class LinksTab (gobject.GObject):
         if entry is None:
             return None
 
-        artist = self.db.entry_get (entry, rhythmdb.PROP_ARTIST)
-        album = self.db.entry_get (entry, rhythmdb.PROP_ALBUM)
+        artist = self.db.entry_get (entry, RB.RhythmDBPropType.ARTIST)
+        album = self.db.entry_get (entry, RB.RhythmDBPropType.ALBUM)
         self.artist = artist
         self.album = album
 



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