# HG changeset patch # User William Pitcock # Date 1191264157 18000 # Node ID eadc001add028fbbb9aaa04a924a6d6fdc60480a # Parent e82ad057d1db38be05b7cf52c947bf63934a35a6 Remove mainwin_attach_idle_func(), use mainwin_idle_func() only when tristate buttons are triggered. diff -r e82ad057d1db -r eadc001add02 src/audacious/main.c --- a/src/audacious/main.c Mon Oct 01 12:38:51 2007 -0500 +++ b/src/audacious/main.c Mon Oct 01 13:42:37 2007 -0500 @@ -1471,7 +1471,6 @@ hint_set_always(cfg.always_on_top); playlist_start_get_info_thread(); - mainwin_attach_idle_func(); has_x11_connection = TRUE; diff -r e82ad057d1db -r eadc001add02 src/audacious/ui_main.c --- a/src/audacious/ui_main.c Mon Oct 01 12:38:51 2007 -0500 +++ b/src/audacious/ui_main.c Mon Oct 01 13:42:37 2007 -0500 @@ -1292,6 +1292,8 @@ seek_initial_pos = ui_skinned_horizontal_slider_get_position(mainwin_position); seek_state = MAINWIN_SEEK_REV; + mainwin_timeout_id = g_timeout_add(MAINWIN_UPDATE_INTERVAL, + (GSourceFunc) mainwin_idle_func, NULL); } void @@ -1320,14 +1322,20 @@ } seek_state = MAINWIN_SEEK_NIL; + + g_source_remove(mainwin_timeout_id); + mainwin_timeout_id = 0; } void mainwin_fwd_pushed(void) { g_get_current_time(&cb_time); + seek_initial_pos = ui_skinned_horizontal_slider_get_position(mainwin_position); seek_state = MAINWIN_SEEK_FWD; + mainwin_timeout_id = g_timeout_add(MAINWIN_UPDATE_INTERVAL, + (GSourceFunc) mainwin_idle_func, NULL); } void @@ -1356,6 +1364,9 @@ } seek_state = MAINWIN_SEEK_NIL; + + g_source_remove(mainwin_timeout_id); + mainwin_timeout_id = 0; } void @@ -2486,13 +2497,6 @@ mainwin_create_widgets(); } -void -mainwin_attach_idle_func(void) -{ - mainwin_timeout_id = g_timeout_add(MAINWIN_UPDATE_INTERVAL, - mainwin_idle_func, NULL); -} - gboolean mainwin_update_song_info(void) { diff -r e82ad057d1db -r eadc001add02 src/audacious/ui_main.h --- a/src/audacious/ui_main.h Mon Oct 01 12:38:51 2007 -0500 +++ b/src/audacious/ui_main.h Mon Oct 01 13:42:37 2007 -0500 @@ -164,7 +164,6 @@ guint action, GtkWidget * widget); -void mainwin_attach_idle_func(void); gboolean mainwin_update_song_info(void); void mainwin_drag_data_received(GtkWidget * widget, GdkDragContext * context,