[rhythmbox/gobject-introspection: 27/34] fix bits and pieces in various plugins, some things seem to work



commit 48dfbf91f70aace36d630e35664a2d9c8cc54b40
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Jul 14 00:25:06 2010 +1000

    fix bits and pieces in various plugins, some things seem to work

 plugins/coherence/upnp_coherence/MediaPlayer.py |   22 ++++++++--------
 plugins/coherence/upnp_coherence/MediaStore.py  |   32 +++++++++++-----------
 plugins/context/context/AlbumTab.py             |    4 +-
 plugins/context/context/ArtistTab.py            |    2 +-
 plugins/context/context/ContextView.py          |    2 +-
 plugins/context/context/LyricsTab.py            |    4 +-
 plugins/im-status/im-status/__init__.py         |    6 ++--
 plugins/jamendo/jamendo/JamendoSource.py        |   10 +++---
 plugins/lyrics/lyrics/__init__.py               |    6 ++--
 plugins/magnatune/magnatune/MagnatuneSource.py  |    8 +++---
 plugins/pythonconsole/pythonconsole.py          |   13 ++-------
 plugins/replaygain/replaygain/player.py         |    4 +-
 plugins/sendto/__init__.py                      |    5 ++-
 13 files changed, 56 insertions(+), 62 deletions(-)
---
diff --git a/plugins/coherence/upnp_coherence/MediaPlayer.py b/plugins/coherence/upnp_coherence/MediaPlayer.py
index 7dfc2ee..953db4f 100644
--- a/plugins/coherence/upnp_coherence/MediaPlayer.py
+++ b/plugins/coherence/upnp_coherence/MediaPlayer.py
@@ -78,29 +78,29 @@ class RhythmboxPlayer(log.Loggable):
             self.metadata = None
             self.duration = None
         else:
-            id = self.shell.props.db.entry_get (entry, RhythmDB.PropType.ENTRY_ID)
-            bitrate = self.shell.props.db.entry_get(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
+            id = self.shell.props.db.entry_get_ulong (entry, RhythmDB.PropType.ENTRY_ID)
+            bitrate = self.shell.props.db.entry_get_ulong(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
             # Duration is in HH:MM:SS format
-            seconds = self.shell.props.db.entry_get(entry, RhythmDB.PropType.DURATION)
+            seconds = self.shell.props.db.entry_get_ulong(entry, RhythmDB.PropType.DURATION)
             hours = seconds / 3600
             seconds = seconds - hours * 3600
             minutes = seconds / 60
             seconds = seconds - minutes * 60
             self.duration = "%02d:%02d:%02d" % (hours, minutes, seconds)
 
-            mimetype = self.shell.props.db.entry_get(entry, RhythmDB.PropType.MIMETYPE)
+            mimetype = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.MIMETYPE)
             # This isn't a real mime-type
             if mimetype == "application/x-id3":
                 mimetype = "audio/mpeg"
-            size = self.shell.props.db.entry_get(entry, RhythmDB.PropType.FILE_SIZE)
+            size = self.shell.props.db.entry_get_uint64(entry, RhythmDB.PropType.FILE_SIZE)
 
             # create item
             item = DIDLLite.MusicTrack(id + TRACK_COUNT,'101')
-            item.album = self.shell.props.db.entry_get(entry, RhythmDB.PropType.ALBUM)
-            item.artist = self.shell.props.db.entry_get(entry, RhythmDB.PropType.ARTIST)
-            item.genre = self.shell.props.db.entry_get(entry, RhythmDB.PropType.GENRE)
-            item.originalTrackNumber = str(self.shell.props.db.entry_get (entry, RhythmDB.PropType.TRACK_NUMBER))
-            item.title = self.shell.props.db.entry_get(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
+            item.album = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.ALBUM)
+            item.artist = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.ARTIST)
+            item.genre = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.GENRE)
+            item.originalTrackNumber = str(self.shell.props.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER))
+            item.title = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
 
             cover = self.shell.props.db.entry_request_extra_metadata(entry, "rb:coverArt-uri")
             if cover != None:
@@ -109,7 +109,7 @@ class RhythmboxPlayer(log.Loggable):
 
             item.res = []
 
