Commit 110fa1fd authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

connect the cancel button to the cancel callback

parent 0b851ab0
......@@ -73,6 +73,7 @@ gth_task_progress_finalize (GObject *base)
G_OBJECT_CLASS (gth_task_progress_parent_class)->finalize (base);
}
static void
gth_task_progress_class_init (GthTaskProgressClass *klass)
{
......@@ -81,6 +82,14 @@ gth_task_progress_class_init (GthTaskProgressClass *klass)
}
static void
cancel_button_clicked_cb (GtkButton *button,
GthTaskProgress *self)
{
gth_task_cancel (self->task);
}
static void
gth_task_progress_init (GthTaskProgress *self)
{
......@@ -119,6 +128,7 @@ gth_task_progress_init (GthTaskProgress *self)
self->cancel_button = gtk_button_new ();
gtk_widget_show (self->cancel_button);
g_signal_connect (self->cancel_button, "clicked", G_CALLBACK (cancel_button_clicked_cb), self);
gtk_widget_set_tooltip_text (self->cancel_button, _("Cancel operation"));
gtk_box_pack_start (GTK_BOX (vbox), self->cancel_button, TRUE, FALSE, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment