removed the idle function from the splash screen, added code that services

Sat Mar 27 01:13:42 EST 1999  Matt Wilson  <msw@gimp.org>

	* app/app_procs.c: removed the idle function from the
	splash screen, added code that services the event
	queue.  This reduces flicker in the splash screen.
	(backport from 1.1)

	* app/brushes.c: s/gpointer/gconstpointer for hash table
	functions (backport from 1.1)

	* app/fileops.c: added #include <stdlib.h> to get
	prototype for strtol()

	* app/gdisplay.c: added a check to see if we have a gdisplay
	hash table set up before we go looking for the gdisplay
	for this toplevel widget. (backport from 1.1)

	* app/interface.c: added a bound check for progress_update
	(backport from 1.1)

	* app/main.c: added a cast to make g_set-message_handler happy
	(backport from 1.1)

	* app/patterns.c: s/gpointer/gconstpointer for hash table
	functions (backport from 1.1)

	* app/plug_in.c: added bounds check for progress bar update

	* app/procedural_db.c: s/gpointer/gconstpointer for hash table
	functions, changed to using g_str_equal for comparison
	(backport from 1.1)

	* plug-ins/MapObject/mapobject_ui.c: now uses the right widget
	for adjustment callbacks (backport from 1.1 branch)

	* plug-ins/dbbrowser/dbbrowser_utils.c: fixed the clist of
	db functions so that the scrollbar shows, added viewports
	for non-scrollable description table

	* plug-ins/gfig/gfig.c: reverted to the gfig version from
	the 1.0 branch, ported to GTK+ 1.2

	* plug-ins/script-fu/script-fu-server.c: set up the clientname
	hash table to use g_direct_hash (backport from 1.1),
	added stdlib.h for malloc() prototype.
This commit is contained in:
EST 1999 Matt Wilson 1999-03-27 06:15:57 +00:00 committed by Matt Wilson
parent 8df1bfb712
commit c27f21f58b
43 changed files with 1020 additions and 926 deletions

View File

@ -1,3 +1,49 @@
Sat Mar 27 01:13:42 EST 1999 Matt Wilson <msw@gimp.org>
* app/app_procs.c: removed the idle function from the
splash screen, added code that services the event
queue. This reduces flicker in the splash screen.
(backport from 1.1)
* app/brushes.c: s/gpointer/gconstpointer for hash table
functions (backport from 1.1)
* app/fileops.c: added #include <stdlib.h> to get
prototype for strtol()
* app/gdisplay.c: added a check to see if we have a gdisplay
hash table set up before we go looking for the gdisplay
for this toplevel widget. (backport from 1.1)
* app/interface.c: added a bound check for progress_update
(backport from 1.1)
* app/main.c: added a cast to make g_set-message_handler happy
(backport from 1.1)
* app/patterns.c: s/gpointer/gconstpointer for hash table
functions (backport from 1.1)
* app/plug_in.c: added bounds check for progress bar update
* app/procedural_db.c: s/gpointer/gconstpointer for hash table
functions, changed to using g_str_equal for comparison
(backport from 1.1)
* plug-ins/MapObject/mapobject_ui.c: now uses the right widget
for adjustment callbacks (backport from 1.1 branch)
* plug-ins/dbbrowser/dbbrowser_utils.c: fixed the clist of
db functions so that the scrollbar shows, added viewports
for non-scrollable description table
* plug-ins/gfig/gfig.c: reverted to the gfig version from
the 1.0 branch, ported to GTK+ 1.2
* plug-ins/script-fu/script-fu-server.c: set up the clientname
hash table to use g_direct_hash (backport from 1.1),
added stdlib.h for malloc() prototype.
Mon Mar 15 13:13:36 1999 Owen Taylor <otaylor@redhat.com> Mon Mar 15 13:13:36 1999 Owen Taylor <otaylor@redhat.com>
* plug-ins/xd/xd.c plug-ins/film/film.c: * plug-ins/xd/xd.c plug-ins/film/film.c:

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -305,7 +305,6 @@ static GtkWidget *win_initstatus = NULL;
static GtkWidget *label1 = NULL; static GtkWidget *label1 = NULL;
static GtkWidget *label2 = NULL; static GtkWidget *label2 = NULL;
static GtkWidget *pbar = NULL; static GtkWidget *pbar = NULL;
static gint idle_tag = -1;
static void static void
destroy_initialization_status_window(void) destroy_initialization_status_window(void)
@ -317,7 +316,6 @@ destroy_initialization_status_window(void)
gdk_pixmap_unref(logo_pixmap); gdk_pixmap_unref(logo_pixmap);
win_initstatus = label1 = label2 = pbar = logo_area = NULL; win_initstatus = label1 = label2 = pbar = logo_area = NULL;
logo_pixmap = NULL; logo_pixmap = NULL;
gtk_idle_remove(idle_tag);
} }
} }
@ -431,9 +429,12 @@ app_init_update_status(char *label1val,
gtk_progress_bar_update(GTK_PROGRESS_BAR(pbar), pct_progress); gtk_progress_bar_update(GTK_PROGRESS_BAR(pbar), pct_progress);
} }
gtk_widget_draw(win_initstatus, &area); gtk_widget_draw(win_initstatus, &area);
idle_tag = gtk_idle_add((GtkFunction) gtk_true, NULL); while (gtk_events_pending())
gtk_main_iteration(); gtk_main_iteration();
gtk_idle_remove(idle_tag); /* We sync here to make sure things get drawn before continuing,
* is the improved look worth the time? I'm not sure...
*/
gdk_flush();
} }
} }

