summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-progress-info.c
diff options
context:
space:
mode:
authoremanuele-f <[email protected]>2016-06-11 21:05:20 +0200
committerlukefromdc <[email protected]>2016-10-17 14:05:35 -0400
commita7666d0dbe10b0ea5210b8133ead48da0ebc0b0e (patch)
treed5a93951c01f4f0376f7d524dacd04fe93b5d0ea /libcaja-private/caja-progress-info.c
parent402392c68e3d55bb0ebb400557796cde563ad452 (diff)
downloadcaja-a7666d0dbe10b0ea5210b8133ead48da0ebc0b0e.tar.bz2
caja-a7666d0dbe10b0ea5210b8133ead48da0ebc0b0e.tar.xz
extend to all the operations
Diffstat (limited to 'libcaja-private/caja-progress-info.c')
-rw-r--r--libcaja-private/caja-progress-info.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c
index c8010a71..8b0aeb43 100644
--- a/libcaja-private/caja-progress-info.c
+++ b/libcaja-private/caja-progress-info.c
@@ -744,10 +744,10 @@ progress_widget_new (CajaProgressInfo *info)
{
ProgressWidgetData *data;
GtkWidget *label, *progress_bar, *hbox, *vbox, *box, *btcancel, *imgcancel;
- GtkWidget *container;
data = g_new0 (ProgressWidgetData, 1);
data->info = g_object_ref (info);
+ data->state = STATE_INITIALIZED;
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_set_spacing (GTK_BOX (vbox), 5);
@@ -830,16 +830,6 @@ progress_widget_new (CajaProgressInfo *info)
data->details = GTK_LABEL (label);
gtk_widget_show_all (data->widget);
-
- // TODO make different policies
- data->state = STATE_INITIALIZED;
- container = get_widgets_container();
- if (container != NULL) {
- if (get_running_operations (container) > 0)
- widget_state_transit_to (data, STATE_QUEUED);
- else
- widget_state_transit_to (data, STATE_RUNNING);
- }
update_data (data);
update_progress (data);
@@ -861,7 +851,7 @@ progress_widget_new (CajaProgressInfo *info)
static void
handle_new_progress_info (CajaProgressInfo *info)
{
- GtkWidget *window, *progress;
+ GtkWidget *window, *progress, *container;;
window = get_progress_window (TRUE);
@@ -873,6 +863,16 @@ handle_new_progress_info (CajaProgressInfo *info)
gtk_window_present (GTK_WINDOW (window));
n_progress_ops++;
+
+ // TODO use different policies
+ container = get_widgets_container();
+ if (container != NULL) {
+ if (get_running_operations (container) > 0)
+ widget_state_transit_to (info->widget, STATE_QUEUED);
+ else
+ widget_state_transit_to (info->widget, STATE_RUNNING);
+ }
+
update_status_icon_and_window ();
}