-
- /* Set progress */
- if (total != 0)
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progress_bar),
- (gdouble)done/(gdouble)total);
- else
+
+ priv->count++;
+
+ /* Set progress. Tinymail sometimes returns us 1/100 when it
+ does not have any clue, NOTE that 1/100 could be also a
+ valid progress (we will loose it), but it will be recovered
+ once the done is greater than 1 */
+ determined = (done > 0 && total > 1) &&
+ !(done == 1 && total == 100);
+/* if ((done == 0 && total == 0) || */
+/* (done == 1 && total == 100)) { */
+ if (!determined) {
+/* gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (priv->progress_bar), /\* Deprecated *\/ */
+/* GTK_PROGRESS_CONTINUOUS); */