View File

@ -58,7 +58,7 @@ static void create_default_brush (void);
static void load_brush (char *filename); static void load_brush (char *filename);
static void free_brush (GBrushP); static void free_brush (GBrushP);
static void brushes_free_one (gpointer, gpointer); static void brushes_free_one (gpointer, gpointer);
static gint brush_compare_func (gpointer, gpointer); static gint brush_compare_func (gconstpointer, gconstpointer);
/* function declarations */ /* function declarations */
void void
@ -91,18 +91,18 @@ brushes_init (int no_data)
list = g_slist_next(list); list = g_slist_next(list);
if(list) { if(list) {
GBrushP gb2 = (GBrushP)list->data; GBrushP gb2 = (GBrushP)list->data;
if(gb_start == NULL) { if(gb_start == NULL) {
gb_start = gb; gb_start = gb;
} }
if(gb_start->name if(gb_start->name
&& gb2->name && gb2->name
&& (strcmp(gb_start->name,gb2->name) == 0)) { && (strcmp(gb_start->name,gb2->name) == 0)) {
gint b_digits = 2; gint b_digits = 2;
gint gb_tmp_cnt = gb_count++; gint gb_tmp_cnt = gb_count++;
/* Alter gb2... */ /* Alter gb2... */
g_free(gb2->name); g_free(gb2->name);
while((gb_tmp_cnt /= 10) > 0) while((gb_tmp_cnt /= 10) > 0)
@ -116,8 +116,8 @@ brushes_init (int no_data)
gb_start = gb2; gb_start = gb2;
gb_count = 0; gb_count = 0;
} }
} }
} }
} }
@ -129,7 +129,7 @@ brushes_free_one (gpointer data, gpointer dummy)
static gint static gint
brush_compare_func (gpointer first, gpointer second) brush_compare_func (gconstpointer first, gconstpointer second)
{ {
return strcmp (((GBrushP)first)->name, ((GBrushP)second)->name); return strcmp (((GBrushP)first)->name, ((GBrushP)second)->name);
} }
@ -370,7 +370,7 @@ create_brush_dialog ()
else else
gdk_window_raise(brush_select_dialog->shell->window); gdk_window_raise(brush_select_dialog->shell->window);
} }
} }
@ -460,10 +460,10 @@ static Argument *
brushes_refresh_brush_invoker (Argument *args) brushes_refresh_brush_invoker (Argument *args)
{ {
/* FIXME: I've hardcoded success to be 1, because brushes_init() is a /* FIXME: I've hardcoded success to be 1, because brushes_init() is a
* void function right now. It'd be nice if it returned a value at * void function right now. It'd be nice if it returned a value at
* some future date, so we could tell if things blew up when reparsing * some future date, so we could tell if things blew up when reparsing
* the list (for whatever reason). * the list (for whatever reason).
* - Seth "Yes, this is a kludge" Burgess * - Seth "Yes, this is a kludge" Burgess
* <sjburges@ou.edu> * <sjburges@ou.edu>
*/ */
@ -526,7 +526,7 @@ ProcRecord brushes_refresh_brush_proc =
"gimp_brushes_refresh", "gimp_brushes_refresh",
"Refresh current brushes", "Refresh current brushes",
"This procedure retrieves all brushes currently in the user's brush path " "This procedure retrieves all brushes currently in the user's brush path "
"and updates the brush dialog accordingly.", "and updates the brush dialog accordingly.",
"Seth Burgess<sjburges@ou.edu>", "Seth Burgess<sjburges@ou.edu>",
"Seth Burgess", "Seth Burgess",
"1997", "1997",

View File

@ -202,7 +202,7 @@ gdisplay_delete (GDisplay *gdisp)
/* free the selection structure */ /* free the selection structure */
selection_free (gdisp->select); selection_free (gdisp->select);
if (gdisp->scroll_gc) if (gdisp->scroll_gc)
gdk_gc_destroy (gdisp->scroll_gc); gdk_gc_destroy (gdisp->scroll_gc);
@ -1114,7 +1114,7 @@ gdisplay_active ()
GtkWidget *event_widget; GtkWidget *event_widget;
GtkWidget *toplevel_widget; GtkWidget *toplevel_widget;
GdkEvent *event; GdkEvent *event;
GDisplay *gdisp; GDisplay *gdisp = NULL;
/* If the popup shell is valid, then get the gdisplay associated with that shell */ /* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event (); event = gtk_get_current_event ();
@ -1125,7 +1125,9 @@ gdisplay_active ()
return NULL; return NULL;
toplevel_widget = gtk_widget_get_toplevel (event_widget); toplevel_widget = gtk_widget_get_toplevel (event_widget);
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (display_ht)
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (gdisp) if (gdisp)
return gdisp; return gdisp;

View File

@ -202,7 +202,7 @@ gdisplay_delete (GDisplay *gdisp)
/* free the selection structure */ /* free the selection structure */
selection_free (gdisp->select); selection_free (gdisp->select);
if (gdisp->scroll_gc) if (gdisp->scroll_gc)
gdk_gc_destroy (gdisp->scroll_gc); gdk_gc_destroy (gdisp->scroll_gc);
@ -1114,7 +1114,7 @@ gdisplay_active ()
GtkWidget *event_widget; GtkWidget *event_widget;
GtkWidget *toplevel_widget; GtkWidget *toplevel_widget;
GdkEvent *event; GdkEvent *event;
GDisplay *gdisp; GDisplay *gdisp = NULL;
/* If the popup shell is valid, then get the gdisplay associated with that shell */ /* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event (); event = gtk_get_current_event ();
@ -1125,7 +1125,9 @@ gdisplay_active ()
return NULL; return NULL;
toplevel_widget = gtk_widget_get_toplevel (event_widget); toplevel_widget = gtk_widget_get_toplevel (event_widget);
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (display_ht)
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (gdisp) if (gdisp)
return gdisp; return gdisp;

View File

@ -1012,6 +1012,9 @@ progress_start ()
void void
progress_update (float percentage) progress_update (float percentage)
{ {
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage); gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage);
if (GTK_WIDGET_VISIBLE (progress_area)) if (GTK_WIDGET_VISIBLE (progress_area))

View File

@ -1012,6 +1012,9 @@ progress_start ()
void void
progress_update (float percentage) progress_update (float percentage)
{ {
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage); gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage);
if (GTK_WIDGET_VISIBLE (progress_area)) if (GTK_WIDGET_VISIBLE (progress_area))

View File

@ -24,6 +24,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include "appenv.h" #include "appenv.h"
#include "actionarea.h" #include "actionarea.h"

View File

@ -202,7 +202,7 @@ gdisplay_delete (GDisplay *gdisp)
/* free the selection structure */ /* free the selection structure */
selection_free (gdisp->select); selection_free (gdisp->select);
if (gdisp->scroll_gc) if (gdisp->scroll_gc)
gdk_gc_destroy (gdisp->scroll_gc); gdk_gc_destroy (gdisp->scroll_gc);
@ -1114,7 +1114,7 @@ gdisplay_active ()
GtkWidget *event_widget; GtkWidget *event_widget;
GtkWidget *toplevel_widget; GtkWidget *toplevel_widget;
GdkEvent *event; GdkEvent *event;
GDisplay *gdisp; GDisplay *gdisp = NULL;
/* If the popup shell is valid, then get the gdisplay associated with that shell */ /* If the popup shell is valid, then get the gdisplay associated with that shell */
event = gtk_get_current_event (); event = gtk_get_current_event ();
@ -1125,7 +1125,9 @@ gdisplay_active ()
return NULL; return NULL;
toplevel_widget = gtk_widget_get_toplevel (event_widget); toplevel_widget = gtk_widget_get_toplevel (event_widget);
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (display_ht)
gdisp = g_hash_table_lookup (display_ht, toplevel_widget);
if (gdisp) if (gdisp)
return gdisp; return gdisp;

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -1012,6 +1012,9 @@ progress_start ()
void void
progress_update (float percentage) progress_update (float percentage)
{ {
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage); gtk_progress_bar_update (GTK_PROGRESS_BAR (progress_area), percentage);
if (GTK_WIDGET_VISIBLE (progress_area)) if (GTK_WIDGET_VISIBLE (progress_area))

View File

@ -233,7 +233,7 @@ main (int argc, char **argv)
if (show_version || show_help) if (show_version || show_help)
exit (0); exit (0);
g_set_message_handler (&message_func); g_set_message_handler ((GPrintFunc) message_func);
/* Handle some signals */ /* Handle some signals */
signal (SIGHUP, on_signal); signal (SIGHUP, on_signal);

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -53,7 +53,7 @@ static GSList * insert_pattern_in_list (GSList *, GPatternP);
static void load_pattern (char *filename); static void load_pattern (char *filename);
static void free_pattern (GPatternP); static void free_pattern (GPatternP);
static void pattern_free_one (gpointer, gpointer); static void pattern_free_one (gpointer, gpointer);
static gint pattern_compare_func (gpointer, gpointer); static gint pattern_compare_func (gconstpointer, gconstpointer);
/* function declarations */ /* function declarations */
@ -92,7 +92,7 @@ pattern_free_one (gpointer data, gpointer dummy)
} }
static gint static gint
pattern_compare_func(gpointer first, gpointer second) pattern_compare_func(gconstpointer first, gconstpointer second)
{ {
return strcmp (((GPatternP)first)->name, ((GPatternP)second)->name); return strcmp (((GPatternP)first)->name, ((GPatternP)second)->name);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -445,7 +445,7 @@ plug_in_kill ()
{ {
GSList *tmp; GSList *tmp;
PlugIn *plug_in; PlugIn *plug_in;
#ifdef HAVE_SHM_H #ifdef HAVE_SHM_H
#ifndef IPC_RMID_DEFERRED_RELEASE #ifndef IPC_RMID_DEFERRED_RELEASE
if (shm_ID != -1) if (shm_ID != -1)
@ -458,7 +458,7 @@ plug_in_kill ()
shmdt ((char*) shm_addr); shmdt ((char*) shm_addr);
#endif #endif
#endif #endif
tmp = open_plug_ins; tmp = open_plug_ins;
while (tmp) while (tmp)
{ {
@ -1048,7 +1048,7 @@ plug_in_get_current_return_vals (ProcRecord *proc_rec)
Argument* Argument*
plug_in_run (ProcRecord *proc_rec, plug_in_run (ProcRecord *proc_rec,
Argument *args, Argument *args,
int synchronous, int synchronous,
int destroy_values) int destroy_values)
{ {
GPConfig config; GPConfig config;
@ -1112,12 +1112,12 @@ plug_in_run (ProcRecord *proc_rec,
if (plug_in->recurse) if (plug_in->recurse)
{ {
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
} }
} }
} }
done: done:
if (return_vals && destroy_values) if (return_vals && destroy_values)
{ {
@ -1220,7 +1220,7 @@ plug_in_recv_message (gpointer data,
memset (&msg, 0, sizeof (WireMessage)); memset (&msg, 0, sizeof (WireMessage));
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -1615,22 +1615,22 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
* Sanity check for array arguments * Sanity check for array arguments
*/ */
for (i = 1; i < proc_install->nparams; i++) for (i = 1; i < proc_install->nparams; i++)
{ {
if ((proc_install->params[i].type == PDB_INT32ARRAY || if ((proc_install->params[i].type == PDB_INT32ARRAY ||
proc_install->params[i].type == PDB_INT8ARRAY || proc_install->params[i].type == PDB_INT8ARRAY ||
proc_install->params[i].type == PDB_FLOATARRAY || proc_install->params[i].type == PDB_FLOATARRAY ||
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_message ("plug_in \"%s\" attempted to install procedure \"%s\" " g_message ("plug_in \"%s\" attempted to install procedure \"%s\" "
"which fails to comply with the array parameter " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
return; return;
} }
} }
/* /*
* Initialization * Initialization
@ -2071,7 +2071,7 @@ plug_in_query (char *filename,
{ {
if (!wire_read_msg (current_readfd, &msg)) if (!wire_read_msg (current_readfd, &msg))
plug_in_close (current_plug_in, TRUE); plug_in_close (current_plug_in, TRUE);
else else
{ {
plug_in_handle_message (&msg); plug_in_handle_message (&msg);
wire_destroy (&msg); wire_destroy (&msg);
@ -2416,7 +2416,7 @@ plug_in_temp_run (ProcRecord *proc_rec,
plug_in->recurse = TRUE; plug_in->recurse = TRUE;
gtk_main (); gtk_main ();
return_vals = plug_in_get_current_return_vals (proc_rec); return_vals = plug_in_get_current_return_vals (proc_rec);
plug_in->recurse = old_recurse; plug_in->recurse = old_recurse;
plug_in->busy = FALSE; plug_in->busy = FALSE;
@ -3026,6 +3026,9 @@ plug_in_progress_update (PlugIn *plug_in,
double percentage) double percentage)
{ {
#ifdef SEPARATE_PROGRESS_BAR #ifdef SEPARATE_PROGRESS_BAR
if (!(percentage >= 0.0 && percentage <= 1.0))
return;
if (!plug_in->progress) if (!plug_in->progress)
plug_in_progress_init (plug_in, NULL); plug_in_progress_init (plug_in, NULL);
@ -3086,12 +3089,12 @@ static Argument*
message_handler_set_invoker (Argument *args) message_handler_set_invoker (Argument *args)
{ {
int success = TRUE; int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) && if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE)) (args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int; message_handler = args[0].value.pdb_int;
else else
success = FALSE; success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success); return procedural_db_return_args (&message_handler_set_proc, success);
} }

View File

@ -66,9 +66,7 @@ static Argument * procedural_db_set_data (Argument *);
static Argument * procedural_db_query (Argument *); static Argument * procedural_db_query (Argument *);
static void procedural_db_query_entry (gpointer, gpointer, gpointer); static void procedural_db_query_entry (gpointer, gpointer, gpointer);
static int match_strings (regex_t *, char *); static int match_strings (regex_t *, char *);
static guint procedural_db_hash_func (gpointer key); static guint procedural_db_hash_func (gconstpointer key);
static gint procedural_db_compare_func (gpointer a, gpointer b);
/* Local data */ /* Local data */
static GHashTable *procedural_ht = NULL; static GHashTable *procedural_ht = NULL;
@ -485,7 +483,7 @@ procedural_db_init ()
app_init_update_status("Procedural Database", NULL, -1); app_init_update_status("Procedural Database", NULL, -1);
if (!procedural_ht) if (!procedural_ht)
procedural_ht = g_hash_table_new (procedural_db_hash_func, procedural_ht = g_hash_table_new (procedural_db_hash_func,
procedural_db_compare_func); g_str_equal);
} }
void void
@ -1128,7 +1126,7 @@ match_strings (regex_t * preg,
} }
static guint static guint
procedural_db_hash_func (gpointer key) procedural_db_hash_func (gconstpointer key)
{ {
gchar *string; gchar *string;
guint result; guint result;
@ -1172,9 +1170,4 @@ procedural_db_hash_func (gpointer key)
return result; return result;
} }
static gint
procedural_db_compare_func (gpointer a,
gpointer b)
{
return (strcmp ((char *) a, (char *) b) == 0);
}

View File

@ -82,3 +82,7 @@
/* Define if you have the <sys/ndir.h> header file. */ /* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H #undef HAVE_SYS_NDIR_H
/* define if compiled symbols have a leading underscore */
#undef WITH_SYMBOL_UNDERSCORE

View File

@ -120,7 +120,7 @@ gimp_main (int argc,
return 0; return 0;
} }
g_set_message_handler (&gimp_message_func); g_set_message_handler ((GPrintFunc) gimp_message_func);
temp_proc_ht = g_hash_table_new (&g_str_hash, &g_str_equal); temp_proc_ht = g_hash_table_new (&g_str_hash, &g_str_equal);

View File

@ -22,6 +22,8 @@
0.08 26th sept 97 by Thomas NOEL <thomas@minet.net> 0.08 26th sept 97 by Thomas NOEL <thomas@minet.net>
*/ */
#include <stdlib.h>
#include "dbbrowser_utils.h" #include "dbbrowser_utils.h"
GList *proc_table; GList *proc_table;
@ -92,8 +94,7 @@ gimp_db_browser(void (* apply_callback) ( gchar *selected_proc_name,
gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row", gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row",
(GtkSignalFunc) procedure_select_callback, (GtkSignalFunc) procedure_select_callback,
dbbrowser); dbbrowser);
gtk_box_pack_start (GTK_BOX (vbox), gtk_box_pack_start (GTK_BOX (vbox), dbbrowser->scrolled_win, TRUE, TRUE, 0);
dbbrowser->clist, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist); gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist);
gtk_widget_show(dbbrowser->clist); gtk_widget_show(dbbrowser->clist);
gtk_widget_show(dbbrowser->scrolled_win); gtk_widget_show(dbbrowser->scrolled_win);
@ -452,8 +453,9 @@ dialog_select (dbbrowser_t *dbbrowser,
if (old_table) gtk_widget_destroy(old_table); if (old_table) gtk_widget_destroy(old_table);
gtk_container_add (GTK_CONTAINER (dbbrowser->descr_scroll), gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (dbbrowser->descr_scroll),
dbbrowser->descr_table ); dbbrowser->descr_table);
gtk_widget_show(dbbrowser->descr_table); gtk_widget_show(dbbrowser->descr_table);
} }

View File

@ -22,6 +22,8 @@
0.08 26th sept 97 by Thomas NOEL <thomas@minet.net> 0.08 26th sept 97 by Thomas NOEL <thomas@minet.net>
*/ */
#include <stdlib.h>
#include "dbbrowser_utils.h" #include "dbbrowser_utils.h"
GList *proc_table; GList *proc_table;
@ -92,8 +94,7 @@ gimp_db_browser(void (* apply_callback) ( gchar *selected_proc_name,
gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row", gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row",
(GtkSignalFunc) procedure_select_callback, (GtkSignalFunc) procedure_select_callback,
dbbrowser); dbbrowser);
gtk_box_pack_start (GTK_BOX (vbox), gtk_box_pack_start (GTK_BOX (vbox), dbbrowser->scrolled_win, TRUE, TRUE, 0);
dbbrowser->clist, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist); gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist);
gtk_widget_show(dbbrowser->clist); gtk_widget_show(dbbrowser->clist);
gtk_widget_show(dbbrowser->scrolled_win); gtk_widget_show(dbbrowser->scrolled_win);
@ -452,8 +453,9 @@ dialog_select (dbbrowser_t *dbbrowser,
if (old_table) gtk_widget_destroy(old_table); if (old_table) gtk_widget_destroy(old_table);
gtk_container_add (GTK_CONTAINER (dbbrowser->descr_scroll), gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (dbbrowser->descr_scroll),
dbbrowser->descr_table ); dbbrowser->descr_table);
gtk_widget_show(dbbrowser->descr_table); gtk_widget_show(dbbrowser->descr_table);
} }

View File

@ -131,7 +131,7 @@ void angle_update(GtkWidget *widget, GtkScale *scale)
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr"); valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr");
adjustment=gtk_range_get_adjustment(GTK_RANGE(scale)); adjustment=gtk_range_get_adjustment(GTK_RANGE(widget));
*valueptr=(gdouble)adjustment->value; *valueptr=(gdouble)adjustment->value;
@ -169,7 +169,7 @@ void scale_update(GtkWidget *widget,GtkScale *scale)
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr"); valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr");
adjustment=gtk_range_get_adjustment(GTK_RANGE(scale)); adjustment=gtk_range_get_adjustment(GTK_RANGE(widget));
*valueptr=(gdouble)adjustment->value; *valueptr=(gdouble)adjustment->value;
} }

