add: gtk_widget_add_events (totem->win, GDK_SCROLL_MASK); g_signal_connect (G_OBJECT(totem->win), "scroll_event", G_CALLBACK (on_window_scroll_event), totem);
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, "play_dvd1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_play_dvd1_activate), totem);	item = glade_xml_get_widget (totem->xml, "play_vcd1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_play_vcd1_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, "zoom_1_2");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_zoom_1_2_activate), totem);	item = glade_xml_get_widget (totem->xml, "zoom_1_1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_zoom_1_1_activate), totem);	item = glade_xml_get_widget (totem->xml, "zoom_2_1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_zoom_2_1_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);	item = glade_xml_get_widget (totem->xml, "take_screenshot1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_take_screenshot1_activate), totem);	item = glade_xml_get_widget (totem->xml, "preferences1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_preferences1_activate), totem);	item = glade_xml_get_widget (totem->xml, "properties1");	g_signal_connect (G_OBJECT (item), "activate",			G_CALLBACK (on_properties1_activate), totem);	/* Screenshot dialog */	item = glade_xml_get_widget (totem->xml, "dialog2");	g_signal_connect (G_OBJECT (item), "delete-event",			G_CALLBACK (hide_screenshot), (gpointer) totem);	item = glade_xml_get_widget (totem->xml, "radiobutton1");	g_signal_connect (G_OBJECT (item), "toggled",			G_CALLBACK (on_radiobutton_shot_toggled),			(gpointer) totem);	item = glade_xml_get_widget (totem->xml, "radiobutton2");	g_signal_connect (G_OBJECT (item), "toggled",			G_CALLBACK (on_radiobutton_shot_toggled),			(gpointer) totem);	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), TRUE);	/* 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, "playlist_button");	g_signal_connect (G_OBJECT (item), "drag_data_received",			G_CALLBACK (drop_playlist_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 (main_window_destroy_cb), totem);	g_signal_connect (G_OBJECT (totem->win), "destroy",			G_CALLBACK (main_window_destroy_cb), totem);	/* Motion notify for the Popups */	item = glade_xml_get_widget (totem->xml, "window1");	gtk_widget_add_events (item, GDK_POINTER_MOTION_MASK);	g_signal_connect (G_OBJECT (item), "motion-notify-event",			G_CALLBACK (on_video_motion_notify_event), totem);	item = glade_xml_get_widget (totem->xml, "window2");	gtk_widget_add_events (item, GDK_POINTER_MOTION_MASK);	g_signal_connect (G_OBJECT (item), "motion-notify-event",			G_CALLBACK (on_video_motion_notify_event), 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);	g_signal_connect (G_OBJECT (item), "motion-notify-event",			G_CALLBACK (on_video_motion_notify_event), totem);	/* Control Popup */	g_signal_connect (G_OBJECT (totem->fs_pp_button), "clicked",			G_CALLBACK (on_play_pause_button_clicked), totem);	g_signal_connect (G_OBJECT (totem->fs_pp_button), "clicked",			G_CALLBACK (on_mouse_click_fullscreen), totem);	item = glade_xml_get_widget (totem->xml, "fs_previous_button");	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_previous_button_clicked), totem);	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_mouse_click_fullscreen), totem);	item = glade_xml_get_widget (totem->xml, "fs_next_button");	g_signal_connect (G_OBJECT (item), "clicked", 			G_CALLBACK (on_next_button_clicked), totem);	g_signal_connect (G_OBJECT (item), "clicked",			G_CALLBACK (on_mouse_click_fullscreen), totem);	/* Control Popup Sliders */	g_signal_connect (G_OBJECT(totem->fs_seek), "value-changed",			G_CALLBACK (seek_cb), totem);	g_signal_connect (G_OBJECT(totem->fs_volume), "value-changed",			G_CALLBACK (vol_cb), totem);	/* Connect the keys */	gtk_widget_add_events (totem->win, GDK_KEY_PRESS_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);	/* 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);	/* 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);        /* DVD menu callbacks */        item = glade_xml_get_widget (totem->xml, "dvd_root_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_root_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "dvd_title_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_title_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "dvd_audio_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_audio_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "dvd_audio_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_audio_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "dvd_angle_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_angle_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "dvd_chapter_menu");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_dvd_chapter_menu1_activate), totem);        item = glade_xml_get_widget (totem->xml, "next_chapter1");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_next_button_clicked), totem);        item = glade_xml_get_widget (totem->xml, "previous_chapter1");        g_signal_connect (G_OBJECT (item), "activate",                        G_CALLBACK (on_previous_button_clicked), totem);	/* Update the UI */	gtk_timeout_add (600, update_cb_often, totem);	gtk_timeout_add (1200, update_cb_rare, totem);}