GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dialog-progress.c
1 /********************************************************************\
2  * dialog-progress.c -- GnuCash progress dialog *
3  * Copyright (C) 2000 Dave Peticolas *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21  * *
22 \********************************************************************/
23 
24 #include "config.h"
25 
26 #include <gtk/gtk.h>
27 #include <glib/gi18n.h>
28 #include <libguile.h>
29 #include "guile-mappings.h"
30 
31 #include "dialog-progress.h"
32 #include "dialog-utils.h"
33 
34 
36 {
37  GtkWidget *dialog;
38 
39  GtkWidget *primary_label;
40  GtkWidget *secondary_label;
41  GtkWidget *progress_bar;
42  GtkWidget *sub_label;
43  GtkWidget *log;
44 
45  GtkWidget *ok_button;
46  GtkWidget *cancel_button;
47 
48  /* The stack of virtual progress bars. */
49  GList *bars;
50  /* The fraction of the current bar that is filled. */
51  gdouble bar_value;
52  /* The value of the real (top-level) bar before the last push. */
53  gdouble total_offset;
54  /* The product of all weights in the stack. */
55  gdouble total_weight;
56 
57  GNCProgressCancelFunc cancel_func;
58  gpointer user_data;
59 
60  SCM cancel_scm_func;
61 
62  gboolean use_ok_button;
63  gboolean closed;
64  gboolean finished;
65  gboolean destroyed;
66  gboolean title_set;
67 };
68 
69 typedef struct
70 {
71  gdouble offset;
72  gdouble weight;
73 } VirtualBar;
74 
75 static void
76 gnc_progress_maybe_destroy(GNCProgressDialog *progress)
77 {
78  g_return_if_fail(progress);
79 
80  if (!(progress->closed && progress->destroyed))
81  return;
82 
83  if (progress->dialog != NULL)
84  gtk_widget_destroy(progress->dialog);
85 }
86 
87 
88 static void
89 ok_cb(GtkWidget * widget, gpointer data)
90 {
91  GNCProgressDialog *progress = data;
92 
93  g_return_if_fail(progress);
94 
95  if (progress->dialog != NULL)
96  gtk_widget_hide(progress->dialog);
97  progress->closed = TRUE;
98  gnc_progress_maybe_destroy(progress);
99 }
100 
101 
102 static void
103 cancel_cb(GtkWidget * widget, gpointer data)
104 {
105  GNCProgressDialog *progress = data;
106 
107  g_return_if_fail(progress);
108 
109  if (progress->cancel_func && !progress->cancel_func(progress->user_data))
110  return;
111 
112  if (progress->cancel_scm_func != SCM_UNDEFINED)
113  {
114  SCM result;
115 
116  result = scm_call_0(progress->cancel_scm_func);
117 
118  if (!scm_is_true(result))
119  return;
120  }
121 
122  if (progress->dialog != NULL)
123  gtk_widget_hide(progress->dialog);
124  progress->closed = TRUE;
125  gnc_progress_maybe_destroy(progress);
126 }
127 
128 
129 static gboolean
130 delete_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
131 {
132  GNCProgressDialog *progress = data;
133 
134  g_return_val_if_fail(progress, TRUE);
135 
136  if (progress->finished)
137  {
138  if (progress->dialog != NULL)
139  gtk_widget_hide(progress->dialog);
140  progress->closed = TRUE;
141  gnc_progress_maybe_destroy(progress);
142  return TRUE;
143  }
144 
145  if (progress->cancel_func)
146  {
147  if (progress->cancel_func(progress->user_data))
148  {
149  if (progress->dialog != NULL)
150  gtk_widget_hide(progress->dialog);
151  progress->closed = TRUE;
152  gnc_progress_maybe_destroy(progress);
153  return TRUE;
154  }
155  }
156 
157  if (progress->cancel_scm_func != SCM_UNDEFINED)
158  {
159  SCM result;
160 
161  result = scm_call_0(progress->cancel_scm_func);
162 
163  if (scm_is_true(result))
164  {
165  if (progress->dialog != NULL)
166  gtk_widget_hide(progress->dialog);
167  progress->closed = TRUE;
168  gnc_progress_maybe_destroy(progress);
169  return TRUE;
170  }
171  }
172 
173  /* Don't delete the window, wait for gnc_progress_dialog_destroy. */
174  return TRUE;
175 }
176 
177 
178 static void
179 destroy_cb(GtkObject *object, gpointer data)
180 {
181  GNCProgressDialog *progress = data;
182 
183  g_return_if_fail(progress);
184 
185  /* Make sure the callbacks aren't invoked */
186  progress->cancel_func = NULL;
187  if (progress->cancel_scm_func != SCM_UNDEFINED)
188  scm_gc_unprotect_object(progress->cancel_scm_func);
189  progress->cancel_scm_func = SCM_UNDEFINED;
190 
191  g_free(progress);
192 }
193 
194 
195 static void
196 gnc_progress_dialog_create(GtkWidget * parent, GNCProgressDialog *progress)
197 {
198  GtkWidget *dialog;
199  GtkObject *tdo;
200  GtkBuilder *builder;
201 
202  g_return_if_fail(progress);
203 
204  builder = gtk_builder_new();
205  gnc_builder_add_from_file (builder, "dialog-progress.glade", "Progress Dialog");
206 
207 
208  dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Progress Dialog"));
209  progress->dialog = dialog;
210  tdo = GTK_OBJECT(dialog);
211 
212  /* parent */
213  if (parent != NULL)
214  gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(parent));
215 
216  g_signal_connect(tdo, "delete_event", G_CALLBACK(delete_cb), progress);
217 
218  g_signal_connect(tdo, "destroy", G_CALLBACK(destroy_cb), progress);
219 
220  progress->primary_label = GTK_WIDGET(gtk_builder_get_object (builder, "primary_label"));
221  gtk_widget_hide(progress->primary_label);
222 
223  progress->secondary_label = GTK_WIDGET(gtk_builder_get_object (builder, "secondary_label"));
224  gtk_widget_hide(progress->secondary_label);
225 
226  progress->progress_bar = GTK_WIDGET(gtk_builder_get_object (builder, "progress_bar"));
227  progress->total_offset = 0;
228  progress->total_weight = 1;
229  progress->bar_value = 0;
230 
231  progress->sub_label = GTK_WIDGET(gtk_builder_get_object (builder, "sub_label"));
232  gtk_widget_hide(progress->sub_label);
233 
234  progress->log = GTK_WIDGET(gtk_builder_get_object (builder, "progress_log"));
235  gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object (builder, "progress_log_window")));
236 
237  progress->ok_button = GTK_WIDGET(gtk_builder_get_object (builder, "ok_button"));
238 
239  g_signal_connect(progress->ok_button, "clicked",
240  G_CALLBACK(ok_cb), progress);
241 
242  if (!progress->use_ok_button)
243  gtk_widget_hide(progress->ok_button);
244 
245  progress->cancel_button = GTK_WIDGET(gtk_builder_get_object (builder, "cancel_button"));
246 
247  g_signal_connect(progress->cancel_button, "clicked",
248  G_CALLBACK(cancel_cb), progress);
249 
250  progress->cancel_func = NULL;
251  progress->user_data = NULL;
252 
253  progress->cancel_scm_func = SCM_UNDEFINED;
254 
255  progress->closed = FALSE;
256  progress->finished = FALSE;
257  progress->destroyed = FALSE;
258  progress->title_set = FALSE;
259 
260  gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, progress);
261  g_object_unref(G_OBJECT(builder));
262 }
263 
264 
266 gnc_progress_dialog_new(GtkWidget * parent, gboolean use_ok_button)
267 {
268  GNCProgressDialog *progress;
269 
270  progress = g_new0(GNCProgressDialog, 1);
271 
272  progress->use_ok_button = use_ok_button;
273 
274  gnc_progress_dialog_create(parent, progress);
275 
276  gtk_widget_show(progress->dialog);
277 
278  gnc_progress_dialog_update(progress);
279 
280  return progress;
281 }
282 
283 
285 gnc_progress_dialog_custom(GtkLabel *primary,
286  GtkLabel *secondary,
287  GtkProgressBar *bar,
288  GtkLabel *suboperation,
289  GtkTextView *log)
290 {
291  GNCProgressDialog *progress;
292 
293  progress = g_new0(GNCProgressDialog, 1);
294 
295  /* Set up widgets. */
296  progress->dialog = NULL;
297  progress->primary_label = GTK_WIDGET(primary);
298  progress->secondary_label = GTK_WIDGET(secondary);
299  progress->progress_bar = GTK_WIDGET(bar);
300  progress->sub_label = GTK_WIDGET(suboperation);
301  progress->log = GTK_WIDGET(log);
302  progress->ok_button = NULL;
303  progress->cancel_button = NULL;
304 
305  /* Initialize all other items. */
306  progress->total_offset = 0;
307  progress->total_weight = 1;
308  progress->bar_value = 0;
309  progress->cancel_func = NULL;
310  progress->user_data = NULL;
311  progress->cancel_scm_func = SCM_UNDEFINED;
312  progress->use_ok_button = FALSE;
313  progress->closed = FALSE;
314  progress->finished = FALSE;
315  progress->destroyed = FALSE;
316  progress->title_set = FALSE;
317 
318  return progress;
319 }
320 
321 
322 void
324 {
325  g_return_if_fail(progress);
326 
327  if (!progress->dialog)
328  return;
329 
330  if (title == NULL)
331  title = "";
332 
333  gtk_window_set_title(GTK_WINDOW(progress->dialog), title);
334 
335  progress->title_set = TRUE;
336 
337  gnc_progress_dialog_update(progress);
338 }
339 
340 
341 void
343  const gchar *str)
344 {
345  g_return_if_fail(progress);
346 
347  if (progress->primary_label == NULL)
348  return;
349 
350  if (str == NULL || *str == '\0')
351  gtk_widget_hide(progress->primary_label);
352  else
353  {
354  /* Display the primary text with the HIG-recommended style. */
355  char *markup = g_markup_printf_escaped("<span weight=\"bold\" size=\"larger\">%s</span>", str);
356 
357  gtk_label_set_markup(GTK_LABEL(progress->primary_label), markup);
358  g_free(markup);
359  gtk_widget_show(progress->primary_label);
360  }
361 
362  gnc_progress_dialog_update(progress);
363 }
364 
365 
366 void
368  const char *heading)
369 {
370  g_return_if_fail(progress);
371 
372  if (progress->primary_label == NULL)
373  return;
374 
375  if (heading == NULL || *heading == '\0')
376  gtk_widget_hide(progress->primary_label);
377  else
378  {
379  gtk_label_set_text(GTK_LABEL(progress->primary_label), heading);
380  gtk_widget_show(progress->primary_label);
381  }
382 
383  gnc_progress_dialog_update(progress);
384 }
385 
386 
387 void
389  const gchar *str)
390 {
391  g_return_if_fail(progress);
392 
393  if (progress->secondary_label == NULL)
394  return;
395 
396  if (str == NULL || *str == '\0')
397  gtk_widget_hide(progress->secondary_label);
398  else
399  {
400  gtk_label_set_text(GTK_LABEL(progress->secondary_label), str);
401  gtk_widget_show(progress->secondary_label);
402  }
403 
404  gnc_progress_dialog_update(progress);
405 }
406 
407 
408 void
410  const gchar *str)
411 {
412  g_return_if_fail(progress);
413 
414  if (progress->sub_label == NULL)
415  return;
416 
417  if (str == NULL || *str == '\0')
418  gtk_widget_hide(progress->sub_label);
419  else
420  {
421  /* Display the suboperation text with the HIG-recommended style. */
422  char *markup = g_markup_printf_escaped("<span style=\"italic\">%s</span>", str);
423 
424  gtk_label_set_markup(GTK_LABEL(progress->sub_label), markup);
425  g_free(markup);
426  gtk_widget_show(progress->sub_label);
427  }
428 
429  gnc_progress_dialog_update(progress);
430 }
431 
432 
433 void
435 {
436  GtkTextBuffer *buf;
437 
438  g_return_if_fail(progress);
439 
440  if (progress->log == NULL)
441  return;
442 
443  /* Reset the text buffer. */
444  buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(progress->log));
445  gtk_text_buffer_set_text(buf, "", -1);
446  gtk_text_buffer_set_modified(buf, FALSE);
447 
448  /* Show the log and its parent (in case it is in a scrolled window). */
449  gtk_widget_show(progress->log);
450  gtk_widget_show(gtk_widget_get_parent(progress->log));
451 
452  gnc_progress_dialog_update(progress);
453 }
454 
455 
456 void
458 {
459  GtkTextBuffer *buf;
460  GtkTextIter iter;
461 
462  g_return_if_fail(progress);
463 
464  if (progress->log == NULL || !str || !*str)
465  return;
466 
467  /* Append to the text buffer. */
468  buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(progress->log));
469  gtk_text_buffer_get_end_iter(buf, &iter);
470  gtk_text_buffer_insert(buf, &iter, str, -1);
471 
472  gnc_progress_dialog_update(progress);
473 }
474 
475 
476 void
478 {
479  gchar *suffix;
480 
481  g_return_if_fail(progress);
482 
483  suffix = g_strconcat(" ", _("(paused)"), NULL);
484 
485  if (progress->sub_label && gtk_widget_get_visible(progress->sub_label))
486  {
487  const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->sub_label));
488 
489  if (txt && !g_str_has_suffix(txt, suffix))
490  {
491  gchar *newtxt = g_strconcat(txt, suffix, NULL);
492  gnc_progress_dialog_set_sub(progress, newtxt);
493  g_free(newtxt);
494  }
495  }
496  else if (progress->dialog)
497  {
498  const gchar *txt = gtk_window_get_title(GTK_WINDOW(progress->dialog));
499 
500  if (txt && !g_str_has_suffix(txt, suffix))
501  {
502  gchar *newtxt = g_strconcat(txt, suffix, NULL);
503  gtk_window_set_title(GTK_WINDOW(progress->dialog), newtxt);
504  g_free(newtxt);
505  }
506  }
507  else if (progress->primary_label &&
508  gtk_widget_get_visible(progress->primary_label))
509  {
510  const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->primary_label));
511 
512  if (txt && !g_str_has_suffix(txt, suffix))
513  {
514  gchar *newtxt = g_strconcat(txt, suffix, NULL);
515  gnc_progress_dialog_set_primary(progress, newtxt);
516  g_free(newtxt);
517  }
518  }
519 
520  g_free(suffix);
521 
522  gnc_progress_dialog_update(progress);
523 }
524 
525 void
527 {
528  gchar *suffix;
529 
530  g_return_if_fail(progress);
531 
532  suffix = g_strconcat(" ", _("(paused)"), NULL);
533 
534  /* Remove any pause indication from the suboperation label. */
535  if (progress->sub_label)
536  {
537  const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->sub_label));
538 
539  if (txt && g_str_has_suffix(txt, suffix))
540  {
541  gchar *newtxt = g_strndup(txt, strlen(txt) - strlen(suffix));
542  gnc_progress_dialog_set_sub(progress, newtxt);
543  g_free(newtxt);
544  }
545  }
546 
547  /* Remove any pause indication from the window title. */
548  if (progress->dialog)
549  {
550  const gchar *txt = gtk_window_get_title(GTK_WINDOW(progress->dialog));
551 
552  if (txt && g_str_has_suffix(txt, suffix))
553  {
554  gchar *newtxt = g_strndup(txt, strlen(txt) - strlen(suffix));
555  gtk_window_set_title(GTK_WINDOW(progress->dialog), newtxt);
556  g_free(newtxt);
557  }
558  }
559 
560  /* Remove any pause indication from the primary text. */
561  if (progress->primary_label)
562  {
563  const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->primary_label));
564 
565  if (txt && g_str_has_suffix(txt, suffix))
566  {
567  gchar *newtxt = g_strndup(txt, strlen(txt) - strlen(suffix));
568  gnc_progress_dialog_set_primary(progress, newtxt);
569  g_free(newtxt);
570  }
571  }
572 
573  g_free(suffix);
574 
575  gnc_progress_dialog_update(progress);
576 }
577 
578 
579 void
581  GNCProgressCancelFunc cancel_func,
582  gpointer user_data)
583 {
584  g_return_if_fail(progress);
585 
586  if (progress->cancel_button == NULL)
587  return;
588 
589  progress->cancel_func = cancel_func;
590  progress->user_data = user_data;
591 
592  if (cancel_func)
593  gtk_widget_show(progress->cancel_button);
594 }
595 
596 
597 void
599  SCM cancel_scm_func)
600 {
601  g_return_if_fail(progress);
602 
603  if (progress->cancel_button == NULL)
604  return;
605 
606  if (progress->cancel_scm_func != SCM_UNDEFINED)
607  scm_gc_unprotect_object(progress->cancel_scm_func);
608 
609  if (scm_is_procedure(cancel_scm_func))
610  {
611  progress->cancel_scm_func = cancel_scm_func;
612  scm_gc_protect_object(cancel_scm_func);
613  gtk_widget_show(progress->cancel_button);
614  }
615  else
616  progress->cancel_scm_func = SCM_UNDEFINED;
617 }
618 
619 
620 void
622 {
623  GtkProgressBar *bar;
624 
625  g_return_if_fail(progress);
626 
627  /* Get the progress bar widget. */
628  bar = GTK_PROGRESS_BAR(progress->progress_bar);
629  if (bar == NULL)
630  return;
631 
632  /* Update the progress bar. If value is over 1,
633  * the bar will pulse instead of fill. */
634  if (value > 1)
635  gtk_progress_bar_pulse(bar);
636  else
637  {
638  progress->bar_value = value > 0 ? value : 0;
639  gtk_progress_bar_set_fraction(bar,
640  progress->total_offset + progress->bar_value * progress->total_weight);
641  }
642 
643  gnc_progress_dialog_update(progress);
644 }
645 
646 
647 guint
648 gnc_progress_dialog_push(GNCProgressDialog *progress, gdouble weight)
649 {
650  GtkProgressBar *bar;
651  VirtualBar *newbar;
652 
653  g_return_val_if_fail(progress, 0);
654  g_return_val_if_fail(weight > 0, 0);
655 
656  /* Get the progress bar widget. */
657  bar = GTK_PROGRESS_BAR(progress->progress_bar);
658  if (bar == NULL)
659  return 0;
660 
661  /* Create the new virtual progress bar. */
662  newbar = g_new0(VirtualBar, 1);
663  newbar->offset = progress->bar_value;
664  if (newbar->offset + weight > 1)
665  /* The requested weight is more than the unfilled portion of the bar. */
666  newbar->weight = 1 - newbar->offset;
667  else
668  newbar->weight = weight;
669  progress->bars = g_list_prepend(progress->bars, newbar);
670 
671  /* Set the total effective offset and weight */
672  progress->total_offset = gtk_progress_bar_get_fraction(bar);
673  progress->total_weight *= newbar->weight;
674 
675  /* Set the new bar as unfilled. */
676  progress->bar_value = 0;
677 
678  return g_list_length(progress->bars);
679 }
680 
681 
682 guint
684 {
685  VirtualBar *bar;
686 
687  g_return_val_if_fail(progress, 0);
688 
689  /* Get the progress bar widget. */
690  if (progress->progress_bar == NULL || progress->bars == NULL)
691  return 0;
692 
693  /* Pop the bar off the bar stack. */
694  bar = progress->bars->data;
695  progress->bars = g_list_delete_link(progress->bars, progress->bars);
696 
697  /* Determine the value of the current bar. */
698  progress->bar_value = bar->offset + bar->weight * progress->bar_value;
699 
700  /* Set the total effective offset and weight. */
701  if (progress->bars == NULL)
702  {
703  progress->total_offset = 0;
704  progress->total_weight = 1;
705  }
706  else
707  {
708  progress->total_offset -= bar->offset *
709  ((VirtualBar *) progress->bars->data)->weight;
710  progress->total_weight /= bar->weight;
711  }
712  g_free(bar);
713 
714  if (progress->bars == NULL)
715  return 0;
716  return g_list_length(progress->bars);
717 }
718 
719 
720 guint
722 {
723  gnc_progress_dialog_set_value(progress, 1);
724  return gnc_progress_dialog_pop(progress);
725 }
726 
727 
728 void
730 {
731  g_return_if_fail(progress);
732 
733  /* Return to the top level. */
734  while (gnc_progress_dialog_pop(progress));
735 
736  /* Reset the bar to empty. */
737  gnc_progress_dialog_set_value(progress, 0);
738 }
739 
740 
741 void
743 {
744  while (gtk_events_pending())
745  gtk_main_iteration();
746 }
747 
748 
749 void
751 {
752  g_return_if_fail(progress);
753 
754  if (!progress->use_ok_button)
755  {
756  if (progress->dialog != NULL)
757  gtk_widget_hide(progress->dialog);
758  progress->closed = TRUE;
759  }
760 
761  gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress->progress_bar), 1.0);
762 
763  gtk_widget_set_sensitive(progress->ok_button, TRUE);
764  gtk_widget_set_sensitive(progress->cancel_button, FALSE);
765 
766  if (gtk_widget_get_visible(progress->primary_label))
767  gnc_progress_dialog_set_heading(progress, _("Complete"));
768 
769  if (!progress->title_set)
770  gtk_window_set_title(GTK_WINDOW(progress->dialog), _("Complete"));
771 
772  gtk_window_set_modal(GTK_WINDOW(progress->dialog), FALSE);
773 
774  progress->finished = TRUE;
775 
776  gnc_progress_dialog_update(progress);
777 }
778 
779 
780 void
782 {
783  g_return_if_fail(progress);
784 
785  /* Make sure the callbacks aren't invoked */
786  progress->cancel_func = NULL;
787  if (progress->cancel_scm_func != SCM_UNDEFINED)
788  scm_gc_unprotect_object(progress->cancel_scm_func);
789  progress->cancel_scm_func = SCM_UNDEFINED;
790 
791  if (!progress->finished)
792  {
793  if (progress->dialog != NULL)
794  gtk_widget_hide(progress->dialog);
795  progress->closed = TRUE;
796  }
797 
798  progress->destroyed = TRUE;
799 
800  gnc_progress_maybe_destroy(progress);
801 }
void gnc_progress_dialog_set_heading(GNCProgressDialog *progress, const char *heading)
void gnc_progress_dialog_set_secondary(GNCProgressDialog *progress, const gchar *str)
void gnc_progress_dialog_append_log(GNCProgressDialog *progress, const gchar *str)
void gnc_progress_dialog_destroy(GNCProgressDialog *progress)
void gnc_progress_dialog_set_value(GNCProgressDialog *progress, gdouble value)
API for displaying progress of long-running operations.
void gnc_progress_dialog_reset_value(GNCProgressDialog *progress)
void gnc_progress_dialog_set_cancel_func(GNCProgressDialog *progress, GNCProgressCancelFunc cancel_func, gpointer user_data)
GNCProgressDialog * gnc_progress_dialog_custom(GtkLabel *primary, GtkLabel *secondary, GtkProgressBar *bar, GtkLabel *suboperation, GtkTextView *log)
GNCProgressDialog * gnc_progress_dialog_new(GtkWidget *parent, gboolean use_ok_button)
void gnc_progress_dialog_set_sub(GNCProgressDialog *progress, const gchar *str)
void gnc_progress_dialog_finish(GNCProgressDialog *progress)
void gnc_progress_dialog_pause(GNCProgressDialog *progress)
void gnc_progress_dialog_reset_log(GNCProgressDialog *progress)
void gnc_progress_dialog_set_primary(GNCProgressDialog *progress, const gchar *str)
void gnc_progress_dialog_resume(GNCProgressDialog *progress)
guint gnc_progress_dialog_pop_full(GNCProgressDialog *progress)
guint gnc_progress_dialog_pop(GNCProgressDialog *progress)
void gnc_progress_dialog_update(GNCProgressDialog *progress)
guint gnc_progress_dialog_push(GNCProgressDialog *progress, gdouble weight)
void gnc_progress_dialog_set_title(GNCProgressDialog *progress, const char *title)
void gnc_progress_dialog_set_cancel_scm_func(GNCProgressDialog *progress, SCM cancel_scm_func)