rendered paste bodyIndex: shell/rb-shell.c
===================================================================
--- shell/rb-shell.c (revision 4832)
+++ shell/rb-shell.c (working copy)
@@ -277,6 +277,7 @@ enum
PROP_PROXY_CONFIG,
PROP_LIBRARY_SOURCE,
PROP_SOURCELIST_MODEL,
+ PROP_SOURCELIST,
PROP_VISIBILITY,
};
@@ -640,6 +641,14 @@ rb_shell_class_init (RBShellClass *klass
G_PARAM_READABLE));
g_object_class_install_property (object_class,
+ PROP_SOURCELIST,
+ g_param_spec_object ("sourcelist",
+ "sourcelist",
+ "RBSourcelist",
+ RB_TYPE_SOURCELIST,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (object_class,
PROP_VISIBILITY,
g_param_spec_boolean ("visibility",
"visibility",
@@ -804,6 +813,9 @@ rb_shell_get_property (GObject *object,
g_object_unref (model);
}
break;
+ case PROP_SOURCELIST:
+ g_value_set_object (value, shell->priv->sourcelist);
+ break;
case PROP_VISIBILITY:
g_value_set_boolean (value, rb_shell_get_visibility (shell));
break;
Index: plugins/ipod/rb-ipod-plugin.c
===================================================================
--- plugins/ipod/rb-ipod-plugin.c (revision 4832)
+++ plugins/ipod/rb-ipod-plugin.c (working copy)
@@ -219,7 +219,6 @@ static void
rb_ipod_plugin_cmd_rename (GtkAction *action,
RBIpodPlugin *plugin)
{
- RBRemovableMediaManager *manager = NULL;
RBSourceList *sourcelist = NULL;
RBSource *source = NULL;
@@ -230,21 +229,21 @@ rb_ipod_plugin_cmd_rename (GtkAction *ac
*/
g_object_get (G_OBJECT (plugin->shell),
"selected-source", &source,
- "removable-media-manager", &manager,
NULL);
if ((source == NULL) || !RB_IS_IPOD_SOURCE (source)) {
- g_object_unref (G_OBJECT (manager));
g_critical ("got iPodSourceRename action for non-ipod source");
+ if (source != NULL)
+ g_object_unref (source);
return;
}
- g_object_get (G_OBJECT (manager), "sourcelist", &sourcelist, NULL);
- g_object_unref (G_OBJECT (manager));
+ g_object_get (plugin->shell, "sourcelist", &sourcelist, NULL);
- rb_sourcelist_edit_source_name (sourcelist, RB_SOURCE (source));
+ rb_sourcelist_edit_source_name (sourcelist, source);
/* Once editing is done, notify::name will be fired on the source, and
* we'll catch that in our rename callback
*/
- g_object_unref (G_OBJECT (sourcelist));
+ g_object_unref (sourcelist);
+ g_object_unref (source);
}