# HG changeset patch # User Tomasz Mon # Date 1200425707 -3600 # Node ID 146381a317df953ef618ce6f868a0b6545e7f7c5 # Parent d7c321957be8ebf63f8c0b3f6ab597f29c632868 stop plugin when user starts to type new details into configuration window, and start it when he finishes diff -r d7c321957be8 -r 146381a317df src/scrobbler/configure.c --- a/src/scrobbler/configure.c Tue Jan 15 20:26:27 2008 +0100 +++ b/src/scrobbler/configure.c Tue Jan 15 20:35:07 2008 +0100 @@ -25,6 +25,7 @@ GtkWidget *entry1, *entry2, *ge_entry1, *ge_entry2, *cfgdlg; guint apply_timeout = 0; /* ID of timeout to save new config */ +gboolean running = TRUE; /* if plugin threads are running */ static char *hexify(char *pass, int len) { @@ -82,14 +83,19 @@ } apply_timeout = 0; - stop(); start(); + running = TRUE; return FALSE; } static void entry_changed(GtkWidget *widget, gpointer data) { + if (running) { + stop(); + running = FALSE; + } + if (apply_timeout) g_source_remove(apply_timeout);