View File

@ -22,6 +22,8 @@
0.08 26th sept 97 by Thomas NOEL <thomas@minet.net> 0.08 26th sept 97 by Thomas NOEL <thomas@minet.net>
*/ */
#include <stdlib.h>
#include "dbbrowser_utils.h" #include "dbbrowser_utils.h"
GList *proc_table; GList *proc_table;
@ -92,8 +94,7 @@ gimp_db_browser(void (* apply_callback) ( gchar *selected_proc_name,
gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row", gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row",
(GtkSignalFunc) procedure_select_callback, (GtkSignalFunc) procedure_select_callback,
dbbrowser); dbbrowser);
gtk_box_pack_start (GTK_BOX (vbox), gtk_box_pack_start (GTK_BOX (vbox), dbbrowser->scrolled_win, TRUE, TRUE, 0);
dbbrowser->clist, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist); gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist);
gtk_widget_show(dbbrowser->clist); gtk_widget_show(dbbrowser->clist);
gtk_widget_show(dbbrowser->scrolled_win); gtk_widget_show(dbbrowser->scrolled_win);
@ -452,8 +453,9 @@ dialog_select (dbbrowser_t *dbbrowser,
if (old_table) gtk_widget_destroy(old_table); if (old_table) gtk_widget_destroy(old_table);
gtk_container_add (GTK_CONTAINER (dbbrowser->descr_scroll), gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (dbbrowser->descr_scroll),
dbbrowser->descr_table ); dbbrowser->descr_table);
gtk_widget_show(dbbrowser->descr_table); gtk_widget_show(dbbrowser->descr_table);
} }

