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...
This commit is contained in:
Adam D. Moss 1998-07-12 15:18:07 +00:00
parent ed2e3ee66f
commit 0d268dc3b1
29 changed files with 573 additions and 12 deletions

View File

@ -1,3 +1,14 @@
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> Sun Jul 12 04:16:17 PDT 1998 Jay Cox <jaycox@earthlink.net>
* gimplist{.c,.h,F.h,P.h} * gimplist{.c,.h,F.h,P.h}
New class for lists New class for lists

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */ GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */ GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */ GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */ guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */ InfoDialog *window_info_dialog; /* dialog box for image information */

View File

@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */ GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */ GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */ GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */ guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */ InfoDialog *window_info_dialog; /* dialog box for image information */

View File

@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1); gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0); 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 */ /* the popup menu */
gdisp->popup = image_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->canvas);
gtk_widget_show (gdisp->statusbar); gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar); gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner); gtk_widget_show (table_inner);
gtk_widget_show (table); gtk_widget_show (table);
gtk_widget_show (hbox); gtk_widget_show (hbox);

View File

@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1); gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0); 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 */ /* the popup menu */
gdisp->popup = image_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->canvas);
gtk_widget_show (gdisp->statusbar); gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar); gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner); gtk_widget_show (table_inner);
gtk_widget_show (table); gtk_widget_show (table);
gtk_widget_show (hbox); gtk_widget_show (hbox);

View File

