summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-progress-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnautilus-private/nautilus-progress-info.c')
-rw-r--r--libnautilus-private/nautilus-progress-info.c126
1 files changed, 64 insertions, 62 deletions
diff --git a/libnautilus-private/nautilus-progress-info.c b/libnautilus-private/nautilus-progress-info.c
index b95686647..ef8cd802d 100644
--- a/libnautilus-private/nautilus-progress-info.c
+++ b/libnautilus-private/nautilus-progress-info.c
@@ -217,7 +217,8 @@ get_progress_window (void)
progress_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_resizable (GTK_WINDOW (progress_window),
FALSE);
-
+ gtk_container_set_border_width (GTK_CONTAINER (progress_window), 10);
+
gtk_window_set_title (GTK_WINDOW (progress_window),
_("File Operations"));
gtk_window_set_wmclass (GTK_WINDOW (progress_window),
@@ -228,13 +229,16 @@ get_progress_window (void)
"system-file-manager");
vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_widget_show (vbox);
-
+ gtk_box_set_spacing (GTK_BOX (vbox), 5);
+
gtk_container_add (GTK_CONTAINER (progress_window),
vbox);
- g_signal_connect (progress_window, "delete_event", (GCallback)delete_event, NULL);
+ gtk_widget_show_all (progress_window);
+
+ g_signal_connect (progress_window,
+ "delete_event",
+ (GCallback)delete_event, NULL);
status_icon = gtk_status_icon_new_from_icon_name ("system-file-manager");
g_signal_connect (status_icon, "activate",
@@ -334,87 +338,85 @@ static GtkWidget *
progress_widget_new (NautilusProgressInfo *info)
{
ProgressWidgetData *data;
- GtkWidget *label, *bar, *hbox, *vbox, *button, *image;
+ GtkWidget *label, *progress_bar, *hbox, *vbox, *box, *button, *image;
data = g_new0 (ProgressWidgetData, 1);
data->info = g_object_ref (info);
- hbox = gtk_hbox_new (FALSE, 0);
- data->widget = hbox;
- g_object_set_data_full (G_OBJECT (data->widget),
- "data", data, (GDestroyNotify)progress_widget_data_free);
-
vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox),
- vbox,
- FALSE, FALSE,
- 2);
- gtk_widget_show (vbox);
-
- label = gtk_label_new ("details");
- gtk_widget_set_size_request (label,
- 400, -1);
- data->status = GTK_LABEL (label);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (vbox),
- label,
- FALSE, FALSE,
- 2);
-
- bar = gtk_progress_bar_new ();
- data->progress_bar = GTK_PROGRESS_BAR (bar);
- gtk_progress_bar_set_pulse_step (data->progress_bar, 0.05);
-
- gtk_widget_show (bar);
- gtk_box_pack_start (GTK_BOX (vbox),
- bar,
- FALSE, FALSE,
- 2);
+ gtk_box_set_spacing (GTK_BOX (vbox), 5);
+
+
+ data->widget = vbox;
+ g_object_set_data_full (G_OBJECT (data->widget),
+ "data", data,
+ (GDestroyNotify)progress_widget_data_free);
label = gtk_label_new ("status");
- gtk_widget_set_size_request (label,
- 400, -1);
- data->details = GTK_LABEL (label);
+ gtk_widget_set_size_request (label, 500, -1);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (vbox),
label,
- FALSE, FALSE,
- 0);
-
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox),
- vbox,
- FALSE, FALSE,
+ TRUE, FALSE,
0);
- gtk_widget_show (vbox);
+ data->status = GTK_LABEL (label);
+
+ hbox = gtk_hbox_new (FALSE,10);
- image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON);
- gtk_widget_show (image);
+ progress_bar = gtk_progress_bar_new ();
+ data->progress_bar = GTK_PROGRESS_BAR (progress_bar);
+ gtk_progress_bar_set_pulse_step (data->progress_bar, 0.05);
+ box = gtk_vbox_new (FALSE,0);
+ gtk_box_pack_start(GTK_BOX (box),
+ progress_bar,
+ TRUE,FALSE,
+ 0);
+ gtk_box_pack_start(GTK_BOX (hbox),
+ box,
+ TRUE,TRUE,
+ 0);
+
+ image = gtk_image_new_from_stock (GTK_STOCK_CANCEL,
+ GTK_ICON_SIZE_BUTTON);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), image);
- gtk_widget_show (button);
- gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_box_pack_start (GTK_BOX (hbox),
button,
- TRUE, FALSE,
+ FALSE,FALSE,
0);
-
g_signal_connect (button, "clicked", (GCallback)cancel_clicked, data);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ hbox,
+ FALSE,FALSE,
+ 0);
+ label = gtk_label_new ("details");
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ label,
+ TRUE, FALSE,
+ 0);
+ data->details = GTK_LABEL (label);
+
+ gtk_widget_show_all (data->widget);
update_data (data);
update_progress (data);
- g_signal_connect_swapped (data->info, "changed", (GCallback)update_data, data);
- g_signal_connect_swapped (data->info, "progress_changed", (GCallback)update_progress, data);
- g_signal_connect_swapped (data->info, "finished", (GCallback)op_finished, data);
+ g_signal_connect_swapped (data->info,
+ "changed",
+ (GCallback)update_data, data);
+ g_signal_connect_swapped (data->info,
+ "progress_changed",
+ (GCallback)update_progress, data);
+ g_signal_connect_swapped (data->info,
+ "finished",
+ (GCallback)op_finished, data);
- gtk_widget_show (data->widget);
-
return data->widget;
}