-            location = self.shell.props.db.entry_get(entry, RhythmDB.PropType.LOCATION)
+            location = self.shell.props.db.entry_get_string(entry, RhythmDB.PropType.LOCATION)
             if location.startswith("file://"):
                 location = unicode(urllib.unquote(location[len("file://"):]))
 
diff --git a/plugins/coherence/upnp_coherence/MediaStore.py b/plugins/coherence/upnp_coherence/MediaStore.py
index 5b0ce90..0b81cc5 100644
--- a/plugins/coherence/upnp_coherence/MediaStore.py
+++ b/plugins/coherence/upnp_coherence/MediaStore.py
@@ -101,9 +101,9 @@ class Album(BackendItem):
 
         def track_sort(x,y):
             entry = self.store.db.entry_lookup_by_id (x.id)
-            x_track = self.store.db.entry_get (entry, RhythmDB.PropType.TRACK_NUMBER)
+            x_track = self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER)
             entry = self.store.db.entry_lookup_by_id (y.id)
-            y_track = self.store.db.entry_get (entry, RhythmDB.PropType.TRACK_NUMBER)
+            y_track = self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER)
             return cmp(x_track,y_track)
 
         def collate (model, path, iter):
@@ -225,7 +225,7 @@ class Track(BackendItem):
         if type(id) == int:
             self.id = id
         else:
-            self.id = self.store.db.entry_get (id, RhythmDB.PropType.ENTRY_ID)
+            self.id = self.store.db.entry_get_ulong (id, RhythmDB.PropType.ENTRY_ID)
         self.parent_id = parent_id
 
     def get_children(self, start=0, request_count=0):
@@ -243,9 +243,9 @@ class Track(BackendItem):
         # load common values
         entry = self.store.db.entry_lookup_by_id(self.id)
         # Bitrate is in bytes/second, not kilobits/second
