mvbar plugin creates too much cpu load

Hi,

the mvbar plugin creates huge cpu load here, it seems that this is due
to unlimited refreshes of the progressbar. Adding a random usleep() to
the loop resolves the problem. I simply chose a random number to test
it, I attach the 'svn diff' anyway.

uwe
Index: plugins/e2p_mvbar.c
===================================================================
--- plugins/e2p_mvbar.c (revision 1343)
+++ plugins/e2p_mvbar.c (working copy)
@@ -365,6 +365,7 @@
                        gtk_progress_bar_set_text (GTK_PROGRESS_BAR 
(wdata->progbar), progresstext);
                        gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR 
(wdata->progbar), fraction);
                        gdk_threads_leave ();
+                       usleep (10000000);
 
                        if (wdata->bflags & E2_BARTASK_PAUSEREQ //pause was 
requested
                                && GTK_IS_DIALOG (wdata->dialog) && 
GTK_WIDGET_VISIBLE (wdata->dialog))

Other related posts: