diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtkext/gtkstatusstack.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gtkext/gtkstatusstack.c b/src/gtkext/gtkstatusstack.c index dba5145..586e722 100644 --- a/src/gtkext/gtkstatusstack.c +++ b/src/gtkext/gtkstatusstack.c @@ -158,6 +158,9 @@ struct _progress_info }; +#define PROGRESS_SIZE 200 + + /* Supprime l'empreinte mémoire d'informations d'activité. */ static void reset_progress_info(progress_info *); @@ -809,7 +812,7 @@ static GtkWidget *build_progress_status_stack(GtkStatusStack *stack) progress = gtk_progress_bar_new(); g_object_set_data(ref, "progress", progress); - gtk_widget_set_size_request(progress, 200, -1); + gtk_widget_set_size_request(progress, PROGRESS_SIZE, -1); gtk_widget_set_valign(progress, GTK_ALIGN_CENTER); gtk_widget_show(progress); gtk_box_pack_start(GTK_BOX(result), progress, FALSE, TRUE, 8); @@ -1025,8 +1028,10 @@ void gtk_status_stack_update_activity_value(GtkStatusStack *stack, activity_id_t /* On n'actualise que le sommet de la pile */ - if ((i + 1) == info->count && (new - status->last_updated) > 0.1) + if ((i + 1) == info->count && (new - status->last_updated) > (1.0 / PROGRESS_SIZE)) { + status->last_updated = new; + if (info->tag != 0) g_source_remove(info->tag); |