rem: g_signal_connect (G_OBJECT (totem->win), "delete_event", G_CALLBACK (action_exit), totem); g_signal_connect (G_OBJECT (totem->win), "destroy_event", G_CALLBACK (action_exit), totem);
add: g_signal_connect (G_OBJECT (totem->win), "delete-event", G_CALLBACK (main_window_destroy_cb), totem); g_signal_connect (G_OBJECT (totem->win), "destroy", G_CALLBACK (main_window_destroy_cb), totem); g_object_add_weak_pointer (G_OBJECT (totem->win), (void**)&(totem->win));
context: totem_callback_connect (Totem *totem){	GtkWidget *item;	/* Menu items */	item = glade_xml_get_widget (totem->xml, "open1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_open1_activate), totem);	item = glade_xml_get_widget (totem->xml, "play1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_play1_activate), totem);	item = glade_xml_get_widget (totem->xml, "fullscreen1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_full_screen1_activate), totem);	item = glade_xml_get_widget (totem->xml, "toggle_aspect_ratio1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_toggle_aspect_ratio1_activate),			totem);	item = glade_xml_get_widget (totem->xml, "show_playlist1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_show_playlist1_activate), totem);	item = glade_xml_get_widget (totem->xml, "quit1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_quit1_activate), totem);	item = glade_xml_get_widget (totem->xml, "about1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_about1_activate), totem);	/* Controls */	totem->pp_button = glade_xml_get_widget		(totem->xml, "play_pause_button");	g_signal_connect (G_OBJECT (totem->pp_button), "clicked",			G_CALLBACK (on_play_pause_button_clicked), totem);	item = glade_xml_get_widget (totem->xml, "previous_button");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_previous_button_clicked), totem);	item = glade_xml_get_widget (totem->xml, "next_button");	g_signal_connect (G_OBJECT (item), "clicked", 			G_CALLBACK (on_next_button_clicked), totem);	item = glade_xml_get_widget (totem->xml, "playlist_button");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_playlist_button_toggled), totem);	/* Drag'n'Drop */	item = glade_xml_get_widget (totem->xml, "frame1");	g_signal_connect (G_OBJECT (item), "drag_data_received",			G_CALLBACK (drop_cb), totem);	gtk_drag_dest_set (item, GTK_DEST_DEFAULT_ALL,			target_table, 1, GDK_ACTION_COPY);	/* Exit */	g_signal_connect (G_OBJECT (totem->win), "delete_event",			G_CALLBACK (action_exit), totem);	g_signal_connect (G_OBJECT (totem->win), "destroy_event",			G_CALLBACK (action_exit), totem);	/* Popup */	item = glade_xml_get_widget (totem->xml, "fs_exit1");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_fs_exit1_activate), totem);	/* Connect the keys */	gtk_widget_add_events (totem->win, GDK_KEY_RELEASE_MASK);	g_signal_connect (G_OBJECT(totem->win), "key_press_event",			G_CALLBACK(on_window_key_press_event), totem);	/* Sliders */	g_signal_connect (G_OBJECT (totem->seek), "value-changed",			G_CALLBACK (seek_cb), totem);	g_signal_connect (G_OBJECT (totem->volume), "value-changed",			G_CALLBACK (vol_cb), totem);	gtk_timeout_add (500, update_sliders_cb, totem);	/* Playlist Disappearance, woop woop */	g_signal_connect (G_OBJECT (totem->playlist),			"response", G_CALLBACK (toggle_playlist_from_playlist),			(gpointer) totem);	g_signal_connect (G_OBJECT (totem->playlist),			"delete-event",			G_CALLBACK (toggle_playlist_from_playlist),			(gpointer) totem);	g_object_add_weak_pointer (G_OBJECT (totem->playlist),			(void**)&(totem->playlist));	/* Playlist */	g_signal_connect (G_OBJECT (totem->playlist),			"changed", G_CALLBACK (playlist_changed_cb),			(gpointer) totem);	g_signal_connect (G_OBJECT (totem->playlist),			"current-removed", G_CALLBACK (current_removed_cb),			(gpointer) totem);}