View File

@ -22,6 +22,8 @@
0.08 26th sept 97 by Thomas NOEL <thomas@minet.net> 0.08 26th sept 97 by Thomas NOEL <thomas@minet.net>
*/ */
#include <stdlib.h>
#include "dbbrowser_utils.h" #include "dbbrowser_utils.h"
GList *proc_table; GList *proc_table;
@ -92,8 +94,7 @@ gimp_db_browser(void (* apply_callback) ( gchar *selected_proc_name,
gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row", gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row",
(GtkSignalFunc) procedure_select_callback, (GtkSignalFunc) procedure_select_callback,
dbbrowser); dbbrowser);
gtk_box_pack_start (GTK_BOX (vbox), gtk_box_pack_start (GTK_BOX (vbox), dbbrowser->scrolled_win, TRUE, TRUE, 0);
dbbrowser->clist, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist); gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist);
gtk_widget_show(dbbrowser->clist); gtk_widget_show(dbbrowser->clist);
gtk_widget_show(dbbrowser->scrolled_win); gtk_widget_show(dbbrowser->scrolled_win);
@ -452,8 +453,9 @@ dialog_select (dbbrowser_t *dbbrowser,
if (old_table) gtk_widget_destroy(old_table); if (old_table) gtk_widget_destroy(old_table);
gtk_container_add (GTK_CONTAINER (dbbrowser->descr_scroll), gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (dbbrowser->descr_scroll),
dbbrowser->descr_table ); dbbrowser->descr_table);
gtk_widget_show(dbbrowser->descr_table); gtk_widget_show(dbbrowser->descr_table);
} }

