Commit 0d268dc3 authored by Adam D. Moss's avatar Adam D. Moss

app/gdisplay.h app/interface.c Added the ability to cancel a running

        * app/gdisplay.h
        * app/interface.c
        * app/plug_in.c: Added the ability to cancel a running
        plugin when the progress-bar has been sucked into the image
        window.

        * plug-ins/psd/psd.c: Turned debugging on again, since we
        are in a development cycle...
parent ed2e3ee6
Sun Jul 12 15:56:01 BST 1998 Adam D. Moss <adam@gimp.org>
* app/gdisplay.h
* app/interface.c
* app/plug_in.c: Added the ability to cancel a running
plugin when the progress-bar has been sucked into the image
window.
* plug-ins/psd/psd.c: Turned debugging on again, since we
are in a development cycle...
Sun Jul 12 04:16:17 PDT 1998 Jay Cox <jaycox@earthlink.net>
* gimplist{.c,.h,F.h,P.h}
New class for lists
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */
......
......@@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */
......
......@@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
gdisp->popup = image_popup_menu;
......@@ -731,6 +735,7 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->canvas);
gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
......
......@@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
gdisp->popup = image_popup_menu;
......@@ -731,6 +735,7 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->canvas);
gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
......
......@@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
gdisp->popup = image_popup_menu;
......@@ -731,6 +735,7 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->canvas);
gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0;
}
......@@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in);
}
static void
plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
gtk_signal_disconnect_by_func (GTK_OBJECT (gdisp->cancelbutton),
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
}
static void
plug_in_progress_init (PlugIn *plug_in,
char *message,
......@@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);
gtk_widget_set_sensitive (gdisp->cancelbutton, TRUE);
}
#ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress)
......
......@@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs,
int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args);
......@@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);