@ -60,6 +60,7 @@ struct _GDisplay
GtkWidget *popup; /* widget for popup menu */ GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusbar; /* widget for statusbar */ GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */ GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */ guint progressid; /* id of statusbar message for progress */
InfoDialog *window_info_dialog; /* dialog box for image information */ InfoDialog *window_info_dialog; /* dialog box for image information */

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -716,6 +716,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_set_usize(gdisp->progressbar, 100, -1); gtk_widget_set_usize(gdisp->progressbar, 100, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0); 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 */ /* the popup menu */
gdisp->popup = image_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->canvas);
gtk_widget_show (gdisp->statusbar); gtk_widget_show (gdisp->statusbar);
gtk_widget_show (gdisp->progressbar); gtk_widget_show (gdisp->progressbar);
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner); gtk_widget_show (table_inner);
gtk_widget_show (table); gtk_widget_show (table);
gtk_widget_show (hbox); gtk_widget_show (hbox);

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -112,6 +112,8 @@ static void plug_in_args_destroy (Argument *args,
int nargs, int nargs,
int full_destroy); int full_destroy);
static void plug_in_disconnect_cancel (PlugIn *plug_in);
static Argument* progress_init_invoker (Argument *args); static Argument* progress_init_invoker (Argument *args);
static Argument* progress_update_invoker (Argument *args); static Argument* progress_update_invoker (Argument *args);
@ -808,6 +810,9 @@ plug_in_destroy (PlugIn *plug_in)
"progress"); "progress");
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id); gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar), c_id);
gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0); gtk_progress_bar_update(GTK_PROGRESS_BAR(gdisp->progressbar), 0.0);
plug_in_disconnect_cancel (plug_in);
gdisp->progressid = 0; gdisp->progressid = 0;
} }
@ -2970,6 +2975,21 @@ plug_in_progress_cancel (GtkWidget *widget,
plug_in_destroy (plug_in); 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 static void
plug_in_progress_init (PlugIn *plug_in, plug_in_progress_init (PlugIn *plug_in,
char *message, char *message,
@ -2998,6 +3018,12 @@ plug_in_progress_init (PlugIn *plug_in,
gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar), gdisp->progressid = gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
context_id, message); context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID; 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 #ifdef SEPARATE_PROGRESS_BAR
else if (!plug_in->progress) else if (!plug_in->progress)

View File

@ -99,7 +99,7 @@
/* *** DEFINES *** */ /* *** DEFINES *** */
/* set to TRUE if you want debugging, FALSE otherwise */ /* set to TRUE if you want debugging, FALSE otherwise */
#define PSD_DEBUG FALSE #define PSD_DEBUG TRUE
/* the max number of layers that this plugin should try to load */ /* the max number of layers that this plugin should try to load */
#define MAX_LAYERS 100 #define MAX_LAYERS 100
@ -523,6 +523,14 @@ dispatch_resID(guint ID, FILE *fd, guint32 *offset, guint32 Size)
(*offset)++; (*offset)++;
remaining--; remaining--;
if (psd_image.aux_channel[psd_image.num_aux_channels].name
== NULL)
{
IFDBG printf("\t\t\tNull channel name %d.\n",
psd_image.num_aux_channels);
fflush(stdout);
}
if (psd_image.aux_channel[psd_image.num_aux_channels].name) if (psd_image.aux_channel[psd_image.num_aux_channels].name)
{ {
guint32 alpha_name_len; guint32 alpha_name_len;
@ -672,7 +680,7 @@ dispatch_resID(guint ID, FILE *fd, guint32 *offset, guint32 Size)
default: default:
IFDBG printf ("\t\t<Undocumented field.>\n"); IFDBG printf ("\t\t<Undocumented field.>\n");
throwchunk(Size, fd, "dispatch_res"); dumpchunk(Size, fd, "dispatch_res");
(*offset) += Size; (*offset) += Size;
break; break;
} }
@ -1963,7 +1971,7 @@ decode(long clen, long uclen, char * src, char * dst, int step)
for (i = 0; i < PSDheader.rows*PSDheader.channels; ++i) for (i = 0; i < PSDheader.rows*PSDheader.channels; ++i)
l -= PSDheader.rowlength[i]; l -= PSDheader.rowlength[i];
if (l) if (l)
printf("*** %ld should be zero\n", (long)l); g_warning("decode: %ld should be zero\n", (long)l);
w = PSDheader.rowlength; w = PSDheader.rowlength;
@ -2224,10 +2232,8 @@ getpascalstring(FILE *fd, gchar *why)
if (len==0) if (len==0)
{ {
// xfread(fd, &len, 1, why); /* Throw away a byte? */
return (NULL); return (NULL);
/* tmpchunk[0]=0;
return (tmpchunk);*/
} }
tmpchunk = xmalloc(len+1); tmpchunk = xmalloc(len+1);

View File

@ -99,7 +99,7 @@
/* *** DEFINES *** */ /* *** DEFINES *** */
/* set to TRUE if you want debugging, FALSE otherwise */ /* set to TRUE if you want debugging, FALSE otherwise */
#define PSD_DEBUG FALSE #define PSD_DEBUG TRUE
/* the max number of layers that this plugin should try to load */ /* the max number of layers that this plugin should try to load */
#define MAX_LAYERS 100 #define MAX_LAYERS 100
@ -523,6 +523,14 @@ dispatch_resID(guint ID, FILE *fd, guint32 *offset, guint32 Size)
(*offset)++; (*offset)++;
remaining--; remaining--;
if (psd_image.aux_channel[psd_image.num_aux_channels].name
== NULL)
{
IFDBG printf("\t\t\tNull channel name %d.\n",
psd_image.num_aux_channels);
fflush(stdout);
}
if (psd_image.aux_channel[psd_image.num_aux_channels].name) if (psd_image.aux_channel[psd_image.num_aux_channels].name)
{ {
guint32 alpha_name_len; guint32 alpha_name_len;
@ -672,7 +680,7 @@ dispatch_resID(guint ID, FILE *fd, guint32 *offset, guint32 Size)
default: default:
IFDBG printf ("\t\t<Undocumented field.>\n"); IFDBG printf ("\t\t<Undocumented field.>\n");
throwchunk(Size, fd, "dispatch_res"); dumpchunk(Size, fd, "dispatch_res");
(*offset) += Size; (*offset) += Size;
break; break;
} }
@ -1963,7 +1971,7 @@ decode(long clen, long uclen, char * src, char * dst, int step)
for (i = 0; i < PSDheader.rows*PSDheader.channels; ++i) for (i = 0; i < PSDheader.rows*PSDheader.channels; ++i)
l -= PSDheader.rowlength[i]; l -= PSDheader.rowlength[i];
if (l) if (l)
printf("*** %ld should be zero\n", (long)l); g_warning("decode: %ld should be zero\n", (long)l);
w = PSDheader.rowlength; w = PSDheader.rowlength;
@ -2224,10 +2232,8 @@ getpascalstring(FILE *fd, gchar *why)
if (len==0) if (len==0)
{ {
// xfread(fd, &len, 1, why); /* Throw away a byte? */
return (NULL); return (NULL);
/* tmpchunk[0]=0;
return (tmpchunk);*/
} }
tmpchunk = xmalloc(len+1); tmpchunk = xmalloc(len+1);