Commit fb8a4ebe authored by Sven Neumann's avatar Sven Neumann

A few fixes here and there...


--Sven
parent 794931f0
Thu Aug 13 20:48:48 MEST 1998 Sven Neumann <sven@gimp.org>
* app/color_area.c: Add event-masks so the tooltip is shown.
* app/gdisplay.c
* app/plug_in.c: Check range of progress-percentage to avoid
warnings.
* app/gimplist.c: Include stdio.h to fix compiler warning.
Thu Aug 13 11:32:04 MEST 1998 Sven Neumann <sven@gimp.org>
* app/app_procs.c
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -276,7 +276,7 @@ color_area_create (int width,
{
color_area = gtk_drawing_area_new ();
gtk_drawing_area_size (GTK_DRAWING_AREA (color_area), width, height);
gtk_widget_set_events (color_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_widget_set_events (color_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
gtk_signal_connect (GTK_OBJECT (color_area), "event",
(GtkSignalFunc) color_area_events,
NULL);
......
......@@ -15,6 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include "gimpsignal.h"
#include "gimplistP.h"
......@@ -144,7 +145,7 @@ gimp_list_remove (GimpList* list, gpointer val)
if(!g_slist_find(list->list, val))
{
printf("can't find val\n");
fprintf (stderr, "gimp_list_remove: can't find val\n");
return FALSE;
}
GIMP_LIST_CLASS(GTK_OBJECT(list)->klass)->remove(list, val);
......
......@@ -364,7 +364,6 @@ gdisplay_flush (GDisplay *gdisp)
(void *) gdisp);
}
void
gdisplay_draw_guides (GDisplay *gdisp)
{
......@@ -668,6 +667,7 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
int new_cursor;
char buffer[CURSOR_STR_LENGTH];
int t_x, t_y;
GimpDrawable *active_drawable;
new_cursor = gdisp->draw_cursor && gdisp->proximity;
......@@ -688,7 +688,9 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
gdisplay_untransform_coords(gdisp, x, y, &t_x, &t_y, TRUE, TRUE);
if (t_x < 0 || t_y < 0 || t_x > gdisp->gimage->width || t_y > gdisp->gimage->height)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
......@@ -1202,7 +1204,8 @@ gdisplay_active ()
/* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event ();
event_widget = gtk_get_event_widget (event);
gdk_event_free (event);
if (event != NULL)
gdk_event_free (event);
if (event_widget == NULL)
return NULL;
......
......@@ -364,7 +364,6 @@ gdisplay_flush (GDisplay *gdisp)
(void *) gdisp);
}
void
gdisplay_draw_guides (GDisplay *gdisp)
{
......@@ -668,6 +667,7 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
int new_cursor;
char buffer[CURSOR_STR_LENGTH];
int t_x, t_y;
GimpDrawable *active_drawable;
new_cursor = gdisp->draw_cursor && gdisp->proximity;
......@@ -688,7 +688,9 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
gdisplay_untransform_coords(gdisp, x, y, &t_x, &t_y, TRUE, TRUE);
if (t_x < 0 || t_y < 0 || t_x > gdisp->gimage->width || t_y > gdisp->gimage->height)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
......@@ -1202,7 +1204,8 @@ gdisplay_active ()
/* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event ();
event_widget = gtk_get_event_widget (event);
gdk_event_free (event);
if (event != NULL)
gdk_event_free (event);
if (event_widget == NULL)
return NULL;
......
......@@ -364,7 +364,6 @@ gdisplay_flush (GDisplay *gdisp)
(void *) gdisp);
}
void
gdisplay_draw_guides (GDisplay *gdisp)
{
......@@ -668,6 +667,7 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
int new_cursor;
char buffer[CURSOR_STR_LENGTH];
int t_x, t_y;
GimpDrawable *active_drawable;
new_cursor = gdisp->draw_cursor && gdisp->proximity;
......@@ -688,7 +688,9 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
gdisplay_untransform_coords(gdisp, x, y, &t_x, &t_y, TRUE, TRUE);
if (t_x < 0 || t_y < 0 || t_x > gdisp->gimage->width || t_y > gdisp->gimage->height)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
......@@ -1202,7 +1204,8 @@ gdisplay_active ()
/* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event ();
event_widget = gtk_get_event_widget (event);
gdk_event_free (event);
if (event != NULL)
gdk_event_free (event);
if (event_widget == NULL)
return NULL;
......
......@@ -15,6 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include "gimpsignal.h"
#include "gimplistP.h"
......@@ -144,7 +145,7 @@ gimp_list_remove (GimpList* list, gpointer val)
if(!g_slist_find(list->list, val))
{
printf("can't find val\n");
fprintf (stderr, "gimp_list_remove: can't find val\n");
return FALSE;
}
GIMP_LIST_CLASS(GTK_OBJECT(list)->klass)->remove(list, val);
......
......@@ -276,7 +276,7 @@ color_area_create (int width,
{
color_area = gtk_drawing_area_new ();
gtk_drawing_area_size (GTK_DRAWING_AREA (color_area), width, height);
gtk_widget_set_events (color_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
gtk_widget_set_events (color_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
gtk_signal_connect (GTK_OBJECT (color_area), "event",
(GtkSignalFunc) color_area_events,
NULL);
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
}
else
{
#ifdef SEPARATE_PROGRESS_BAR
if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL, -1);
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)
gtk_progress_bar_update (GTK_PROGRESS_BAR (plug_in->progress_bar), percentage);
#else
progress_update (percentage);
#endif
......
......@@ -3086,15 +3086,17 @@ plug_in_progress_update (PlugIn *plug_in,
if (plug_in->progress_gdisp_ID > 0)
{
gdisp = gdisplay_get_ID(plug_in->progress_gdisp_ID);
gtk_progress_bar_update( GTK_PROGRESS_BAR (gdisp->progressbar), percentage);
if (percentage >= 0.0 && percentage <= 1.0)