View File

@ -22,6 +22,8 @@
0.08 26th sept 97 by Thomas NOEL <thomas@minet.net> 0.08 26th sept 97 by Thomas NOEL <thomas@minet.net>
*/ */
#include <stdlib.h>
#include "dbbrowser_utils.h" #include "dbbrowser_utils.h"
GList *proc_table; GList *proc_table;
@ -92,8 +94,7 @@ gimp_db_browser(void (* apply_callback) ( gchar *selected_proc_name,
gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row", gtk_signal_connect (GTK_OBJECT (dbbrowser->clist), "select_row",
(GtkSignalFunc) procedure_select_callback, (GtkSignalFunc) procedure_select_callback,
dbbrowser); dbbrowser);
gtk_box_pack_start (GTK_BOX (vbox), gtk_box_pack_start (GTK_BOX (vbox), dbbrowser->scrolled_win, TRUE, TRUE, 0);
dbbrowser->clist, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist); gtk_container_add (GTK_CONTAINER (dbbrowser->scrolled_win), dbbrowser->clist);
gtk_widget_show(dbbrowser->clist); gtk_widget_show(dbbrowser->clist);
gtk_widget_show(dbbrowser->scrolled_win); gtk_widget_show(dbbrowser->scrolled_win);
@ -452,8 +453,9 @@ dialog_select (dbbrowser_t *dbbrowser,
if (old_table) gtk_widget_destroy(old_table); if (old_table) gtk_widget_destroy(old_table);
gtk_container_add (GTK_CONTAINER (dbbrowser->descr_scroll), gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (dbbrowser->descr_scroll),
dbbrowser->descr_table ); dbbrowser->descr_table);
gtk_widget_show(dbbrowser->descr_table); gtk_widget_show(dbbrowser->descr_table);
} }

File diff suppressed because it is too large Load Diff

View File

@ -115,7 +115,6 @@ static void server_start (gint port,
static gint execute_command (SFCommand *cmd); static gint execute_command (SFCommand *cmd);
static gint read_from_client (gint filedes); static gint read_from_client (gint filedes);
static gint make_socket (guint port); static gint make_socket (guint port);
static guint clientname_hash (gpointer key);
static void server_log (gchar *format, static void server_log (gchar *format,
...); ...);
static void server_quit (void); static void server_quit (void);
@ -296,7 +295,7 @@ server_start (gint port,
SFCommand *cmd; SFCommand *cmd;
/* Set up the clientname hash table */ /* Set up the clientname hash table */
clientname_ht = g_hash_table_new (clientname_hash, NULL); clientname_ht = g_hash_table_new (g_direct_hash, NULL);
/* Setup up the server log file */ /* Setup up the server log file */
if (logfile) if (logfile)
@ -502,12 +501,6 @@ make_socket (guint port)
return sock; return sock;
} }
static guint
clientname_hash (gpointer key)
{
return (int) key;
}
static void static void
server_log (gchar *format, ...) server_log (gchar *format, ...)
{ {