[rhythmbox] update python plugins to work with the new display page stuff
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] update python plugins to work with the new display page stuff
- Date: Thu, 4 Nov 2010 07:38:23 +0000 (UTC)
commit e6a5d832947dedaaedf8f04bba62c0140a6b7d25
Author: Jonathan Matthew <jonathan d14n org>
Date: Thu Nov 4 17:38:04 2010 +1000
update python plugins to work with the new display page stuff
bindings/python/rb.defs | 2 +-
plugins/coherence/upnp_coherence/__init__.py | 5 ++---
plugins/jamendo/jamendo/JamendoSource.py | 2 --
plugins/jamendo/jamendo/__init__.py | 7 +++----
plugins/magnatune/magnatune/MagnatuneSource.py | 4 ----
plugins/magnatune/magnatune/__init__.py | 7 +++----
6 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/bindings/python/rb.defs b/bindings/python/rb.defs
index bba28e1..42bcaeb 100644
--- a/bindings/python/rb.defs
+++ b/bindings/python/rb.defs
@@ -31,7 +31,7 @@
(define-object DisplayPageGroup
(in-module "RB")
- (parent "GObject")
+ (parent "RBDisplayPage")
(c-name "RBDisplayPageGroup")
(gtype-id "RB_TYPE_DISPLAY_PAGE_GROUP")
)
diff --git a/plugins/coherence/upnp_coherence/__init__.py b/plugins/coherence/upnp_coherence/__init__.py
index 61e1803..97c425a 100644
--- a/plugins/coherence/upnp_coherence/__init__.py
+++ b/plugins/coherence/upnp_coherence/__init__.py
@@ -252,20 +252,19 @@ class CoherencePlugin(rb.Plugin, log.Loggable):
return
db = self.shell.props.db
- group = rb.rb_source_group_get_by_name("shared")
+ group = rb.rb_display_page_group_get_by_id ("shared")
from UpnpSource import UpnpSource
source = gobject.new (UpnpSource,
shell=self.shell,
entry_type=self.entry_type,
- source_group=group,
plugin=self,
client=client,
udn=udn)
self.sources[udn] = source
- self.shell.append_source (source, None)
+ self.shell.append_display_page (source, group)
def create_configure_dialog(self, dialog=None):
if dialog is None:
diff --git a/plugins/jamendo/jamendo/JamendoSource.py b/plugins/jamendo/jamendo/JamendoSource.py
index 7ff9ffe..9481962 100644
--- a/plugins/jamendo/jamendo/JamendoSource.py
+++ b/plugins/jamendo/jamendo/JamendoSource.py
@@ -143,7 +143,6 @@ class JamendoSource(rb.BrowserSource):
sort_key = "Artist,ascending"
self.get_entry_view().set_sorting_type(sort_key)
- rb.BrowserSource.do_selected (self)
def do_delete_thyself(self):
if self.__update_id != 0:
@@ -163,7 +162,6 @@ class JamendoSource(rb.BrowserSource):
self.__catalogue_check = None
gconf.client_get_default().set_string(JamendoConfigureDialog.gconf_keys['sorting'], self.get_entry_view().get_sorting_type())
- rb.BrowserSource.do_impl_delete_thyself (self)
#
diff --git a/plugins/jamendo/jamendo/__init__.py b/plugins/jamendo/jamendo/__init__.py
index e7ecb14..9ad2d11 100644
--- a/plugins/jamendo/jamendo/__init__.py
+++ b/plugins/jamendo/jamendo/__init__.py
@@ -79,15 +79,14 @@ class Jamendo(rb.Plugin):
width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
icon = rb.try_load_icon(theme, "jamendo", width, 0)
- group = rb.rb_source_group_get_by_name ("stores")
+ group = rb.rb_display_page_group_get_by_id ("stores")
self.source = gobject.new (JamendoSource,
shell=shell,
entry_type=self.entry_type,
plugin=self,
- icon=icon,
- source_group=group)
+ pixbuf=icon)
shell.register_entry_type_for_source(self.source, self.entry_type)
- shell.append_source(self.source, None) # Add the source to the list
+ shell.append_display_page(self.source, group)
# Add button
manager = shell.get_player().get_property('ui-manager')
diff --git a/plugins/magnatune/magnatune/MagnatuneSource.py b/plugins/magnatune/magnatune/MagnatuneSource.py
index f542767..02c19a2 100644
--- a/plugins/magnatune/magnatune/MagnatuneSource.py
+++ b/plugins/magnatune/magnatune/MagnatuneSource.py
@@ -146,8 +146,6 @@ class MagnatuneSource(rb.BrowserSource):
self.get_entry_view().set_sorting_type(self.__client.get_string("/apps/rhythmbox/plugins/magnatune/sorting"))
- rb.BrowserSource.do_selected(self)
-
def do_impl_get_browser_key(self):
return "/apps/rhythmbox/plugins/magnatune/show_browser"
@@ -182,8 +180,6 @@ class MagnatuneSource(rb.BrowserSource):
self.__client.set_string("/apps/rhythmbox/plugins/magnatune/sorting", self.get_entry_view().get_sorting_type())
- rb.BrowserSource.do_impl_delete_thyself(self)
-
#
# methods for use by plugin and UI
#
diff --git a/plugins/magnatune/magnatune/__init__.py b/plugins/magnatune/magnatune/__init__.py
index 6f50ebc..28b7c40 100644
--- a/plugins/magnatune/magnatune/__init__.py
+++ b/plugins/magnatune/magnatune/__init__.py
@@ -98,16 +98,15 @@ class Magnatune(rb.Plugin):
width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
icon = rb.try_load_icon(theme, "magnatune", width, 0)
- group = rb.rb_source_group_get_by_name("stores")
+ group = rb.rb_display_page_group_get_by_id ("stores")
self.source = gobject.new(MagnatuneSource,
shell=shell,
entry_type=self.entry_type,
- source_group=group,
- icon=icon,
+ pixbuf=icon,
plugin=self)
shell.register_entry_type_for_source(self.source, self.entry_type)
- shell.append_source(self.source, None) # Add the source to the list
+ shell.append_display_page(self.source, group)
manager = shell.get_player().get_property('ui-manager')
# Add the popup menu actions
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]