static void
impl_activate (PeasActivatable *plugin)
{
	TotemMoviePropertiesPlugin *pi;
	TotemObject *totem;

	pi = TOTEM_MOVIE_PROPERTIES_PLUGIN (plugin);
	totem = g_object_get_data (G_OBJECT (plugin), "object");

	pi->priv->props = bacon_video_widget_properties_new ();
	gtk_widget_show (pi->priv->props);
	totem_add_sidebar_page (totem,
				"properties",
				_("Properties"),
				pi->priv->props);
	gtk_widget_set_sensitive (pi->priv->props, FALSE);

	g_signal_connect (G_OBJECT (totem),
			  "file-opened",
			  G_CALLBACK (totem_movie_properties_plugin_file_opened),
			  plugin);
	g_signal_connect (G_OBJECT (totem),
			  "file-closed",
			  G_CALLBACK (totem_movie_properties_plugin_file_closed),
			  plugin);
	g_signal_connect (G_OBJECT (totem),
			  "metadata-updated",
			  G_CALLBACK (totem_movie_properties_plugin_metadata_updated),
			  plugin);
	pi->priv->handler_id_stream_length = g_signal_connect (G_OBJECT (totem),
							 "notify::stream-length",
							 G_CALLBACK (stream_length_notify_cb),
							 plugin);
}
static gboolean
impl_activate (TotemPlugin *plugin, TotemObject *totem, GError **error)
{
	TotemYouTubePlugin *self = TOTEM_YOUTUBE_PLUGIN (plugin);
	GtkWindow *main_window;
	GtkBuilder *builder;
	guint i;

	self->totem = g_object_ref (totem);
	self->bvw = BACON_VIDEO_WIDGET (totem_get_video_widget (totem));

	/* Set up the interface */
	main_window = totem_get_main_window (totem);
	builder = totem_plugin_load_interface (plugin, "youtube.ui", TRUE, main_window, self);
	g_object_unref (main_window);

	self->search_entry = GTK_ENTRY (gtk_builder_get_object (builder, "yt_search_entry"));
	self->search_button = GTK_BUTTON (gtk_builder_get_object (builder, "yt_search_button"));
	self->notebook = GTK_NOTEBOOK (gtk_builder_get_object (builder, "yt_notebook"));

	/* Set up the tree view pages */
	for (i = 0; i < NUM_TREE_VIEWS; i++)
		set_up_tree_view (self, builder, i);
	self->current_tree_view = SEARCH_TREE_VIEW;

	self->vbox = GTK_WIDGET (gtk_builder_get_object (builder, "yt_vbox"));
	gtk_widget_show_all (self->vbox);

	/* Add the sidebar page */
	totem_add_sidebar_page (totem, "youtube", _("YouTube"), self->vbox);
	g_object_unref (builder);

	return TRUE;
}