static void
impl_activate (PeasActivatable *plugin)
{
	TotemDiscRecorderPlugin *pi = TOTEM_DISC_RECORDER_PLUGIN (plugin);
	TotemDiscRecorderPluginPrivate *priv = pi->priv;
	GMenu *menu;
	char *path;

	/* make sure brasero is in the path */
	path = g_find_program_in_path ("brasero");
	if (!path)
		return;
	g_free (path);

	priv->totem = g_object_get_data (G_OBJECT (plugin), "object");

	g_signal_connect (priv->totem,
			  "file-opened",
			  G_CALLBACK (totem_disc_recorder_file_opened),
			  plugin);
	g_signal_connect (priv->totem,
			  "file-closed",
			  G_CALLBACK (totem_disc_recorder_file_closed),
			  plugin);

	/* Create the actions */
	priv->dvd_action = g_simple_action_new ("media-optical-video-new", NULL);
	g_signal_connect (G_OBJECT (priv->dvd_action), "activate",
			  G_CALLBACK (totem_disc_recorder_plugin_burn), plugin);
	g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->dvd_action));

	priv->copy_action = g_simple_action_new ("media-optical-copy", NULL);
	g_signal_connect (G_OBJECT (priv->copy_action), "activate",
			  G_CALLBACK (totem_disc_recorder_plugin_copy), plugin);
	g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->copy_action));

	priv->copy_vcd_action = g_simple_action_new ("media-optical-copy-vcd", NULL);
	g_signal_connect (G_OBJECT (priv->copy_vcd_action), "activate",
			  G_CALLBACK (totem_disc_recorder_plugin_copy), plugin);
	g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->copy_vcd_action));

	/* Install the menu */
	menu = totem_object_get_menu_section (priv->totem, "burn-placeholder");
	menu_append_hidden (G_MENU (menu), _("_Create Video Disc…"), "app.media-optical-video-new");
	menu_append_hidden (G_MENU (menu), _("Copy Vide_o DVD…"), "app.media-optical-copy");
	menu_append_hidden (G_MENU (menu), _("Copy (S)VCD…"), "app.media-optical-copy-vcd");

	if (!totem_object_is_paused (priv->totem) && !totem_object_is_playing (priv->totem)) {
		set_menu_items_state (pi, FALSE, FALSE, FALSE);
	} else {
		char *mrl;

		mrl = totem_object_get_current_mrl (priv->totem);
		totem_disc_recorder_file_opened (priv->totem, mrl, pi);
		g_free (mrl);
	}
}
static void
impl_activate (PeasActivatable *plugin)
{
	GtkWindow *window;
	TotemSkiptoPlugin *pi = TOTEM_SKIPTO_PLUGIN (plugin);
	TotemSkiptoPluginPrivate *priv = pi->priv;
	GMenu *menu;
	GMenuItem *item;

	priv->totem = g_object_get_data (G_OBJECT (plugin), "object");
	priv->handler_id_stream_length = g_signal_connect (G_OBJECT (priv->totem),
				"notify::stream-length",
				G_CALLBACK (property_notify_cb),
				pi);
	priv->handler_id_seekable = g_signal_connect (G_OBJECT (priv->totem),
				"notify::seekable",
				G_CALLBACK (property_notify_cb),
				pi);

	/* Key press handler */
	window = totem_object_get_main_window (priv->totem);
	priv->handler_id_key_press = g_signal_connect (G_OBJECT(window),
				"key-press-event",
				G_CALLBACK (on_window_key_press_event),
				pi);
	g_object_unref (window);

	/* Install the menu */
	priv->action = g_simple_action_new ("skip-to", NULL);
	g_signal_connect (G_OBJECT (priv->action), "activate",
			  G_CALLBACK (skip_to_action_callback), plugin);
	g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->action));

	menu = totem_object_get_menu_section (priv->totem, "skipto-placeholder");
	item = g_menu_item_new (_("_Skip To…"), "app.skip-to");
	g_menu_item_set_attribute (item, "accel", "s", "<Ctrl>K");
	g_menu_append_item (G_MENU (menu), item);

	totem_skipto_update_from_state (priv->totem, pi);
}
static void rotation_plugin_real_activate (PeasActivatable* base) {
	RotationPlugin * self;
	TotemObject* t = NULL;
	GObject* _tmp0_ = NULL;
	GObject* _tmp1_ = NULL;
	gchar* mrl = NULL;
	TotemObject* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GMenu* menu = NULL;
	TotemObject* _tmp4_ = NULL;
	GMenu* _tmp5_ = NULL;
	GMenu* _tmp6_ = NULL;
	TotemObject* _tmp7_ = NULL;
	GtkWidget* _tmp8_ = NULL;
	BaconVideoWidget* _tmp9_ = NULL;
	GSimpleAction* _tmp10_ = NULL;
	GSimpleAction* _tmp11_ = NULL;
	TotemObject* _tmp12_ = NULL;
	GSimpleAction* _tmp13_ = NULL;
	TotemObject* _tmp14_ = NULL;
	GSimpleAction* _tmp15_ = NULL;
	GSimpleAction* _tmp16_ = NULL;
	TotemObject* _tmp17_ = NULL;
	GSimpleAction* _tmp18_ = NULL;
	TotemObject* _tmp19_ = NULL;
	GMenuItem* item = NULL;
	const gchar* _tmp20_ = NULL;
	GMenuItem* _tmp21_ = NULL;
	GMenuItem* _tmp22_ = NULL;
	GMenu* _tmp23_ = NULL;
	GMenuItem* _tmp24_ = NULL;
	const gchar* _tmp25_ = NULL;
	GMenuItem* _tmp26_ = NULL;
	GMenuItem* _tmp27_ = NULL;
	GMenu* _tmp28_ = NULL;
	GMenuItem* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp33_ = NULL;
	TotemObject* _tmp35_ = NULL;
	TotemObject* _tmp36_ = NULL;
	self = (RotationPlugin*) base;
	g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	t = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
	_tmp2_ = t;
	_tmp3_ = totem_object_get_current_mrl (_tmp2_);
	mrl = _tmp3_;
	_tmp4_ = t;
	_tmp5_ = totem_object_get_menu_section (_tmp4_, "rotation-placeholder");
	_tmp6_ = _g_object_ref0 (_tmp5_);
	menu = _tmp6_;
	_tmp7_ = t;
	_tmp8_ = totem_object_get_video_widget (_tmp7_);
	_tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, BACON_TYPE_VIDEO_WIDGET) ? ((BaconVideoWidget*) _tmp8_) : NULL;
	if (_tmp9_ == NULL) {
		_g_object_unref0 (_tmp8_);
	}
	_g_object_unref0 (self->priv->bvw);
	self->priv->bvw = _tmp9_;
	_tmp10_ = g_simple_action_new ("rotate-left", NULL);
	_g_object_unref0 (self->priv->rotate_left_action);
	self->priv->rotate_left_action = _tmp10_;
	_tmp11_ = self->priv->rotate_left_action;
	g_signal_connect_object (_tmp11_, "activate", (GCallback) _rotation_plugin_cb_rotate_left_g_simple_action_activate, self, 0);
	_tmp12_ = t;
	_tmp13_ = self->priv->rotate_left_action;
	g_action_map_add_action ((GActionMap*) _tmp12_, (GAction*) _tmp13_);
	_tmp14_ = t;
	gtk_application_add_accelerator ((GtkApplication*) _tmp14_, "<Primary><Shift>R", "app.rotate-left", NULL);
	_tmp15_ = g_simple_action_new ("rotate-right", NULL);
	_g_object_unref0 (self->priv->rotate_right_action);
	self->priv->rotate_right_action = _tmp15_;
	_tmp16_ = self->priv->rotate_right_action;
	g_signal_connect_object (_tmp16_, "activate", (GCallback) _rotation_plugin_cb_rotate_right_g_simple_action_activate, self, 0);
	_tmp17_ = t;
	_tmp18_ = self->priv->rotate_right_action;
	g_action_map_add_action ((GActionMap*) _tmp17_, (GAction*) _tmp18_);
	_tmp19_ = t;
	gtk_application_add_accelerator ((GtkApplication*) _tmp19_, "<Primary>R", "app.rotate-right", NULL);
	_tmp20_ = _ ("_Rotate ↷");
	_tmp21_ = g_menu_item_new (_tmp20_, "app.rotate-right");
	item = _tmp21_;
	_tmp22_ = item;
	g_menu_item_set_attribute (_tmp22_, "accel", "s", "<Primary>R", NULL);
	_tmp23_ = menu;
	_tmp24_ = item;
	g_menu_append_item (_tmp23_, _tmp24_);
	_tmp25_ = _ ("Rotate ↶");
	_tmp26_ = g_menu_item_new (_tmp25_, "app.rotate-left");
	_g_object_unref0 (item);
	item = _tmp26_;
	_tmp27_ = item;
	g_menu_item_set_attribute (_tmp27_, "accel", "s", "<Primary><Shift>R", NULL);
	_tmp28_ = menu;
	_tmp29_ = item;
	g_menu_append_item (_tmp28_, _tmp29_);
	_tmp30_ = mrl;
	if (_tmp30_ == NULL) {
		GSimpleAction* _tmp31_ = NULL;
		GSimpleAction* _tmp32_ = NULL;
		_tmp31_ = self->priv->rotate_right_action;
		g_simple_action_set_enabled (_tmp31_, FALSE);
		_tmp32_ = self->priv->rotate_left_action;
		g_simple_action_set_enabled (_tmp32_, FALSE);
	}
	_tmp33_ = mrl;
	if (_tmp33_ != NULL) {
		const gchar* _tmp34_ = NULL;
		_tmp34_ = mrl;
		rotation_plugin_try_restore_state (self, _tmp34_, ____lambda6__gasync_ready_callback, g_object_ref (self));
	}
	_tmp35_ = t;
	g_signal_connect_object (_tmp35_, "file-closed", (GCallback) _rotation_plugin_cb_file_closed_totem_object_file_closed, self, 0);
	_tmp36_ = t;
	g_signal_connect_object (_tmp36_, "file-opened", (GCallback) _rotation_plugin_cb_file_opened_totem_object_file_opened, self, 0);
	_g_object_unref0 (item);
	_g_object_unref0 (menu);
	_g_free0 (mrl);
	_g_object_unref0 (t);
}
static void
impl_activate (PeasActivatable *plugin)
{
	TotemMoviePropertiesPlugin *pi;
	TotemObject *totem;
	GtkWindow *parent;
	GMenu *menu;
	GMenuItem *item;

	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);
	gtk_widget_set_sensitive (pi->priv->props, FALSE);

	parent = totem_object_get_main_window (totem);
	pi->priv->dialog = gtk_dialog_new_with_buttons (_("Properties"),
							parent,
							GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR,
							NULL,
							GTK_RESPONSE_CLOSE,
							NULL);
	g_object_unref (parent);
	g_signal_connect (pi->priv->dialog, "delete-event",
			  G_CALLBACK (gtk_widget_hide_on_delete), NULL);
	g_signal_connect (pi->priv->dialog, "response",
			  G_CALLBACK (gtk_widget_hide_on_delete), NULL);
	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (pi->priv->dialog))),
			   pi->priv->props);

	/* Properties action */
	pi->priv->props_action = g_simple_action_new ("properties", NULL);
	g_signal_connect (G_OBJECT (pi->priv->props_action), "activate",
			  G_CALLBACK (properties_action_cb), pi);
	g_action_map_add_action (G_ACTION_MAP (totem), G_ACTION (pi->priv->props_action));
	gtk_application_add_accelerator (GTK_APPLICATION (totem),
					 "<Primary>p",
					 "app.properties",
					 NULL);
	/* FIXME: Handle GDK_KEY_View */

	/* Install the menu */
	menu = totem_object_get_menu_section (totem, "properties-placeholder");
	item = g_menu_item_new (_("_Properties"), "app.properties");
	g_menu_item_set_attribute (item, "accel", "s", "<Primary>p");
	g_menu_append_item (G_MENU (menu), item);
	g_object_unref (item);

	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);
}