[gthumb/ext: 43/79] connect the cancel button to the cancel callback
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext: 43/79] connect the cancel button to the cancel callback
- Date: Sun, 2 Aug 2009 20:28:42 +0000 (UTC)
commit 110fa1fd8148df0b67055917a28257cf4d1c0a6b
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Jul 14 11:48:24 2009 +0200
connect the cancel button to the cancel callback
gthumb/gth-progress-dialog.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-progress-dialog.c b/gthumb/gth-progress-dialog.c
index 596cf25..30f6491 100644
--- a/gthumb/gth-progress-dialog.c
+++ b/gthumb/gth-progress-dialog.c
@@ -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)
{
@@ -82,6 +83,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)
{
GtkWidget *vbox;
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]