rem: mediadev = gconf_client_get_string (totem->gc, GCONF_PREFIX"/mediadev", NULL);
add: mediadev = g_strdup (gconf_client_get_string (totem->gc, GCONF_PREFIX"/mediadev", NULL));
context: totem_setup_preferences (Totem *totem){	GtkWidget *item, *menu;	const char *mediadev;	gboolean show_visuals, auto_resize, is_local, deinterlace;	int connection_speed, i, found;	char *path, *visual;	GList *list, *l;	BaconVideoWidgetAudioOutType audio_out;	g_return_if_fail (totem->gc != NULL);	is_local = totem_display_is_local ();	gconf_client_add_dir (totem->gc, "/apps/totem",			GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);	gconf_client_notify_add (totem->gc, GCONF_PREFIX"/auto_resize",			(GConfClientNotifyFunc) auto_resize_changed_cb,			totem, NULL, NULL);	gconf_client_notify_add (totem->gc, GCONF_PREFIX"/show_vfx",			(GConfClientNotifyFunc) show_vfx_changed_cb,			totem, NULL, NULL);	gconf_client_notify_add (totem->gc, GCONF_PREFIX"/mediadev",			(GConfClientNotifyFunc) mediadev_changed_cb,			totem, NULL, NULL);	totem->prefs = glade_xml_get_widget (totem->xml, "totem_preferences_window");	g_signal_connect (G_OBJECT (totem->prefs),			"response", G_CALLBACK (hide_prefs), (gpointer) totem);	g_signal_connect (G_OBJECT (totem->prefs), "delete-event",			G_CALLBACK (hide_prefs), (gpointer) totem);	/* Auto-resize */	auto_resize = gconf_client_get_bool (totem->gc,			GCONF_PREFIX"/auto_resize", NULL);	item = glade_xml_get_widget (totem->xml, "tpw_display_checkbutton");	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), auto_resize);	g_signal_connect (G_OBJECT (item), "toggled",			G_CALLBACK (on_checkbutton1_toggled), totem);	bacon_video_widget_set_auto_resize		(BACON_VIDEO_WIDGET (totem->bvw), auto_resize);	/* Media device */	item = glade_xml_get_widget (totem->xml, "tpw_device_combo");	mediadev = gconf_client_get_string		(totem->gc, GCONF_PREFIX"/mediadev", NULL);	if (mediadev == NULL || (strcmp (mediadev, "") == 0)			|| (strcmp (mediadev, "auto") == 0))	{		mediadev = g_strdup (bacon_cd_selection_get_default_device				     (BACON_CD_SELECTION (item)));		gconf_client_set_string (totem->gc, GCONF_PREFIX"/mediadev",				mediadev, NULL);	}	bacon_video_widget_set_media_device		(BACON_VIDEO_WIDGET (totem->bvw), mediadev);	g_signal_connect (G_OBJECT (item), "device-changed",			G_CALLBACK (on_combo_entry1_changed), totem);	bacon_cd_selection_set_device (BACON_CD_SELECTION (item), mediadev);	g_free (mediadev);	/* Connection Speed */	connection_speed = bacon_video_widget_get_connection_speed (totem->bvw);	item = glade_xml_get_widget (totem->xml, "tpw_speed_optionmenu");	gtk_option_menu_set_history (GTK_OPTION_MENU (item),			connection_speed);	g_signal_connect (item, "changed",			G_CALLBACK (option_menu_connection_changed), totem);	/* Proprietary plugins */	item = glade_xml_get_widget (totem->xml, "tpw_plugins_button");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_button1_clicked), totem);	path = g_build_path (G_DIR_SEPARATOR_S,			g_get_home_dir (), PROPRIETARY_PLUGINS, NULL);	if (g_file_test (path, G_FILE_TEST_IS_DIR) == FALSE)		mkdir (path, 0775);	bacon_video_widget_set_proprietary_plugins_path (totem->bvw, path);	g_free (path);	/* Enable visuals */	item = glade_xml_get_widget (totem->xml, "tpw_visuals_checkbutton");	show_visuals = gconf_client_get_bool (totem->gc,			GCONF_PREFIX"/show_vfx", NULL);	if (is_local == FALSE && show_visuals != FALSE)		show_visuals = ask_show_visuals (totem);	gtk_toggle_button_set_active		(GTK_TOGGLE_BUTTON (item), show_visuals);	totem_prefs_set_show_visuals (totem, show_visuals, FALSE);	g_signal_connect (G_OBJECT (item), "toggled",			G_CALLBACK (on_checkbutton2_toggled), totem);	/* Visuals list */	list = bacon_video_widget_get_visuals_list (totem->bvw);	menu = gtk_menu_new ();	gtk_widget_show (menu);	visual = gconf_client_get_string (totem->gc,			GCONF_PREFIX"/visual", NULL);	if (visual == NULL || strcmp (visual, "") == 0)		visual = g_strdup ("goom");	i = found = 0;	for (l = list; l != NULL; l = l->next)	{		const char *name = l->data;		item = gtk_menu_item_new_with_label (name);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);		gtk_widget_show (item);		if (strcmp (name, visual) == 0)			found = i;		i++;	}	g_free (visual);	/* Visualisation quality */	i = gconf_client_get_int (totem->gc,			GCONF_PREFIX"/visual_quality", NULL);	bacon_video_widget_set_visuals_quality (totem->bvw, i);	item = glade_xml_get_widget (totem->xml, "tpw_visuals_size_optionmenu");	gtk_option_menu_set_history (GTK_OPTION_MENU (item), i);	g_signal_connect (G_OBJECT (item), "changed",			G_CALLBACK (visual_quality_menu_changed), totem);	item = glade_xml_get_widget (totem->xml, "tpw_visuals_type_optionmenu");	gtk_option_menu_set_menu (GTK_OPTION_MENU (item), menu);	gtk_option_menu_set_history (GTK_OPTION_MENU (item), found);	g_signal_connect (G_OBJECT (item), "changed",			G_CALLBACK (visual_menu_changed), totem);	/* Brightness */	item = glade_xml_get_widget (totem->xml, "tpw_bright_scale");	i = bacon_video_widget_get_video_property (totem->bvw,			BVW_VIDEO_BRIGHTNESS);	gtk_range_set_value (GTK_RANGE (item), (gdouble) i);	g_signal_connect (G_OBJECT (item), "value-changed",			G_CALLBACK (brightness_changed), totem);	/* Contrast */	item = glade_xml_get_widget (totem->xml, "tpw_contrast_scale");	i = bacon_video_widget_get_video_property (totem->bvw,			BVW_VIDEO_CONTRAST);	gtk_range_set_value (GTK_RANGE (item), (gdouble) i);	g_signal_connect (G_OBJECT (item), "value-changed",			G_CALLBACK (contrast_changed), totem);	/* Saturation */	item = glade_xml_get_widget (totem->xml, "tpw_saturation_scale");	i = bacon_video_widget_get_video_property (totem->bvw,			BVW_VIDEO_SATURATION);	gtk_range_set_value (GTK_RANGE (item), (gdouble) i);	g_signal_connect (G_OBJECT (item), "value-changed",			G_CALLBACK (saturation_changed), totem);	/* Hue */	item = glade_xml_get_widget (totem->xml, "tpw_hue_scale");	i = bacon_video_widget_get_video_property (totem->bvw,			BVW_VIDEO_HUE);	gtk_range_set_value (GTK_RANGE (item), (gdouble) i);	g_signal_connect (G_OBJECT (item), "value-changed",			G_CALLBACK (hue_changed), totem);	/* Reset colour balance */	item = glade_xml_get_widget (totem->xml, "tpw_color_reset");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_tpw_color_reset_clicked), totem);	/* Sound output type */	item = glade_xml_get_widget (totem->xml, "tpw_sound_output_optionmenu");	audio_out = bacon_video_widget_get_audio_out_type (totem->bvw);	gtk_option_menu_set_history (GTK_OPTION_MENU (item), audio_out);	g_signal_connect (G_OBJECT (item), "changed",			G_CALLBACK (audio_out_menu_changed), totem);	/* This one is for the deinterlacing menu, not really our dialog	 * but we do it anyway */	item = glade_xml_get_widget (totem->xml, "tmw_deinterlace_menu_item");	deinterlace = gconf_client_get_bool (totem->gc,			GCONF_PREFIX"/deinterlace", NULL);	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),				deinterlace);	bacon_video_widget_set_deinterlacing (totem->bvw, deinterlace);	gconf_client_notify_add (totem->gc, GCONF_PREFIX"/deinterlace",			(GConfClientNotifyFunc) deinterlace_changed_cb,			totem, NULL, NULL);	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_deinterlace1_activate), totem);	/* Always On Top */	item = glade_xml_get_widget (totem->xml, "tmw_always_on_top_menu_item");	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),			gconf_client_get_bool (totem->gc,				GCONF_PREFIX"/window_on_top", NULL));}