# HG changeset patch # User Luke Schierer # Date 1044412228 0 # Node ID 5426b09731d6678a1967b395598d5738103d4124 # Parent 78403c4f62dca81b878137c0aeab9d252a9d51cb [gaim-migrate @ 4803] (21:27:28) Robot101: er, saving prefs every pixel you move the blist is very stupid. essentially, this behavior is so stupid as to amount to being a bug in and of itself even though we cannot _prove_ it does any harm. committer: Tailor Script diff -r 78403c4f62dc -r 5426b09731d6 src/buddy.c --- a/src/buddy.c Wed Feb 05 00:52:02 2003 +0000 +++ b/src/buddy.c Wed Feb 05 02:30:28 2003 +0000 @@ -2316,6 +2316,11 @@ } } +static gboolean delayed_save_prefs(gpointer data) { + save_prefs(); + return FALSE; +} + static gboolean configure_blist_window(GtkWidget *w, GdkEventConfigure *event, gpointer data) { /* unfortunately GdkEventConfigure ignores the window gravity, but * * the only way we have of setting the position doesn't. we have to * @@ -2337,9 +2342,14 @@ blist_pos.y = y; blist_pos.width = event->width; blist_pos.height = event->height; - save_prefs(); + + if (!g_main_context_find_source_by_user_data(NULL, &delayed_save_prefs)) { + debug_printf("queueing save of blist prefs\n"); + g_timeout_add(5000, delayed_save_prefs, &delayed_save_prefs); + } } } + return FALSE; }