rhythmbox r6128 - in trunk: . plugins/ipod
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6128 - in trunk: . plugins/ipod
- Date: Wed, 14 Jan 2009 12:07:48 +0000 (UTC)
Author: jmatthew
Date: Wed Jan 14 12:07:48 2009
New Revision: 6128
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6128&view=rev
Log:
2009-01-14 Jonathan Matthew <jonathan d14n org>
* plugins/ipod/rb-ipod-plugin.c: (create_source_cb):
* plugins/ipod/rb-ipod-source.c: (rb_ipod_source_new):
* plugins/ipod/rb-ipod-source.h:
Pass the RBPlugin pointer in to the ipod source constructor.
* plugins/ipod/rb-ipod-source.c: (rb_ipod_source_show_properties):
Use rb_plugin_find_file to locate ipod-info.glade.
Fixes #567085.
Modified:
trunk/ChangeLog
trunk/plugins/ipod/rb-ipod-plugin.c
trunk/plugins/ipod/rb-ipod-source.c
trunk/plugins/ipod/rb-ipod-source.h
Modified: trunk/plugins/ipod/rb-ipod-plugin.c
==============================================================================
--- trunk/plugins/ipod/rb-ipod-plugin.c (original)
+++ trunk/plugins/ipod/rb-ipod-plugin.c Wed Jan 14 12:07:48 2009
@@ -249,7 +249,8 @@
}
}
- src = RB_SOURCE (rb_ipod_source_new (plugin->shell,
+ src = RB_SOURCE (rb_ipod_source_new (RB_PLUGIN (plugin),
+ plugin->shell,
mount));
plugin->ipod_sources = g_list_prepend (plugin->ipod_sources, src);
Modified: trunk/plugins/ipod/rb-ipod-source.c
==============================================================================
--- trunk/plugins/ipod/rb-ipod-source.c (original)
+++ trunk/plugins/ipod/rb-ipod-source.c Wed Jan 14 12:07:48 2009
@@ -257,7 +257,8 @@
}
RBRemovableMediaSource *
-rb_ipod_source_new (RBShell *shell,
+rb_ipod_source_new (RBPlugin *plugin,
+ RBShell *shell,
GMount *mount)
{
RBiPodSource *source;
@@ -281,6 +282,7 @@
g_free (path);
source = RB_IPOD_SOURCE (g_object_new (RB_TYPE_IPOD_SOURCE,
+ "plugin", plugin,
"entry-type", entry_type,
"mount", mount,
"shell", shell,
@@ -1585,8 +1587,10 @@
const gchar *mp;
char *used;
char *capacity;
+ char *glade_file;
RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source);
Itdb_Device *ipod_dev;
+ RBPlugin *plugin;
if (priv->ipod_db == NULL) {
rb_debug ("can't show ipod properties with no ipod db");
@@ -1595,7 +1599,18 @@
ipod_dev = rb_ipod_db_get_device (priv->ipod_db);
- xml = rb_glade_xml_new ("ipod-info.glade", "ipod-information", NULL);
+ g_object_get (source, "plugin", &plugin, NULL);
+ glade_file = rb_plugin_find_file (plugin, "ipod-info.glade");
+ g_object_unref (plugin);
+
+ if (glade_file == NULL) {
+ g_warning ("Couldn't find ipod-info.glade");
+ return;
+ }
+
+ xml = rb_glade_xml_new (glade_file, "ipod-information", NULL);
+ g_free (glade_file);
+
if (xml == NULL) {
rb_debug ("Couldn't load ipod-info.glade");
return;
Modified: trunk/plugins/ipod/rb-ipod-source.h
==============================================================================
--- trunk/plugins/ipod/rb-ipod-source.h (original)
+++ trunk/plugins/ipod/rb-ipod-source.h Wed Jan 14 12:07:48 2009
@@ -33,6 +33,7 @@
#include "rb-shell.h"
#include "rb-removable-media-source.h"
#include "rhythmdb.h"
+#include "rb-plugin.h"
G_BEGIN_DECLS
@@ -53,7 +54,8 @@
RBRemovableMediaSourceClass parent;
} RBiPodSourceClass;
-RBRemovableMediaSource *rb_ipod_source_new (RBShell *shell,
+RBRemovableMediaSource *rb_ipod_source_new (RBPlugin *plugin,
+ RBShell *shell,
GMount *mount);
GType rb_ipod_source_get_type (void);
GType rb_ipod_source_register_type (GTypeModule *module);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]