-        bitrate = self.store.db.entry_get(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
+        bitrate = self.store.db.entry_get_ulong(entry, RhythmDB.PropType.BITRATE) * 1024 / 8
         # Duration is in HH:MM:SS format
-        seconds = self.store.db.entry_get(entry, RhythmDB.PropType.DURATION)
+        seconds = self.store.db.entry_get_ulong(entry, RhythmDB.PropType.DURATION)
         hours = seconds / 3600
         seconds = seconds - hours * 3600
         minutes = seconds / 60
@@ -253,13 +253,13 @@ class Track(BackendItem):
         duration = ("%02d:%02d:%02d") % (hours, minutes, seconds)
 
         location = self.get_path(entry)
-        mimetype = self.store.db.entry_get(entry, RhythmDB.PropType.MIMETYPE)
+        mimetype = self.store.db.entry_get_string(entry, RhythmDB.PropType.MIMETYPE)
         # This isn't a real mime-type
         if mimetype == "application/x-id3":
             mimetype = "audio/mpeg"
-        size = self.store.db.entry_get(entry, RhythmDB.PropType.FILE_SIZE)
+        size = self.store.db.entry_get_uint64(entry, RhythmDB.PropType.FILE_SIZE)
 
-        album = self.store.db.entry_get(entry, RhythmDB.PropType.ALBUM)
+        album = self.store.db.entry_get_string(entry, RhythmDB.PropType.ALBUM)
         if self.parent_id == None:
             try:
                 self.parent_id = self.store.albums[album].id
@@ -270,11 +270,11 @@ class Track(BackendItem):
         item = DIDLLite.MusicTrack(self.id + TRACK_COUNT,self.parent_id)
         item.album = album
 
-        item.artist = self.store.db.entry_get(entry, RhythmDB.PropType.ARTIST)
+        item.artist = self.store.db.entry_get_string(entry, RhythmDB.PropType.ARTIST)
         #item.date =
-        item.genre = self.store.db.entry_get(entry, RhythmDB.PropType.GENRE)
-        item.originalTrackNumber = str(self.store.db.entry_get (entry, RhythmDB.PropType.TRACK_NUMBER))
-        item.title = self.store.db.entry_get(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
+        item.genre = self.store.db.entry_get_string(entry, RhythmDB.PropType.GENRE)
+        item.originalTrackNumber = str(self.store.db.entry_get_ulong (entry, RhythmDB.PropType.TRACK_NUMBER))
+        item.title = self.store.db.entry_get_string(entry, RhythmDB.PropType.TITLE) # much nicer if it was entry.title
 
         cover = self.store.db.entry_request_extra_metadata(entry, "rb:coverArt-uri")
         #self.warning("cover for %r is %r", item.title, cover)
@@ -310,7 +310,7 @@ class Track(BackendItem):
 
     def get_name(self):
         entry = self.store.db.entry_lookup_by_id (self.id)
-        return self.store.db.entry_get(entry, RhythmDB.PropType.TITLE)
+        return self.store.db.entry_get_string(entry, RhythmDB.PropType.TITLE)
 
     def get_url(self):
         return self.store.urlbase + str(self.id + TRACK_COUNT)
@@ -318,7 +318,7 @@ class Track(BackendItem):
     def get_path(self, entry = None):
         if entry is None:
             entry = self.store.db.entry_lookup_by_id (self.id)
-        uri = self.store.db.entry_get(entry, RhythmDB.PropType.LOCATION)
+        uri = self.store.db.entry_get_string(entry, RhythmDB.PropType.LOCATION)
         self.info("Track get_path uri = %r", uri)
         location = None
         if uri.startswith("file://"):
@@ -437,9 +437,9 @@ class MediaStore(BackendStore):
         tracks = []
 
         def track_cb (entry):
-            if self.db.entry_get (entry, RhythmDB.PropType.HIDDEN):
+            if self.db.entry_get_boolean (entry, RhythmDB.PropType.HIDDEN):
                 return
-            id = self.db.entry_get (entry, RhythmDB.PropType.ENTRY_ID)
+            id = self.db.entry_get_ulong (entry, RhythmDB.PropType.ENTRY_ID)
             track = Track(self, id, parent_id)
             tracks.append(track)
 
diff --git a/plugins/context/context/AlbumTab.py b/plugins/context/context/AlbumTab.py
index 50abccb..d73e60d 100644
--- a/plugins/context/context/AlbumTab.py
+++ b/plugins/context/context/AlbumTab.py
@@ -78,8 +78,8 @@ class AlbumTab (gobject.GObject):
         if entry is None:
             return None
 
-        artist = self.db.entry_get (entry, RhythmDB.PropType.ARTIST)
-        album  = self.db.entry_get (entry, RhythmDB.PropType.ALBUM)
+        artist = self.db.entry_get_string (entry, RhythmDB.PropType.ARTIST)
+        album  = self.db.entry_get_string (entry, RhythmDB.PropType.ALBUM)
         if self.active and artist != self.artist:
             self.view.loading(artist)
             self.ds.fetch_album_list (artist)
diff --git a/plugins/context/context/ArtistTab.py b/plugins/context/context/ArtistTab.py
index ed65c61..fe75313 100644
--- a/plugins/context/context/ArtistTab.py
+++ b/plugins/context/context/ArtistTab.py
@@ -81,7 +81,7 @@ class ArtistTab (gobject.GObject):
         if entry is None:
             print "Nothing playing"
             return None
-        artist = self.db.entry_get (entry, RhythmDB.PropType.ARTIST)
+        artist = self.db.entry_get_string (entry, RhythmDB.PropType.ARTIST)
 
         if self.active and self.artist != artist:
             self.datasource.fetch_artist_data (artist)
diff --git a/plugins/context/context/ContextView.py b/plugins/context/context/ContextView.py
index e7705cf..4aef0cd 100644
--- a/plugins/context/context/ContextView.py
+++ b/plugins/context/context/ContextView.py
@@ -191,7 +191,7 @@ class ContextView (gobject.GObject):
         if playing_entry is None:
             return
 
-        playing_artist = self.db.entry_get (playing_entry, RhythmDB.PropType.ARTIST)
+        playing_artist = self.db.entry_get_string (playing_entry, RhythmDB.PropType.ARTIST)
 
         if self.current_artist != playing_artist:
             self.current_artist = playing_artist.replace ('&', '&amp;')
diff --git a/plugins/context/context/LyricsTab.py b/plugins/context/context/LyricsTab.py
index 6cad922..2e01c29 100644
--- a/plugins/context/context/LyricsTab.py
+++ b/plugins/context/context/LyricsTab.py
@@ -153,8 +153,8 @@ class LyricsDataSource (gobject.GObject):
             self.emit ('lyrics-ready', self.entry, lyrics)
 
     def get_title (self):
-        return self.db.entry_get(self.entry, RhythmDB.PropType.TITLE)
+        return self.db.entry_get_string(self.entry, RhythmDB.PropType.TITLE)
 
     def get_artist (self):
-        return self.db.entry_get(self.entry, RhythmDB.PropType.ARTIST)
+        return self.db.entry_get_string(self.entry, RhythmDB.PropType.ARTIST)
 
diff --git a/plugins/im-status/im-status/__init__.py b/plugins/im-status/im-status/__init__.py
index 6890069..e19f3de 100644
--- a/plugins/im-status/im-status/__init__.py
+++ b/plugins/im-status/im-status/__init__.py
@@ -136,9 +136,9 @@ class IMStatusPlugin (RB.Plugin):
 
   def set_status_from_entry (self):
     db = self.shell.get_property ("db")
-    self.current_artist = db.entry_get (self.current_entry, RhythmDB.PropType.ARTIST)
-    self.current_title  = db.entry_get (self.current_entry, RhythmDB.PropType.TITLE)
-    self.current_album  = db.entry_get (self.current_entry, RhythmDB.PropType.ALBUM)
+    self.current_artist = db.entry_get_string (self.current_entry, RhythmDB.PropType.ARTIST)
+    self.current_title  = db.entry_get_string (self.current_entry, RhythmDB.PropType.TITLE)
+    self.current_album  = db.entry_get_string (self.current_entry, RhythmDB.PropType.ALBUM)
 
     if self.current_entry.get_entry_type().category == RhythmDB.EntryCategory.STREAM:
       if not self.current_artist:
diff --git a/plugins/jamendo/jamendo/JamendoSource.py b/plugins/jamendo/jamendo/JamendoSource.py
index 1731fa3..410ca61 100644
--- a/plugins/jamendo/jamendo/JamendoSource.py
+++ b/plugins/jamendo/jamendo/JamendoSource.py
@@ -292,7 +292,7 @@ class JamendoSource(RB.BrowserSource):
 		#without any track selected
 		if len(tracks) == 1:
 			track = tracks[0]
-			albumid = self.__db.entry_get(track, RhythmDB.PropType.MUSICBRAINZ_ALBUMID)
+			albumid = self.__db.entry_get_string(track, RhythmDB.PropType.MB_ALBUMID)
 
 			formats = {}
 			formats["mp32"] = mp32_uri + albumid
@@ -319,8 +319,8 @@ class JamendoSource(RB.BrowserSource):
 		if len(tracks) == 1:
 			track = tracks[0]
 			# The Album ID can be used to lookup the artist, and issue a clean redirect.
-			albumid = self.__db.entry_get(track, RhythmDB.PropType.MUSICBRAINZ_ALBUMID)
-			artist = self.__db.entry_get(track, RhythmDB.PropType.ARTIST)
+			albumid = self.__db.entry_get_string(track, RhythmDB.PropType.MB_ALBUMID)
+			artist = self.__db.entry_get_string(track, RhythmDB.PropType.ARTIST)
 			url = artist_url + albumid.__str__() + "/"
 
 			l = rb.Loader()
@@ -343,8 +343,8 @@ class JamendoSource(RB.BrowserSource):
 		gobject.idle_add(self.emit_cover_art_uri, entry)
 
 	def emit_cover_art_uri (self, entry):
-		stream = self.__db.entry_get (entry, RhythmDB.PropType.LOCATION)
-		albumid = self.__db.entry_get (entry, RhythmDB.PropType.MUSICBRAINZ_ALBUMID)
+		stream = self.__db.entry_get_string (entry, RhythmDB.PropType.LOCATION)
+		albumid = self.__db.entry_get_string (entry, RhythmDB.PropType.MB_ALBUMID)
 		url = artwork_url % albumid
 
 		self.__db.emit_entry_extra_metadata_notify (entry, "rb:coverArt-uri", str(url))
diff --git a/plugins/lyrics/lyrics/__init__.py b/plugins/lyrics/lyrics/__init__.py
index beba592..ea9ae29 100644
--- a/plugins/lyrics/lyrics/__init__.py
+++ b/plugins/lyrics/lyrics/__init__.py
@@ -107,8 +107,8 @@ def get_artist_and_title(db, entry):
 	if stream_song_title is not None:
 		(artist, title) = extract_artist_and_title(stream_song_title)
 	else:
-		artist = db.entry_get(entry, RhythmDB.PropType.ARTIST)
-		title = db.entry_get(entry, RhythmDB.PropType.TITLE)
+		artist = db.entry_get_string(entry, RhythmDB.PropType.ARTIST)
+		title = db.entry_get_string(entry, RhythmDB.PropType.TITLE)
 	return (artist, title)
 
 def extract_artist_and_title(stream_song_title):
@@ -345,7 +345,7 @@ class LyricsDisplayPlugin(RB.Plugin):
 		self.shell = shell
 		self.action = Gtk.Action (name='ViewSongLyrics', label=_('Song L_yrics'),
 					  tooltip=_('Display lyrics for the playing song'),
-					  stock='rb-song-lyrics')
+					  stock_id='rb-song-lyrics')
 		self.activate_id = self.action.connect ('activate', self.show_song_lyrics, shell)
 		
 		self.action_group = Gtk.ActionGroup (name='SongLyricsPluginActions')
diff --git a/plugins/magnatune/magnatune/MagnatuneSource.py b/plugins/magnatune/magnatune/MagnatuneSource.py
index f6a3836..bb947f7 100644
--- a/plugins/magnatune/magnatune/MagnatuneSource.py
+++ b/plugins/magnatune/magnatune/MagnatuneSource.py
@@ -194,7 +194,7 @@ class MagnatuneSource(RB.BrowserSource):
 		urls = set([])
 
 		for tr in tracks:
-			sku = self.__sku_dict[self.__db.entry_get(tr, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(tr, RhythmDB.PropType.LOCATION)]
 			url = self.__home_dict[sku]
 			if url not in urls:
 				Gtk.show_uri(screen, url, Gdk.CURRENT_TIME)
@@ -206,7 +206,7 @@ class MagnatuneSource(RB.BrowserSource):
 		urls = set([])
 
 		for tr in tracks:
-			sku = self.__sku_dict[self.__db.entry_get(tr, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(tr, RhythmDB.PropType.LOCATION)]
 			url = magnatune_buy_album_uri + urllib.urlencode({ 'sku': sku, 'ref': magnatune_partner_id })
 			if url not in urls:
 				Gtk.show_uri(screen, url, Gdk.CURRENT_TIME)
@@ -229,7 +229,7 @@ class MagnatuneSource(RB.BrowserSource):
 		skus = []
 
 		for track in tracks:
-			sku = self.__sku_dict[self.__db.entry_get(track, RhythmDB.PropType.LOCATION)]
+			sku = self.__sku_dict[self.__db.entry_get_string(track, RhythmDB.PropType.LOCATION)]
 			if sku in skus:
 				continue
 			skus.append(sku)
@@ -566,7 +566,7 @@ class MagnatuneSource(RB.BrowserSource):
 		gobject.idle_add(self.emit_cover_art_uri, entry)
 
 	def emit_cover_art_uri(self, entry):
-		sku = self.__sku_dict[self.__db.entry_get(entry, RhythmDB.PropType.LOCATION)]
+		sku = self.__sku_dict[self.__db.entry_get_string(entry, RhythmDB.PropType.LOCATION)]
 		url = self.__art_dict[sku]
 		self.__db.emit_entry_extra_metadata_notify(entry, 'rb:coverArt-uri', url)
 		return False
diff --git a/plugins/pythonconsole/pythonconsole.py b/plugins/pythonconsole/pythonconsole.py
index 7bfa613..006530f 100644
--- a/plugins/pythonconsole/pythonconsole.py
+++ b/plugins/pythonconsole/pythonconsole.py
@@ -38,10 +38,7 @@ import re
 import traceback
 import gobject
 import gi.repository
-from gi.repository import Gtk
-from gi.repository import Gdk
-from gi.repository import Pango
-from gi.repository import GConf
+from gi.repository import Gtk, Gdk, Pango, GConf
 from gi.repository import RB
 from gi.repository import RhythmDB
 
@@ -110,7 +107,6 @@ class PythonConsolePlugin(RB.Plugin):
 			self.window.destroy()
 		
 	def show_console(self, action, shell):
-		print "dang"
 		if not self.window:
 			ns = {'__builtins__' : __builtins__, 
 			      'RB' : RB,
@@ -119,26 +115,23 @@ class PythonConsolePlugin(RB.Plugin):
 			console = PythonConsole(namespace = ns, 
 			                        destroy_cb = self.destroy_console)
 			console.set_size_request(600, 400)
-			print console
 			console.eval('print "' + \
 			             _('You can access the main window ' \
 			             'through the \'shell\' variable :') +  
 			             '\\n%s" % shell', False)
-			print console
 	
 			self.window = Gtk.Window()
 			self.window.set_title('Rhythmbox Python Console')
 			self.window.add(console)
 			self.window.connect('destroy', self.destroy_console)
 			self.window.show_all()
-			print self.window
 		else:
 			self.window.show_all()
 		self.window.grab_focus()
 
 	def enable_debugging(self, action, shell):
 		msg = _("After you press OK, Rhythmbox will wait until you connect to it with winpdb or rpdb2. If you have not set a debugger password in GConf, it will use the default password ('rhythmbox').")
-		dialog = Gtk.MessageDialog(None, 0, Gtk.MESSAGE_INFO, Gtk.BUTTONS_OK_CANCEL, msg)
+		dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, Gtk.ButtonsType.OK_CANCEL, msg)
 		if dialog.run() == Gtk.RESPONSE_OK:
 			gconfclient = GConf.Client.get_default()
 			password = gconfclient.get_string('/apps/rhythmbox/plugins/pythonconsole/rpdb2_password') or "rhythmbox"
@@ -386,7 +379,7 @@ class PythonConsole(Gtk.ScrolledWindow):
 		buffer = self.view.get_buffer()
 		lin = buffer.get_mark("input-line")
 		buffer.delete(self.get_iter_at_mark(lin),
-		              self.get_end_iter())
+			      self.get_end_iter())
  
 		if isinstance(command, list) or isinstance(command, tuple):
  			for c in command:
diff --git a/plugins/replaygain/replaygain/player.py b/plugins/replaygain/replaygain/player.py
index 23c97f8..fe6857f 100644
--- a/plugins/replaygain/replaygain/player.py
+++ b/plugins/replaygain/replaygain/player.py
@@ -53,8 +53,8 @@ class ReplayGainPlayer(object):
 		self.player = self.shell_player.props.player
 		self.gconf = GConf.Client.get_default()
 
-		self.gconf.add_dir(config.GCONF_DIR, preload=False)
-		self.gconf.notify_add(config.GCONF_KEYS['limiter'], self.limiter_changed_cb)
+		self.gconf.add_dir(config.GCONF_DIR, GConf.ClientPreloadType.PRELOAD_NONE)
+		self.gconf.notify_add(config.GCONF_KEYS['limiter'], self.limiter_changed_cb, None)
 
 		self.previous_gain = []
 		self.fallback_gain = 0.0
diff --git a/plugins/sendto/__init__.py b/plugins/sendto/__init__.py
index 3d51545..5afc308 100644
--- a/plugins/sendto/__init__.py
+++ b/plugins/sendto/__init__.py
@@ -50,12 +50,13 @@ class SendToPlugin (RB.Plugin):
 
     def activate(self, shell):
         self.__action = Gtk.Action(name='SendTo', label=_('Send to...'),
-                                tooltip=_('Send files by mail, instant message...'), '')
+                                tooltip=_('Send files by mail, instant message...'),
+				stock_id='')
         self.__action.connect('activate', self.send_to, shell)
 
         self.__action_group = Gtk.ActionGroup(name='SendToActionGroup')
         self.__action_group.add_action(self.__action)
-        shell.get_ui_manager().insert_action_group(self.__action_group)
+        shell.get_ui_manager().insert_action_group(self.__action_group, -1)
 
         self.__ui_id = shell.get_ui_manager().add_ui_from_string(ui_definition)
 



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