static void
rb_ipod_plugin_cmd_playlist_new (GtkAction *action,
			   RBIpodPlugin *plugin)
{
	RBSource *source = NULL;

	g_object_get (G_OBJECT (plugin->shell),
		      "selected-source", &source,
		      NULL);

	if ((source == NULL) || !RB_IS_IPOD_SOURCE (source)) {
		g_critical ("got iPodSourceRename action for non-ipod source");
		if (source != NULL)
			g_object_unref (source);
		return;
	}

	rb_ipod_source_new_playlist (RB_IPOD_SOURCE (source));

	g_object_unref (source);
}
Exemple #2
0
static void
rb_ipod_plugin_cmd_playlist_new (GtkAction *action, RBSource *source)
{
	g_return_if_fail (RB_IS_IPOD_SOURCE (source));
	rb_ipod_source_new_playlist (RB_IPOD_SOURCE (source));
}