$OpenBSD: patch-src_progress_c,v 1.3 2010/05/03 08:49:08 jasper Exp $

Implement --no-cancel
ETA was GNOME 2.30, see:
    http://bugzilla-attachments.gnome.org/attachment.cgi?id=152711

--- src/progress.c.orig	Sun Mar 28 22:55:43 2010
+++ src/progress.c	Tue Apr 20 20:10:02 2010
@@ -38,6 +38,8 @@ static GIOChannel *channel;
 
 static gint pulsate_timeout = -1;
 static gboolean autokill;
+static gboolean no_cancel;
+static gboolean auto_close;
 
 gint zenity_progress_timeout (gpointer data);
 gint zenity_progress_pulsate_timeout (gpointer data);
@@ -227,6 +229,7 @@ zenity_progress (ZenityData *data, ZenityProgressData 
   GtkWidget *dialog;
   GObject *text;
   GObject *progress_bar;
+  GObject *cancel_button,*ok_button;
 
   zen_data = data;
   builder = zenity_util_load_ui_file ("zenity_progress_dialog", NULL);
@@ -264,6 +267,20 @@ zenity_progress (ZenityData *data, ZenityProgressData 
                                    progress_data->percentage/100.0);
 
   autokill = progress_data->autokill;
+
+  auto_close = progress_data->autoclose;
+  ok_button = gtk_builder_get_object (builder, "zenity_progress_ok_button");
+
+  no_cancel = progress_data->no_cancel;
+  cancel_button = gtk_builder_get_object (builder, "zenity_progress_cancel_button");
+
+  if (no_cancel) {
+     gtk_widget_hide (GTK_WIDGET(cancel_button));
+     gtk_window_set_deletable (GTK_WINDOW (dialog), FALSE);
+  }
+
+  if (no_cancel && auto_close)
+     gtk_widget_hide(GTK_WIDGET(ok_button));
 
   zenity_util_show_dialog (dialog);
   zenity_progress_read_info (progress_data);
