diff --git a/ChangeLog b/ChangeLog index ad877f6684..59a0ceaeda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri May 29 23:54:42 PDT 1998 Manish Singh + + * more changes to use g_message. All of app uses it now, plus + the major file plugins. + + * plug-ins/CEL/CEL.c: update from author + + * INSTALL: info about why optional plugins won't build + Sat May 30 02:03:19 EDT 1998 Matthew Wilson * plug-ins/grid/grid.c: fix by sjburges to fix grid on selections. diff --git a/INSTALL b/INSTALL index da5f51c905..cc98577ffe 100644 --- a/INSTALL +++ b/INSTALL @@ -115,6 +115,33 @@ After fixing a problem, it is safest to delete the file 'config.cache' before re-running ./configure. + +When ./configure fails on plug-ins +================================== + +There are some GIMP plug-ins that need additional third-party libraries +installed on your system. For example to compile the plug-ins that load +and save JPEG, PNG or TIFF files you need the related libraries and header +files installed, otherwise you'll get a message that plugin xyz will not +be build. + +If you are sure that those libraries are correctly installed, but configure +fails to detect them, the following might help: + +Set your LDFLAGS environment variable to look for the library in a certain +place, e.g. if you are working in a bash shell you would say: + export LDFLAGS="-L -L" +before you run configure. + +Set your CPPFLAGS environment variable to look for the header file in a +certain place, e.g. if you are working in a bash shell you would say: + export CPPFLAGS="-I -I" +before you run configure. + +It's wise to remove the file 'config.cache' before re-running configure. + + + Generic Instructions for Building Auto-Configured Packages ========================================================== diff --git a/app/about_dialog.c b/app/about_dialog.c index 790d0156d7..6d124181df 100644 --- a/app/about_dialog.c +++ b/app/about_dialog.c @@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window) sprintf (buf, "%s/gimp_logo.ppm", DATADIR); - fp = fopen (buf, "r"); + fp = fopen (buf, "rb"); if (!fp) return 0; diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c index ff25e8be85..7907f73dcd 100644 --- a/app/actions/plug-in-commands.c +++ b/app/actions/plug-in-commands.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/app_procs.c b/app/app_procs.c index 88c2048a11..061af08fd8 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -516,7 +516,8 @@ app_init (void) render_setup (transparency_type, transparency_size); tools_options_dialog_new (); tools_select (RECT_SELECT); - g_set_message_handler (&message_box_func); + if (console_messages == FALSE) + g_set_message_handler (&message_box_func); } color_transfer_init (); @@ -539,6 +540,8 @@ app_exit_finish (void) return; is_app_exit_finish_done = TRUE; + g_set_message_handler (&message_console_func); + lc_dialog_free (); gdisplays_delete (); global_edit_free (); diff --git a/app/appenv.h b/app/appenv.h index a186391196..82ef2840a1 100644 --- a/app/appenv.h +++ b/app/appenv.h @@ -33,5 +33,7 @@ extern int no_splash; extern int no_splash_image; extern int no_data; extern int be_verbose; +extern int use_debug_handler; +extern int console_messages; #endif /* APPENV_H */ diff --git a/app/base/boundary.c b/app/base/boundary.c index dbd1d04ae3..bc3126651a 100644 --- a/app/base/boundary.c +++ b/app/base/boundary.c @@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs, } if (x != startx || y != starty) - g_warning ("Unconnected boundary group!"); + g_message ("sort_boundary(): Unconnected boundary group!"); /* Mark the end of a group */ *num_groups = *num_groups + 1; diff --git a/app/base/color-balance.c b/app/base/color-balance.c index 00e762e34d..bc2eddd90c 100644 --- a/app/base/color-balance.c +++ b/app/base/color-balance.c @@ -621,7 +621,7 @@ static void color_balance_preview (ColorBalanceDialog *cbd) { if (!cbd->image_map) - g_warning ("No image map"); + g_message ("color_balance_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (cbd->image_map, color_balance, (void *) cbd); active_tool->preserve = FALSE; diff --git a/app/base/curves.c b/app/base/curves.c index e5c24c8afc..8b37fbe0d7 100644 --- a/app/base/curves.c +++ b/app/base/curves.c @@ -817,7 +817,7 @@ static void curves_preview (CurvesDialog *cd) { if (!cd->image_map) - g_warning ("No image map"); + g_message ("curves_preview(): No image map"); active_tool->preserve = TRUE; /* Going to dirty the display... */ diff --git a/app/base/hue-saturation.c b/app/base/hue-saturation.c index 96df37dcce..768e7ec231 100644 --- a/app/base/hue-saturation.c +++ b/app/base/hue-saturation.c @@ -734,7 +734,7 @@ static void hue_saturation_preview (HueSaturationDialog *hsd) { if (!hsd->image_map) - g_warning ("No image map"); + g_message ("hue_saturation_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (hsd->image_map, hue_saturation, (void *) hsd); active_tool->preserve = FALSE; diff --git a/app/base/threshold.c b/app/base/threshold.c index 8c89bb0193..bf5bd63886 100644 --- a/app/base/threshold.c +++ b/app/base/threshold.c @@ -488,7 +488,7 @@ static void threshold_preview (ThresholdDialog *td) { if (!td->image_map) - g_warning ("No image map"); + g_message ("threshold_preview(): No image map"); image_map_apply (td->image_map, threshold, (void *) td); } diff --git a/app/base/tile-swap.c b/app/base/tile-swap.c index f5c5d06872..13fd439c5a 100644 --- a/app/base/tile-swap.c +++ b/app/base/tile-swap.c @@ -252,7 +252,7 @@ tile_swap_command (Tile *tile, swap_file = g_hash_table_lookup (swap_files, &tile->swap_num); if (!swap_file) { - g_warning ("could not find swap file for tile"); + g_message ("could not find swap file for tile"); return; } @@ -287,7 +287,7 @@ tile_swap_open (SwapFile *swap_file) swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); if (swap_file->fd == -1) { - g_warning ("unable to open swap file...BAD THINGS WILL HAPPEN SOON"); + g_message ("unable to open swap file...BAD THINGS WILL HAPPEN SOON"); return; } @@ -326,7 +326,7 @@ tile_swap_default (int fd, tile_swap_default_delete (def_swap_file, fd, tile); break; case SWAP_COMPRESS: - g_warning ("tile_swap_default: SWAP_COMPRESS: UNFINISHED"); + g_message ("tile_swap_default: SWAP_COMPRESS: UNFINISHED"); break; } @@ -352,7 +352,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file, offset = lseek (fd, tile->swap_offset, SEEK_SET); if (offset == -1) { - g_warning ("unable to seek to tile location on disk: %d", err); + g_message ("unable to seek to tile location on disk: %d", err); return; } } @@ -369,7 +369,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file, if (err <= 0) { - g_warning ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft); + g_message ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft); return; } @@ -407,7 +407,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file, offset = lseek (fd, tile->swap_offset, SEEK_SET); if (offset == -1) { - g_warning ("unable to seek to tile location on disk: %d", errno); + g_message ("unable to seek to tile location on disk: %d", errno); return; } } @@ -418,7 +418,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file, err = write (fd, tile->data + rbytes - nleft, nleft); if (err <= 0) { - g_warning ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft); + g_message ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft); return; } diff --git a/app/boundary.c b/app/boundary.c index dbd1d04ae3..bc3126651a 100644 --- a/app/boundary.c +++ b/app/boundary.c @@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs, } if (x != startx || y != starty) - g_warning ("Unconnected boundary group!"); + g_message ("sort_boundary(): Unconnected boundary group!"); /* Mark the end of a group */ *num_groups = *num_groups + 1; diff --git a/app/brightness_contrast.c b/app/brightness_contrast.c index 52b57b3e3d..915c5f18c5 100644 --- a/app/brightness_contrast.c +++ b/app/brightness_contrast.c @@ -483,7 +483,7 @@ static void brightness_contrast_preview (BrightnessContrastDialog *bcd) { if (!bcd->image_map) - g_warning ("No image map"); + g_message ("brightness_contrast_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd); active_tool->preserve = FALSE; diff --git a/app/brush_select.c b/app/brush_select.c index 7702d1a0b3..54b8bb9349 100644 --- a/app/brush_select.c +++ b/app/brush_select.c @@ -736,7 +736,7 @@ brush_select_events (GtkWidget *widget, } break; case GDK_DELETE: - g_warning ("test"); + /* g_warning ("test"); */ break; default: diff --git a/app/color_balance.c b/app/color_balance.c index 00e762e34d..bc2eddd90c 100644 --- a/app/color_balance.c +++ b/app/color_balance.c @@ -621,7 +621,7 @@ static void color_balance_preview (ColorBalanceDialog *cbd) { if (!cbd->image_map) - g_warning ("No image map"); + g_message ("color_balance_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (cbd->image_map, color_balance, (void *) cbd); active_tool->preserve = FALSE; diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c index fa19305d89..270a3fb85a 100644 --- a/app/core/gimpimagemap.c +++ b/app/core/gimpimagemap.c @@ -278,7 +278,7 @@ image_map_abort (ImageMap image_map) /* if the user has changed the image depth get out quickly */ if (destPR.bytes != srcPR.bytes) { - g_warning ("image depth change, unable to restore original image"); + g_message ("image depth change, unable to restore original image"); tile_manager_destroy (_image_map->undo_tiles); g_free (_image_map); return; diff --git a/app/curves.c b/app/curves.c index e5c24c8afc..8b37fbe0d7 100644 --- a/app/curves.c +++ b/app/curves.c @@ -817,7 +817,7 @@ static void curves_preview (CurvesDialog *cd) { if (!cd->image_map) - g_warning ("No image map"); + g_message ("curves_preview(): No image map"); active_tool->preserve = TRUE; /* Going to dirty the display... */ diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c index 790d0156d7..6d124181df 100644 --- a/app/dialogs/about-dialog.c +++ b/app/dialogs/about-dialog.c @@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window) sprintf (buf, "%s/gimp_logo.ppm", DATADIR); - fp = fopen (buf, "r"); + fp = fopen (buf, "rb"); if (!fp) return 0; diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index 8cef163492..7327c0b7e9 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback) filename = gimp_directory (); if ('\000' == filename[0]) { - g_warning ("No home directory--skipping GIMP user installation."); + g_message ("No home directory--skipping GIMP user installation."); (* install_callback) (); } diff --git a/app/display/gimpdisplay-render.c b/app/display/gimpdisplay-render.c index 7e9a64297a..aa7b778d40 100644 --- a/app/display/gimpdisplay-render.c +++ b/app/display/gimpdisplay-render.c @@ -276,14 +276,14 @@ render_image (GDisplay *gdisp, image_type = gimage_projection_type (gdisp->gimage); if ((image_type < 0) || (image_type > 5)) { - g_warning ("unknown gimage projection type: %d", + g_message ("unknown gimage projection type: %d", gimage_projection_type (gdisp->gimage)); return; } if ((info.dest_bpp < 1) || (info.dest_bpp > 4)) { - g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp); + g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp); return; } diff --git a/app/display/gimpdisplayshell-render.c b/app/display/gimpdisplayshell-render.c index 7e9a64297a..aa7b778d40 100644 --- a/app/display/gimpdisplayshell-render.c +++ b/app/display/gimpdisplayshell-render.c @@ -276,14 +276,14 @@ render_image (GDisplay *gdisp, image_type = gimage_projection_type (gdisp->gimage); if ((image_type < 0) || (image_type > 5)) { - g_warning ("unknown gimage projection type: %d", + g_message ("unknown gimage projection type: %d", gimage_projection_type (gdisp->gimage)); return; } if ((info.dest_bpp < 1) || (info.dest_bpp > 4)) { - g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp); + g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp); return; } diff --git a/app/errors.c b/app/errors.c index 21eea144ae..587564082e 100644 --- a/app/errors.c +++ b/app/errors.c @@ -25,17 +25,17 @@ #include #include +#include "appenv.h" #include "app_procs.h" #include "interface.h" #include "errors.h" extern char *prog_name; -extern int use_debug_handler; void message_console_func (char *str) { - g_print ("%s: %s\n", prog_name, str); + fprintf (stderr, "%s: %s\n", prog_name, str); } void diff --git a/app/fileops.c b/app/fileops.c index deaa4b23ac..341ae448a9 100644 --- a/app/fileops.c +++ b/app/fileops.c @@ -392,7 +392,7 @@ register_magic_load_handler_invoker (Argument *args) (proc->args[2].arg_type != PDB_STRING) || (proc->values[0].arg_type != PDB_IMAGE))) { - g_warning ("load handler \"%s\" does not take the standard load handler args", + g_message ("load handler \"%s\" does not take the standard load handler args", (char*) args[0].value.pdb_pointer); goto done; } @@ -404,7 +404,7 @@ register_magic_load_handler_invoker (Argument *args) if (!file_proc) { - g_warning ("attempt to register non-existant load handler \"%s\"", + g_message ("attempt to register non-existant load handler \"%s\"", (char*) args[0].value.pdb_pointer); goto done; } @@ -438,7 +438,7 @@ register_save_handler_invoker (Argument *args) (proc->args[3].arg_type != PDB_STRING) || (proc->args[4].arg_type != PDB_STRING))) { - g_warning ("save handler \"%s\" does not take the standard save handler args", + g_message ("save handler \"%s\" does not take the standard save handler args", (char*) args[0].value.pdb_pointer); goto done; } @@ -450,7 +450,7 @@ register_save_handler_invoker (Argument *args) if (!file_proc) { - g_warning ("attempt to register non-existant save handler \"%s\"", + g_message ("attempt to register non-existant save handler \"%s\"", (char*) args[0].value.pdb_pointer); goto done; } diff --git a/app/gimprc.c b/app/gimprc.c index 66748d9602..de471d4cda 100644 --- a/app/gimprc.c +++ b/app/gimprc.c @@ -253,7 +253,7 @@ gimp_directory () gimp_dir[len_env_home_dir] = '/'; } else - g_warning ("No home directory."); + g_message ("warning: no home directory."); strncpy (&gimp_dir[len_env_home_dir+1], env_gimp_dir, @@ -268,7 +268,7 @@ gimp_directory () gimp_dir[len_env_home_dir] = '/'; } else - g_warning ("No home directory."); + g_message ("warning: no home directory."); strncpy (&gimp_dir[len_env_home_dir+1], GIMPDIR, @@ -1060,7 +1060,7 @@ parse_plug_in_def (gpointer val1p, return OK; error: - g_warning ("error parsing pluginrc"); + g_message ("error parsing pluginrc"); tmp_list = plug_in_def->proc_defs; while (tmp_list) { diff --git a/app/gui/about-dialog.c b/app/gui/about-dialog.c index 790d0156d7..6d124181df 100644 --- a/app/gui/about-dialog.c +++ b/app/gui/about-dialog.c @@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window) sprintf (buf, "%s/gimp_logo.ppm", DATADIR); - fp = fopen (buf, "r"); + fp = fopen (buf, "rb"); if (!fp) return 0; diff --git a/app/gui/brush-select.c b/app/gui/brush-select.c index 7702d1a0b3..54b8bb9349 100644 --- a/app/gui/brush-select.c +++ b/app/gui/brush-select.c @@ -736,7 +736,7 @@ brush_select_events (GtkWidget *widget, } break; case GDK_DELETE: - g_warning ("test"); + /* g_warning ("test"); */ break; default: diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 9b5a6c0dea..d53c355241 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -825,7 +825,7 @@ layers_dialog_update (int gimage_id) layer_widget_delete (lw); } if (layersD->layer_widgets) - g_warning ("layersD->layer_widgets not empty!"); + g_message ("layersD->layer_widgets not empty!"); layersD->layer_widgets = NULL; if (! (gimage = gimage_get_ID (layersD->gimage_id))) diff --git a/app/gui/menus.c b/app/gui/menus.c index 7d7b18d48b..25ff8baecf 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -316,7 +316,7 @@ menus_set_sensitive (char *path, if (menu_path) gtk_widget_set_sensitive (menu_path->widget, sensitive); else - g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path); + g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path); } void @@ -335,7 +335,7 @@ menus_set_state (char *path, gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state); } else - g_warning ("Unable to set state for menu which doesn't exist: %s", path); + g_message ("Unable to set state for menu which doesn't exist: %s", path); } void diff --git a/app/gui/plug-in-commands.c b/app/gui/plug-in-commands.c index ff25e8be85..7907f73dcd 100644 --- a/app/gui/plug-in-commands.c +++ b/app/gui/plug-in-commands.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c index ff25e8be85..7907f73dcd 100644 --- a/app/gui/plug-in-menus.c +++ b/app/gui/plug-in-menus.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index 8cef163492..7327c0b7e9 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback) filename = gimp_directory (); if ('\000' == filename[0]) { - g_warning ("No home directory--skipping GIMP user installation."); + g_message ("No home directory--skipping GIMP user installation."); (* install_callback) (); } diff --git a/app/hue_saturation.c b/app/hue_saturation.c index 96df37dcce..768e7ec231 100644 --- a/app/hue_saturation.c +++ b/app/hue_saturation.c @@ -734,7 +734,7 @@ static void hue_saturation_preview (HueSaturationDialog *hsd) { if (!hsd->image_map) - g_warning ("No image map"); + g_message ("hue_saturation_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (hsd->image_map, hue_saturation, (void *) hsd); active_tool->preserve = FALSE; diff --git a/app/image_map.c b/app/image_map.c index fa19305d89..270a3fb85a 100644 --- a/app/image_map.c +++ b/app/image_map.c @@ -278,7 +278,7 @@ image_map_abort (ImageMap image_map) /* if the user has changed the image depth get out quickly */ if (destPR.bytes != srcPR.bytes) { - g_warning ("image depth change, unable to restore original image"); + g_message ("image depth change, unable to restore original image"); tile_manager_destroy (_image_map->undo_tiles); g_free (_image_map); return; diff --git a/app/image_render.c b/app/image_render.c index 7e9a64297a..aa7b778d40 100644 --- a/app/image_render.c +++ b/app/image_render.c @@ -276,14 +276,14 @@ render_image (GDisplay *gdisp, image_type = gimage_projection_type (gdisp->gimage); if ((image_type < 0) || (image_type > 5)) { - g_warning ("unknown gimage projection type: %d", + g_message ("unknown gimage projection type: %d", gimage_projection_type (gdisp->gimage)); return; } if ((info.dest_bpp < 1) || (info.dest_bpp > 4)) { - g_warning ("unsupported destination bytes per pixel: %d", info.dest_bpp); + g_message ("unsupported destination bytes per pixel: %d", info.dest_bpp); return; } diff --git a/app/install.c b/app/install.c index 8cef163492..7327c0b7e9 100644 --- a/app/install.c +++ b/app/install.c @@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback) filename = gimp_directory (); if ('\000' == filename[0]) { - g_warning ("No home directory--skipping GIMP user installation."); + g_message ("No home directory--skipping GIMP user installation."); (* install_callback) (); } diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 9b5a6c0dea..d53c355241 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -825,7 +825,7 @@ layers_dialog_update (int gimage_id) layer_widget_delete (lw); } if (layersD->layer_widgets) - g_warning ("layersD->layer_widgets not empty!"); + g_message ("layersD->layer_widgets not empty!"); layersD->layer_widgets = NULL; if (! (gimage = gimage_get_ID (layersD->gimage_id))) diff --git a/app/main.c b/app/main.c index 0c6094ecb3..6edfc9074c 100644 --- a/app/main.c +++ b/app/main.c @@ -47,6 +47,7 @@ int no_splash_image; int be_verbose; int use_shm; int use_debug_handler; +int console_messages; char *prog_name; /* The path name we are invoked with */ char **batch_cmds; @@ -106,6 +107,7 @@ main (int argc, char **argv) no_splash_image = FALSE; use_shm = TRUE; use_debug_handler = FALSE; + console_messages = FALSE; batch_cmds = g_new (char*, argc); batch_cmds[0] = NULL; @@ -165,6 +167,10 @@ main (int argc, char **argv) { use_debug_handler = TRUE; } + else if (strcmp (argv[i], "--console-messages") == 0) + { + console_messages = TRUE; + } /* * ANYTHING ELSE starting with a '-' is an error. */ @@ -191,6 +197,7 @@ main (int argc, char **argv) g_print (" --no-splash-image Do not add an image to the startup window.\n"); g_print (" --no-shm Do not use shared memory between GIMP and its plugins.\n"); g_print (" --no-xshm Do not use the X Shared Memory extension.\n"); + g_print (" --console-messages Display warnings to console instead of a dialog box.\n"); g_print (" --debug-handlers Enable debugging signal handlers.\n"); g_print (" --display Use the designated X display.\n\n"); diff --git a/app/menus.c b/app/menus.c index 7d7b18d48b..25ff8baecf 100644 --- a/app/menus.c +++ b/app/menus.c @@ -316,7 +316,7 @@ menus_set_sensitive (char *path, if (menu_path) gtk_widget_set_sensitive (menu_path->widget, sensitive); else - g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path); + g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path); } void @@ -335,7 +335,7 @@ menus_set_state (char *path, gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state); } else - g_warning ("Unable to set state for menu which doesn't exist: %s", path); + g_message ("Unable to set state for menu which doesn't exist: %s", path); } void diff --git a/app/menus/menus.c b/app/menus/menus.c index 7d7b18d48b..25ff8baecf 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -316,7 +316,7 @@ menus_set_sensitive (char *path, if (menu_path) gtk_widget_set_sensitive (menu_path->widget, sensitive); else - g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path); + g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path); } void @@ -335,7 +335,7 @@ menus_set_state (char *path, gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state); } else - g_warning ("Unable to set state for menu which doesn't exist: %s", path); + g_message ("Unable to set state for menu which doesn't exist: %s", path); } void diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index ff25e8be85..7907f73dcd 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c index 43b4aabafe..4a4893e551 100644 --- a/app/paint-funcs/paint-funcs.c +++ b/app/paint-funcs/paint-funcs.c @@ -883,7 +883,7 @@ replace_pixels (unsigned char *src1, if (b1 != b2) { - g_warning ("replace_pixels only works on commensurate pixel regions"); + g_message ("replace_pixels only works on commensurate pixel regions"); return; } diff --git a/app/paint_core.c b/app/paint_core.c index e69982c8a3..87155ba798 100644 --- a/app/paint_core.c +++ b/app/paint_core.c @@ -899,7 +899,7 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci if (mode != INCREMENTAL) { - g_warning ("paint_core_replace only works in INCREMENTAL mode"); + g_message ("paint_core_replace only works in INCREMENTAL mode"); return; } diff --git a/app/paint_funcs.c b/app/paint_funcs.c index 43b4aabafe..4a4893e551 100644 --- a/app/paint_funcs.c +++ b/app/paint_funcs.c @@ -883,7 +883,7 @@ replace_pixels (unsigned char *src1, if (b1 != b2) { - g_warning ("replace_pixels only works on commensurate pixel regions"); + g_message ("replace_pixels only works on commensurate pixel regions"); return; } diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimpplugin-message.c +++ b/app/plug-in/gimpplugin-message.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimpplugin-progress.c +++ b/app/plug-in/gimpplugin-progress.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimpplugin.c +++ b/app/plug-in/gimpplugin.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimppluginmanager-call.c +++ b/app/plug-in/gimppluginmanager-call.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimppluginmanager-run.c b/app/plug-in/gimppluginmanager-run.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimppluginmanager-run.c +++ b/app/plug-in/gimppluginmanager-run.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/gimppluginshm.c b/app/plug-in/gimppluginshm.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/gimppluginshm.c +++ b/app/plug-in/gimppluginshm.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-def.c b/app/plug-in/plug-in-def.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-def.c +++ b/app/plug-in/plug-in-def.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-message.c b/app/plug-in/plug-in-message.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-message.c +++ b/app/plug-in/plug-in-message.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-progress.c b/app/plug-in/plug-in-progress.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-progress.c +++ b/app/plug-in/plug-in-progress.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-run.c b/app/plug-in/plug-in-run.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-run.c +++ b/app/plug-in/plug-in-run.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in-shm.c b/app/plug-in/plug-in-shm.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in-shm.c +++ b/app/plug-in/plug-in-shm.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-in.c b/app/plug-in/plug-in.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-in.c +++ b/app/plug-in/plug-in.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug-in/plug-ins.c b/app/plug-in/plug-ins.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug-in/plug-ins.c +++ b/app/plug-in/plug-ins.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/plug_in.c b/app/plug_in.c index ff25e8be85..7907f73dcd 100644 --- a/app/plug_in.c +++ b/app/plug_in.c @@ -242,13 +242,13 @@ plug_in_init () { shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); if (shm_ID == -1) - g_warning ("shmget failed...disabling shared memory tile transport\n"); + g_message ("shmget failed...disabling shared memory tile transport\n"); else { shm_addr = (guchar*) shmat (shm_ID, 0, 0); if (shm_addr == (guchar*) -1) { - g_warning ("shmat failed...disabling shared memory tile transport\n"); + g_message ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } @@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) plug_in_handle_quit (); break; case GP_CONFIG: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_REQ: plug_in_handle_tile_req (msg->data); break; case GP_TILE_ACK: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TILE_DATA: - g_warning ("received a config message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a config message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_PROC_RUN: @@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) plug_in_close (current_plug_in, FALSE); break; case GP_TEMP_PROC_RUN: - g_warning ("received a temp proc run message (should not happen)\n"); + g_message ("plug_in_handle_message(): received a temp proc run message (should not happen)\n"); plug_in_close (current_plug_in, TRUE); break; case GP_TEMP_PROC_RETURN: @@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_DATA) { - g_warning ("expected tile data and received: %d\n", msg.type); + g_message ("expected tile data and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_info->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) wire_destroy (&msg); if (!gp_tile_ack_write (current_writefd)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!tm) { - g_warning ("plug-in requested invalid drawable (killing)\n"); + g_message ("plug-in requested invalid drawable (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) tile = tile_manager_get (tm, tile_req->tile_num, 0); if (!tile) { - g_warning ("plug-in requested invalid tile (killing)\n"); + g_message ("plug-in requested invalid tile (killing)\n"); plug_in_close (current_plug_in, TRUE); return; } @@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!gp_tile_data_write (current_writefd, &tile_data)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) if (!wire_read_msg (current_readfd, &msg)) { - g_warning ("plug_in_handle_tile_req: ERROR"); + g_message ("plug_in_handle_tile_req: ERROR"); plug_in_close (current_plug_in, TRUE); return; } if (msg.type != GP_TILE_ACK) { - g_warning ("expected tile ack and received: %d\n", msg.type); + g_message ("expected tile ack and received: %d\n", msg.type); plug_in_close (current_plug_in, TRUE); return; } @@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!proc_rec) { /* THIS IS PROBABLY NOT CORRECT -josh */ - g_warning ("PDB lookup failed on %s\n", proc_run->name); + g_message ("PDB lookup failed on %s\n", proc_run->name); plug_in_args_destroy (args, proc_run->nparams, FALSE); return; } @@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) if (!gp_proc_return_write (current_writefd, &proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) plug_in_push (blocked->plug_in); if (!gp_proc_return_write (current_writefd, proc_return)) { - g_warning ("plug_in_handle_proc_run: ERROR"); + g_message ("plug_in_handle_proc_run: ERROR"); plug_in_close (current_plug_in, TRUE); return; } @@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) if ((proc_install->nparams < 1) || (proc_install->params[0].type != PDB_INT32)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[2].type != PDB_DRAWABLE)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[1].type != PDB_STRING) || (proc_install->params[2].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) (proc_install->params[3].type != PDB_STRING) || (proc_install->params[4].type != PDB_STRING)) { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" which " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" which " "does not take the standard plug-in args", current_plug_in->args[0], proc_install->name); return; @@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) } else { - g_warning ("plug-in \"%s\" attempted to install procedure \"%s\" in " + g_message ("plug-in \"%s\" attempted to install procedure \"%s\" in " "an invalid menu location. Use either \"\", \"\", " "\"\", or \"\".", current_plug_in->args[0], proc_install->name); @@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i-1].type != PDB_INT32) { - g_warning ("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 " "passing standard. Argument %d is noncompliant.", current_plug_in->args[0], proc_install->name, i); @@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the plug-in!"); + g_message ("Uh-oh, no active gdisplay for the plug-in!"); g_free (args); return; } @@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, } else { - g_warning ("Uh-oh, no active gdisplay for the temporary procedure!"); + g_message ("Uh-oh, no active gdisplay for the temporary procedure!"); g_free (args); return; } @@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, colorarray[2] = params[i].data.d_color.blue; break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: args[i].value.pdb_int = params[i].data.d_display; @@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, } break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: params[i].data.d_display = args[i].value.pdb_int; @@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, case PDB_COLOR: break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: @@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, g_free (args[i].value.pdb_pointer); break; case PDB_REGION: - g_warning ("the \"region\" arg type is not currently supported"); + g_message ("the \"region\" arg type is not currently supported"); break; case PDB_DISPLAY: case PDB_IMAGE: diff --git a/app/posterize.c b/app/posterize.c index 16937de503..46989b149e 100644 --- a/app/posterize.c +++ b/app/posterize.c @@ -356,7 +356,7 @@ static void posterize_preview (PosterizeDialog *pd) { if (!pd->image_map) - g_warning ("No image map"); + g_message ("posterize_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (pd->image_map, posterize, (void *) pd); active_tool->preserve = FALSE; diff --git a/app/procedural_db.c b/app/procedural_db.c index 56e184ddf6..783d06803d 100644 --- a/app/procedural_db.c +++ b/app/procedural_db.c @@ -580,7 +580,7 @@ procedural_db_execute (gchar *name, return_args->arg_type = PDB_STATUS; return_args->value.pdb_int = PDB_CALLING_ERROR; - g_warning ("PDB calling error %s", procedure->name); + g_message ("PDB calling error %s", procedure->name); return return_args; } @@ -656,7 +656,7 @@ procedural_db_run_proc (gchar *name, { if (proc->args[i].arg_type != (params[i].arg_type = va_arg (args, PDBArgType))) { - g_warning ("Incorrect arguments passed to procedural_db_run_proc"); + g_message ("Incorrect arguments passed to procedural_db_run_proc"); g_free (params); return NULL; } diff --git a/app/threshold.c b/app/threshold.c index 8c89bb0193..bf5bd63886 100644 --- a/app/threshold.c +++ b/app/threshold.c @@ -488,7 +488,7 @@ static void threshold_preview (ThresholdDialog *td) { if (!td->image_map) - g_warning ("No image map"); + g_message ("threshold_preview(): No image map"); image_map_apply (td->image_map, threshold, (void *) td); } diff --git a/app/tile_swap.c b/app/tile_swap.c index f5c5d06872..13fd439c5a 100644 --- a/app/tile_swap.c +++ b/app/tile_swap.c @@ -252,7 +252,7 @@ tile_swap_command (Tile *tile, swap_file = g_hash_table_lookup (swap_files, &tile->swap_num); if (!swap_file) { - g_warning ("could not find swap file for tile"); + g_message ("could not find swap file for tile"); return; } @@ -287,7 +287,7 @@ tile_swap_open (SwapFile *swap_file) swap_file->fd = open (swap_file->filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); if (swap_file->fd == -1) { - g_warning ("unable to open swap file...BAD THINGS WILL HAPPEN SOON"); + g_message ("unable to open swap file...BAD THINGS WILL HAPPEN SOON"); return; } @@ -326,7 +326,7 @@ tile_swap_default (int fd, tile_swap_default_delete (def_swap_file, fd, tile); break; case SWAP_COMPRESS: - g_warning ("tile_swap_default: SWAP_COMPRESS: UNFINISHED"); + g_message ("tile_swap_default: SWAP_COMPRESS: UNFINISHED"); break; } @@ -352,7 +352,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file, offset = lseek (fd, tile->swap_offset, SEEK_SET); if (offset == -1) { - g_warning ("unable to seek to tile location on disk: %d", err); + g_message ("unable to seek to tile location on disk: %d", err); return; } } @@ -369,7 +369,7 @@ tile_swap_default_in (DefSwapFile *def_swap_file, if (err <= 0) { - g_warning ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft); + g_message ("unable to read tile data from disk: %d ( %d ) bytes read", err, nleft); return; } @@ -407,7 +407,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file, offset = lseek (fd, tile->swap_offset, SEEK_SET); if (offset == -1) { - g_warning ("unable to seek to tile location on disk: %d", errno); + g_message ("unable to seek to tile location on disk: %d", errno); return; } } @@ -418,7 +418,7 @@ tile_swap_default_out (DefSwapFile *def_swap_file, err = write (fd, tile->data + rbytes - nleft, nleft); if (err <= 0) { - g_warning ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft); + g_message ("unable to write tile data to disk: %d ( %d ) bytes written", err, nleft); return; } diff --git a/app/tools/brightness_contrast.c b/app/tools/brightness_contrast.c index 52b57b3e3d..915c5f18c5 100644 --- a/app/tools/brightness_contrast.c +++ b/app/tools/brightness_contrast.c @@ -483,7 +483,7 @@ static void brightness_contrast_preview (BrightnessContrastDialog *bcd) { if (!bcd->image_map) - g_warning ("No image map"); + g_message ("brightness_contrast_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd); active_tool->preserve = FALSE; diff --git a/app/tools/color_balance.c b/app/tools/color_balance.c index 00e762e34d..bc2eddd90c 100644 --- a/app/tools/color_balance.c +++ b/app/tools/color_balance.c @@ -621,7 +621,7 @@ static void color_balance_preview (ColorBalanceDialog *cbd) { if (!cbd->image_map) - g_warning ("No image map"); + g_message ("color_balance_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (cbd->image_map, color_balance, (void *) cbd); active_tool->preserve = FALSE; diff --git a/app/tools/curves.c b/app/tools/curves.c index e5c24c8afc..8b37fbe0d7 100644 --- a/app/tools/curves.c +++ b/app/tools/curves.c @@ -817,7 +817,7 @@ static void curves_preview (CurvesDialog *cd) { if (!cd->image_map) - g_warning ("No image map"); + g_message ("curves_preview(): No image map"); active_tool->preserve = TRUE; /* Going to dirty the display... */ diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c index 52b57b3e3d..915c5f18c5 100644 --- a/app/tools/gimpbrightnesscontrasttool.c +++ b/app/tools/gimpbrightnesscontrasttool.c @@ -483,7 +483,7 @@ static void brightness_contrast_preview (BrightnessContrastDialog *bcd) { if (!bcd->image_map) - g_warning ("No image map"); + g_message ("brightness_contrast_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd); active_tool->preserve = FALSE; diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c index 00e762e34d..bc2eddd90c 100644 --- a/app/tools/gimpcolorbalancetool.c +++ b/app/tools/gimpcolorbalancetool.c @@ -621,7 +621,7 @@ static void color_balance_preview (ColorBalanceDialog *cbd) { if (!cbd->image_map) - g_warning ("No image map"); + g_message ("color_balance_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (cbd->image_map, color_balance, (void *) cbd); active_tool->preserve = FALSE; diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index e5c24c8afc..8b37fbe0d7 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -817,7 +817,7 @@ static void curves_preview (CurvesDialog *cd) { if (!cd->image_map) - g_warning ("No image map"); + g_message ("curves_preview(): No image map"); active_tool->preserve = TRUE; /* Going to dirty the display... */ diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c index 96df37dcce..768e7ec231 100644 --- a/app/tools/gimphuesaturationtool.c +++ b/app/tools/gimphuesaturationtool.c @@ -734,7 +734,7 @@ static void hue_saturation_preview (HueSaturationDialog *hsd) { if (!hsd->image_map) - g_warning ("No image map"); + g_message ("hue_saturation_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (hsd->image_map, hue_saturation, (void *) hsd); active_tool->preserve = FALSE; diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c index 16937de503..46989b149e 100644 --- a/app/tools/gimpposterizetool.c +++ b/app/tools/gimpposterizetool.c @@ -356,7 +356,7 @@ static void posterize_preview (PosterizeDialog *pd) { if (!pd->image_map) - g_warning ("No image map"); + g_message ("posterize_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (pd->image_map, posterize, (void *) pd); active_tool->preserve = FALSE; diff --git a/app/tools/gimpthresholdtool.c b/app/tools/gimpthresholdtool.c index 8c89bb0193..bf5bd63886 100644 --- a/app/tools/gimpthresholdtool.c +++ b/app/tools/gimpthresholdtool.c @@ -488,7 +488,7 @@ static void threshold_preview (ThresholdDialog *td) { if (!td->image_map) - g_warning ("No image map"); + g_message ("threshold_preview(): No image map"); image_map_apply (td->image_map, threshold, (void *) td); } diff --git a/app/tools/hue_saturation.c b/app/tools/hue_saturation.c index 96df37dcce..768e7ec231 100644 --- a/app/tools/hue_saturation.c +++ b/app/tools/hue_saturation.c @@ -734,7 +734,7 @@ static void hue_saturation_preview (HueSaturationDialog *hsd) { if (!hsd->image_map) - g_warning ("No image map"); + g_message ("hue_saturation_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (hsd->image_map, hue_saturation, (void *) hsd); active_tool->preserve = FALSE; diff --git a/app/tools/paint_core.c b/app/tools/paint_core.c index e69982c8a3..87155ba798 100644 --- a/app/tools/paint_core.c +++ b/app/tools/paint_core.c @@ -899,7 +899,7 @@ paint_core_replace (paint_core, brush_mask, drawable, brush_opacity, image_opaci if (mode != INCREMENTAL) { - g_warning ("paint_core_replace only works in INCREMENTAL mode"); + g_message ("paint_core_replace only works in INCREMENTAL mode"); return; } diff --git a/app/tools/posterize.c b/app/tools/posterize.c index 16937de503..46989b149e 100644 --- a/app/tools/posterize.c +++ b/app/tools/posterize.c @@ -356,7 +356,7 @@ static void posterize_preview (PosterizeDialog *pd) { if (!pd->image_map) - g_warning ("No image map"); + g_message ("posterize_preview(): No image map"); active_tool->preserve = TRUE; image_map_apply (pd->image_map, posterize, (void *) pd); active_tool->preserve = FALSE; diff --git a/app/tools/threshold.c b/app/tools/threshold.c index 8c89bb0193..bf5bd63886 100644 --- a/app/tools/threshold.c +++ b/app/tools/threshold.c @@ -488,7 +488,7 @@ static void threshold_preview (ThresholdDialog *td) { if (!td->image_map) - g_warning ("No image map"); + g_message ("threshold_preview(): No image map"); image_map_apply (td->image_map, threshold, (void *) td); } diff --git a/app/user_install.c b/app/user_install.c index 8cef163492..7327c0b7e9 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -48,7 +48,7 @@ install_verify (InstallCallback install_callback) filename = gimp_directory (); if ('\000' == filename[0]) { - g_warning ("No home directory--skipping GIMP user installation."); + g_message ("No home directory--skipping GIMP user installation."); (* install_callback) (); } diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index 7d7b18d48b..25ff8baecf 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -316,7 +316,7 @@ menus_set_sensitive (char *path, if (menu_path) gtk_widget_set_sensitive (menu_path->widget, sensitive); else - g_warning ("Unable to set sensitivity for menu which doesn't exist: %s", path); + g_message ("Unable to set sensitivity for menu which doesn't exist: %s", path); } void @@ -335,7 +335,7 @@ menus_set_state (char *path, gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (menu_path->widget), state); } else - g_warning ("Unable to set state for menu which doesn't exist: %s", path); + g_message ("Unable to set state for menu which doesn't exist: %s", path); } void diff --git a/app/xcf.c b/app/xcf.c index 655d259c90..f7645eba20 100644 --- a/app/xcf.c +++ b/app/xcf.c @@ -383,7 +383,7 @@ xcf_save_invoker (Argument *args) } else { - g_warning ("open failed on %s: %s\n", filename, g_strerror(errno)); + g_message ("open failed on %s: %s\n", filename, g_strerror(errno)); } return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success); @@ -1380,7 +1380,7 @@ xcf_load_image_props (XcfInfo *info, (compression != COMPRESS_ZLIB) && (compression != COMPRESS_FRACTAL)) { - g_warning ("unknown compression type: %d", (int) compression); + g_message ("unknown compression type: %d", (int) compression); return FALSE; } @@ -1411,7 +1411,7 @@ xcf_load_image_props (XcfInfo *info, } break; default: - g_warning ("unexpected/unknown image property: %d (skipping)", prop_type); + g_message ("unexpected/unknown image property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1484,7 +1484,7 @@ xcf_load_layer_props (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1); break; default: - g_warning ("unexpected/unknown layer property: %d (skipping)", prop_type); + g_message ("unexpected/unknown layer property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1543,7 +1543,7 @@ xcf_load_channel_props (XcfInfo *info, info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3); break; default: - g_warning ("unexpected/unknown channel property: %d (skipping)", prop_type); + g_message ("unexpected/unknown channel property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1818,7 +1818,7 @@ xcf_load_hierarchy (XcfInfo *info, if (offset == 0) { - g_warning ("not enough levels found in hierarchy"); + g_message ("not enough levels found in hierarchy"); return FALSE; } @@ -1843,7 +1843,7 @@ xcf_load_hierarchy (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, &offset, 1); if (offset != 0) { - g_warning ("encountered garbage after reading hierarchy: %d", offset); + g_message ("encountered garbage after reading hierarchy: %d", offset); return FALSE; } @@ -1889,7 +1889,7 @@ xcf_load_level (XcfInfo *info, { if (offset == 0) { - g_warning ("not enough tiles found in level"); + g_message ("not enough tiles found in level"); return FALSE; } @@ -1931,7 +1931,7 @@ xcf_load_level (XcfInfo *info, if (offset != 0) { - g_warning ("encountered garbage after reading level: %d", offset); + g_message ("encountered garbage after reading level: %d", offset); return FALSE; } @@ -2033,7 +2033,7 @@ xcf_load_tile_rle (XcfInfo *info, size -= length; if (size < 0) - g_warning ("xcf: uh oh! xcf rle tile loading error: %d", count); + g_message ("xcf: uh oh! xcf rle tile loading error: %d", count); info->cp += xcf_read_int8 (info->fp, &val, 1); @@ -2082,7 +2082,7 @@ xcf_swap_func (int fd, if (err <= 0) { - g_warning ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft); + g_message ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft); return FALSE; } diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c index 655d259c90..f7645eba20 100644 --- a/app/xcf/xcf.c +++ b/app/xcf/xcf.c @@ -383,7 +383,7 @@ xcf_save_invoker (Argument *args) } else { - g_warning ("open failed on %s: %s\n", filename, g_strerror(errno)); + g_message ("open failed on %s: %s\n", filename, g_strerror(errno)); } return_args = procedural_db_return_args (&xcf_plug_in_save_proc.db_info, success); @@ -1380,7 +1380,7 @@ xcf_load_image_props (XcfInfo *info, (compression != COMPRESS_ZLIB) && (compression != COMPRESS_FRACTAL)) { - g_warning ("unknown compression type: %d", (int) compression); + g_message ("unknown compression type: %d", (int) compression); return FALSE; } @@ -1411,7 +1411,7 @@ xcf_load_image_props (XcfInfo *info, } break; default: - g_warning ("unexpected/unknown image property: %d (skipping)", prop_type); + g_message ("unexpected/unknown image property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1484,7 +1484,7 @@ xcf_load_layer_props (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, (guint32*) &layer->mode, 1); break; default: - g_warning ("unexpected/unknown layer property: %d (skipping)", prop_type); + g_message ("unexpected/unknown layer property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1543,7 +1543,7 @@ xcf_load_channel_props (XcfInfo *info, info->cp += xcf_read_int8 (info->fp, (guint8*) channel->col, 3); break; default: - g_warning ("unexpected/unknown channel property: %d (skipping)", prop_type); + g_message ("unexpected/unknown channel property: %d (skipping)", prop_type); { guint8 buf[16]; @@ -1818,7 +1818,7 @@ xcf_load_hierarchy (XcfInfo *info, if (offset == 0) { - g_warning ("not enough levels found in hierarchy"); + g_message ("not enough levels found in hierarchy"); return FALSE; } @@ -1843,7 +1843,7 @@ xcf_load_hierarchy (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, &offset, 1); if (offset != 0) { - g_warning ("encountered garbage after reading hierarchy: %d", offset); + g_message ("encountered garbage after reading hierarchy: %d", offset); return FALSE; } @@ -1889,7 +1889,7 @@ xcf_load_level (XcfInfo *info, { if (offset == 0) { - g_warning ("not enough tiles found in level"); + g_message ("not enough tiles found in level"); return FALSE; } @@ -1931,7 +1931,7 @@ xcf_load_level (XcfInfo *info, if (offset != 0) { - g_warning ("encountered garbage after reading level: %d", offset); + g_message ("encountered garbage after reading level: %d", offset); return FALSE; } @@ -2033,7 +2033,7 @@ xcf_load_tile_rle (XcfInfo *info, size -= length; if (size < 0) - g_warning ("xcf: uh oh! xcf rle tile loading error: %d", count); + g_message ("xcf: uh oh! xcf rle tile loading error: %d", count); info->cp += xcf_read_int8 (info->fp, &val, 1); @@ -2082,7 +2082,7 @@ xcf_swap_func (int fd, if (err <= 0) { - g_warning ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft); + g_message ("unable to read tile data from xcf file: %d ( %d ) bytes read", err, nleft); return FALSE; } diff --git a/libgimp/gimptile.c b/libgimp/gimptile.c index 63945c5e2a..fc56987bec 100644 --- a/libgimp/gimptile.c +++ b/libgimp/gimptile.c @@ -156,7 +156,7 @@ gimp_tile_get (GTile *tile) if (msg.type != GP_TILE_DATA) { - g_warning ("unexpected message: %d\n", msg.type); + g_message ("unexpected message: %d\n", msg.type); gimp_quit (); } @@ -168,7 +168,7 @@ gimp_tile_get (GTile *tile) (tile_data->height != tile->eheight) || (tile_data->bpp != tile->bpp)) { - g_warning ("received tile info did not match computed tile info\n"); + g_message ("received tile info did not match computed tile info\n"); gimp_quit (); } @@ -212,7 +212,7 @@ gimp_tile_put (GTile *tile) if (msg.type != GP_TILE_DATA) { - g_warning ("unexpected message: %d\n", msg.type); + g_message ("unexpected message: %d\n", msg.type); gimp_quit (); } @@ -240,7 +240,7 @@ gimp_tile_put (GTile *tile) if (msg.type != GP_TILE_ACK) { - g_warning ("unexpected message: %d\n", msg.type); + g_message ("unexpected message: %d\n", msg.type); gimp_quit (); } diff --git a/plug-ins/CEL/CEL.c b/plug-ins/CEL/CEL.c index 25a6187c05..42c6aa9005 100644 --- a/plug-ins/CEL/CEL.c +++ b/plug-ins/CEL/CEL.c @@ -1,5 +1,5 @@ /* cel.c -- KISS CEL file format plug-in for The GIMP - * (copyright) 1997 Nick Lamb (njl195@ecs.soton.ac.uk) + * (copyright) 1997,1998 Nick Lamb (njl195@ecs.soton.ac.uk) * * Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy * of the KISS/GS documentation. Problem reports to the above address @@ -14,10 +14,13 @@ * 0.6 File dialogs, palette handling, better magic behaviour * 0.7 Handle interactivity settings, tidy up * 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released + * 1.1 Oops, #include unistd.h, thanks Tamito Kajiyama + * 1.2 Changed email address, tidied up + * 1.3 Added g_message features, fixed Saving bugs... + * 1.4 Offsets work (needed them for a nice example set) * * Possible future additions: * + Save (perhaps optionally?) the palette in a KCF - * + Support offsets -- like GIF? */ #include @@ -88,7 +91,7 @@ static void query(void) { gimp_install_procedure("file_cel_load", "Loads files in KISS CEL file format", "This plug-in loads individual KISS cell files.", - "Nick Lamb", "Nick Lamb", "April 1998", "/CEL", NULL, PROC_PLUG_IN, + "Nick Lamb", "Nick Lamb", "May 1998", "/CEL", NULL, PROC_PLUG_IN, nload_args, nload_return_vals, load_args, load_return_vals); gimp_register_magic_load_handler("file_cel_load", "cel", @@ -97,7 +100,7 @@ static void query(void) { gimp_install_procedure("file_cel_save", "Saves files in KISS CEL file format", "This plug-in saves individual KISS cell files.", - "Nick Lamb", "Nick Lamb", "April 1998", "/CEL", "INDEXED*", + "Nick Lamb", "Nick Lamb", "May 1998", "/CEL", "INDEXEDA", PROC_PLUG_IN, nsave_args, 0, save_args, NULL); gimp_register_save_handler("file_cel_save", "cel", ""); @@ -175,6 +178,7 @@ static gint32 load_image(char *file, char *brief) { char *progress; /* Title for progress display */ guchar header[32]; /* File header */ int height, width, /* Dimensions of image */ + offx, offy, /* Layer offets */ colours; /* Number of colours */ gint32 image, /* Image */ @@ -192,7 +196,7 @@ static gint32 load_image(char *file, char *brief) { fp = fopen(file, "r"); if (fp == NULL) { - g_print("Can't open file\n"); + g_message("%s\nis not present or is unreadable", file); gimp_quit(); } @@ -208,17 +212,21 @@ static gint32 load_image(char *file, char *brief) { colours= 16; width= header[0] + (256 * header[1]); height= header[2] + (256 * header[3]); + offx= 0; + offy= 0; } else { /* New-style image file, read full header */ fread(header, 28, 1, fp); colours= (1 << header[1]); width= header[4] + (256 * header[5]); height= header[6] + (256 * header[7]); + offx= header[8] + (256 * header[9]); + offy= header[10] + (256 * header[11]); } - image = gimp_image_new(width, height, INDEXED); + image = gimp_image_new(width + offx, height + offy, INDEXED); if (image == -1) { - g_print("Can't allocate new image\n"); + g_message("Can't create a new image"); gimp_quit(); } @@ -229,6 +237,7 @@ static gint32 load_image(char *file, char *brief) { layer = gimp_layer_new(image, "Background", width, height, INDEXEDA_IMAGE, 100, NORMAL_MODE); gimp_image_add_layer(image, layer, 0); + gimp_layer_set_offsets(layer, offx, offy); /* Get the drawable and set the pixel region for our load... */ @@ -248,19 +257,37 @@ static gint32 load_image(char *file, char *brief) { case 16: fread(buffer, (width+1)/2, 1, fp); for (j = 0, k = 0; j < width*2; j+= 4, ++k) { - line[j]= buffer[k] / 16; - line[j+1]= line[j] ? 255 : 0; - line[j+2]= buffer[k] & 15; - line[j+3]= line[j+2] ? 255 : 0; + if (buffer[k] / 16 == 0) { + line[j]= 16; + line[j+1]= 0; + } else { + line[j]= (buffer[k] / 16) - 1; + line[j+1]= 255; + } + if (buffer[k] % 16 == 0) { + line[j+2]= 16; + line[j+3]= 0; + } else { + line[j+2]= (buffer[k] % 16) - 1; + line[j+3]= 255; + } } break; case 256: fread(buffer, width, 1, fp); for (j = 0, k = 0; j < width*2; j+= 2, ++k) { - line[j]= buffer[k]; - line[j+1]= line[j] ? 255 : 0; + if (buffer[k] == 0) { + line[j]= 255; + line[j+1]= 0; + } else { + line[j]= buffer[k] - 1; + line[j+1]= 255; + } } break; + default: + g_error("Unsupported number of colours (%d)\n", colours); + gimp_quit(); } gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1); @@ -270,8 +297,8 @@ static gint32 load_image(char *file, char *brief) { /* Close image files, give back allocated memory */ fclose(fp); - free(buffer); - free(line); + g_free(buffer); + g_free(line); /* Use palette from file or otherwise default grey palette */ palette = g_new(guchar, colours*3); @@ -291,12 +318,12 @@ static gint32 load_image(char *file, char *brief) { } } - gimp_image_set_cmap(image, palette, colours); + gimp_image_set_cmap(image, palette + 3, colours - 1); /* Close palette file, give back allocated memory */ fclose(fp); - free(palette); + g_free(palette); /* Now get everything redrawn and hand back the finished image */ @@ -344,7 +371,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { FILE* fp; /* Write file pointer */ char *progress; /* Title for progress display */ guchar header[32]; /* File header */ - gint colours, type; /* Number of colours, type of layer */ + gint colours, type, /* Number of colours, type of layer */ + offx, offy; /* Layer offsets */ guchar *buffer, /* Temporary buffer */ *line; /* Pixel data */ @@ -355,28 +383,36 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Check that this is an indexed image, fail otherwise */ type= gimp_drawable_type(layer); - if (type != INDEXED_IMAGE && type != INDEXEDA_IMAGE) { - g_print("GIMP tried to save a non-indexed image as CEL.\n"); - return FALSE; + if (type != INDEXEDA_IMAGE) { + g_message("Only an indexed-alpha image can be saved in CEL format"); + gimp_quit(); } + /* Find out how offset this layer was */ + gimp_drawable_offsets(layer, &offx, &offy); + drawable = gimp_drawable_get(layer); /* Open the file for writing */ fp = fopen(file, "w"); + if (fp == NULL) { + g_message("Couldn't write image to\n%s", file); + gimp_quit(); + } + progress= g_malloc(strlen(brief) + 9); sprintf(progress, "Saving %s:", brief); gimp_progress_init(progress); /* Headers */ - memset(header, 0, 32); + bzero(header, 32); strcpy(header, "KiSS"); header[4]= 0x20; /* Work out whether to save as 8bit or 4bit */ gimp_image_get_cmap(image, &colours); - if (colours > 16) { + if (colours > 15) { header[5]= 8; } else { header[5]= 4; @@ -387,6 +423,10 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { header[9]= drawable->width / 256; header[10]= drawable->height % 256; header[11]= drawable->height / 256; + header[12]= offx % 256; + header[13]= offx / 256; + header[14]= offy % 256; + header[15]= offy / 256; fwrite(header, 32, 1, fp); /* Arrange for memory etc. */ @@ -398,21 +438,27 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Get the image from the GIMP one line at a time and write it out */ for (i = 0; i < drawable->height; ++i) { gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1); + memset(buffer, 0, drawable->width); - switch (colours) { - case 16: - for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) { - buffer[k]= 16 * (line[j+1] ? line[j] : 0) - + (line[j+3] ? line[j+2] : 0); - } - fwrite(buffer, (drawable->width+1)/2, 1, fp); - break; - case 256: + if (colours > 16) { for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) { - buffer[k]= line[j+1] ? line[j] : 0; + if (line[j+1] > 127) { + buffer[k]= line[j] + 1; + } } fwrite(buffer, drawable->width, 1, fp); - break; + + } else { + for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) { + buffer[k]= 0; + if (line[j+1] > 127) { + buffer[k]+= (line[j] + 1)<< 4; + } + if (line[j+3] > 127) { + buffer[k]+= (line[j+2] + 1); + } + } + fwrite(buffer, (drawable->width+1)/2, 1, fp); } gimp_progress_update((float) i / (float) drawable->height); @@ -420,8 +466,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Close files, give back allocated memory */ fclose(fp); - free(buffer); - free(line); + g_free(buffer); + g_free(line); return TRUE; } diff --git a/plug-ins/bz2/bz2.c b/plug-ins/bz2/bz2.c index b8fb5a4760..ce3a8e0c5b 100644 --- a/plug-ins/bz2/bz2.c +++ b/plug-ins/bz2/bz2.c @@ -245,24 +245,24 @@ save_image (char *filename, /* fork off a bzip2 process */ if ((pid = fork()) < 0) { - g_warning ("bz2: fork failed: %s\n", g_strerror(errno)); + g_message ("bz2: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { if (!(f = fopen(filename,"w"))){ - g_warning("bz2: fopen failed: %s\n", g_strerror(errno)); + g_message("bz2: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this process be the output file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno)); + g_message ("bz2: dup2 failed: %s\n", g_strerror(errno)); /* and bzip2 into it */ execlp ("bzip2", "bzip2", "-cf", tmpname, NULL); - g_warning ("bz2: exec failed: bzip2: %s\n", g_strerror(errno)); + g_message ("bz2: exec failed: bzip2: %s\n", g_strerror(errno)); _exit(127); } else @@ -272,7 +272,7 @@ save_image (char *filename, if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("bz2: bzip2 exited abnormally on file %s\n", tmpname); + g_message ("bz2: bzip2 exited abnormally on file %s\n", tmpname); return 0; } } @@ -305,24 +305,24 @@ load_image (char *filename, gint32 run_mode) /* fork off a g(un)zip and wait for it */ if ((pid = fork()) < 0) { - g_warning ("bz2: fork failed: %s\n", g_strerror(errno)); + g_message ("bz2: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) /* child process */ { FILE* f; if (!(f = fopen(tmpname,"w"))){ - g_warning("bz2: fopen failed: %s\n", g_strerror(errno)); + g_message("bz2: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this child process be the temp file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno)); + g_message ("bz2: dup2 failed: %s\n", g_strerror(errno)); /* and unzip into it */ execlp ("bzip2", "bzip2", "-cfd", filename, NULL); - g_warning ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno)); + g_message ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno)); _exit(127); } else /* parent process */ @@ -332,7 +332,7 @@ load_image (char *filename, gint32 run_mode) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("bz2: bzip2 exited abnormally on file %s\n", filename); + g_message ("bz2: bzip2 exited abnormally on file %s\n", filename); return -1; } } @@ -386,7 +386,7 @@ static char* find_extension (char* filename) while (1) { if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("bz2: can't open bzip2ed file without a sensible extension\n"); + g_message ("bz2: can't open bzip2ed file without a sensible extension\n"); return NULL; } if (0 == strcmp(ext, ".xcfbz2")) { diff --git a/plug-ins/common/CEL.c b/plug-ins/common/CEL.c index 25a6187c05..42c6aa9005 100644 --- a/plug-ins/common/CEL.c +++ b/plug-ins/common/CEL.c @@ -1,5 +1,5 @@ /* cel.c -- KISS CEL file format plug-in for The GIMP - * (copyright) 1997 Nick Lamb (njl195@ecs.soton.ac.uk) + * (copyright) 1997,1998 Nick Lamb (njl195@ecs.soton.ac.uk) * * Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy * of the KISS/GS documentation. Problem reports to the above address @@ -14,10 +14,13 @@ * 0.6 File dialogs, palette handling, better magic behaviour * 0.7 Handle interactivity settings, tidy up * 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released + * 1.1 Oops, #include unistd.h, thanks Tamito Kajiyama + * 1.2 Changed email address, tidied up + * 1.3 Added g_message features, fixed Saving bugs... + * 1.4 Offsets work (needed them for a nice example set) * * Possible future additions: * + Save (perhaps optionally?) the palette in a KCF - * + Support offsets -- like GIF? */ #include @@ -88,7 +91,7 @@ static void query(void) { gimp_install_procedure("file_cel_load", "Loads files in KISS CEL file format", "This plug-in loads individual KISS cell files.", - "Nick Lamb", "Nick Lamb", "April 1998", "/CEL", NULL, PROC_PLUG_IN, + "Nick Lamb", "Nick Lamb", "May 1998", "/CEL", NULL, PROC_PLUG_IN, nload_args, nload_return_vals, load_args, load_return_vals); gimp_register_magic_load_handler("file_cel_load", "cel", @@ -97,7 +100,7 @@ static void query(void) { gimp_install_procedure("file_cel_save", "Saves files in KISS CEL file format", "This plug-in saves individual KISS cell files.", - "Nick Lamb", "Nick Lamb", "April 1998", "/CEL", "INDEXED*", + "Nick Lamb", "Nick Lamb", "May 1998", "/CEL", "INDEXEDA", PROC_PLUG_IN, nsave_args, 0, save_args, NULL); gimp_register_save_handler("file_cel_save", "cel", ""); @@ -175,6 +178,7 @@ static gint32 load_image(char *file, char *brief) { char *progress; /* Title for progress display */ guchar header[32]; /* File header */ int height, width, /* Dimensions of image */ + offx, offy, /* Layer offets */ colours; /* Number of colours */ gint32 image, /* Image */ @@ -192,7 +196,7 @@ static gint32 load_image(char *file, char *brief) { fp = fopen(file, "r"); if (fp == NULL) { - g_print("Can't open file\n"); + g_message("%s\nis not present or is unreadable", file); gimp_quit(); } @@ -208,17 +212,21 @@ static gint32 load_image(char *file, char *brief) { colours= 16; width= header[0] + (256 * header[1]); height= header[2] + (256 * header[3]); + offx= 0; + offy= 0; } else { /* New-style image file, read full header */ fread(header, 28, 1, fp); colours= (1 << header[1]); width= header[4] + (256 * header[5]); height= header[6] + (256 * header[7]); + offx= header[8] + (256 * header[9]); + offy= header[10] + (256 * header[11]); } - image = gimp_image_new(width, height, INDEXED); + image = gimp_image_new(width + offx, height + offy, INDEXED); if (image == -1) { - g_print("Can't allocate new image\n"); + g_message("Can't create a new image"); gimp_quit(); } @@ -229,6 +237,7 @@ static gint32 load_image(char *file, char *brief) { layer = gimp_layer_new(image, "Background", width, height, INDEXEDA_IMAGE, 100, NORMAL_MODE); gimp_image_add_layer(image, layer, 0); + gimp_layer_set_offsets(layer, offx, offy); /* Get the drawable and set the pixel region for our load... */ @@ -248,19 +257,37 @@ static gint32 load_image(char *file, char *brief) { case 16: fread(buffer, (width+1)/2, 1, fp); for (j = 0, k = 0; j < width*2; j+= 4, ++k) { - line[j]= buffer[k] / 16; - line[j+1]= line[j] ? 255 : 0; - line[j+2]= buffer[k] & 15; - line[j+3]= line[j+2] ? 255 : 0; + if (buffer[k] / 16 == 0) { + line[j]= 16; + line[j+1]= 0; + } else { + line[j]= (buffer[k] / 16) - 1; + line[j+1]= 255; + } + if (buffer[k] % 16 == 0) { + line[j+2]= 16; + line[j+3]= 0; + } else { + line[j+2]= (buffer[k] % 16) - 1; + line[j+3]= 255; + } } break; case 256: fread(buffer, width, 1, fp); for (j = 0, k = 0; j < width*2; j+= 2, ++k) { - line[j]= buffer[k]; - line[j+1]= line[j] ? 255 : 0; + if (buffer[k] == 0) { + line[j]= 255; + line[j+1]= 0; + } else { + line[j]= buffer[k] - 1; + line[j+1]= 255; + } } break; + default: + g_error("Unsupported number of colours (%d)\n", colours); + gimp_quit(); } gimp_pixel_rgn_set_rect(&pixel_rgn, line, 0, i, drawable->width, 1); @@ -270,8 +297,8 @@ static gint32 load_image(char *file, char *brief) { /* Close image files, give back allocated memory */ fclose(fp); - free(buffer); - free(line); + g_free(buffer); + g_free(line); /* Use palette from file or otherwise default grey palette */ palette = g_new(guchar, colours*3); @@ -291,12 +318,12 @@ static gint32 load_image(char *file, char *brief) { } } - gimp_image_set_cmap(image, palette, colours); + gimp_image_set_cmap(image, palette + 3, colours - 1); /* Close palette file, give back allocated memory */ fclose(fp); - free(palette); + g_free(palette); /* Now get everything redrawn and hand back the finished image */ @@ -344,7 +371,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { FILE* fp; /* Write file pointer */ char *progress; /* Title for progress display */ guchar header[32]; /* File header */ - gint colours, type; /* Number of colours, type of layer */ + gint colours, type, /* Number of colours, type of layer */ + offx, offy; /* Layer offsets */ guchar *buffer, /* Temporary buffer */ *line; /* Pixel data */ @@ -355,28 +383,36 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Check that this is an indexed image, fail otherwise */ type= gimp_drawable_type(layer); - if (type != INDEXED_IMAGE && type != INDEXEDA_IMAGE) { - g_print("GIMP tried to save a non-indexed image as CEL.\n"); - return FALSE; + if (type != INDEXEDA_IMAGE) { + g_message("Only an indexed-alpha image can be saved in CEL format"); + gimp_quit(); } + /* Find out how offset this layer was */ + gimp_drawable_offsets(layer, &offx, &offy); + drawable = gimp_drawable_get(layer); /* Open the file for writing */ fp = fopen(file, "w"); + if (fp == NULL) { + g_message("Couldn't write image to\n%s", file); + gimp_quit(); + } + progress= g_malloc(strlen(brief) + 9); sprintf(progress, "Saving %s:", brief); gimp_progress_init(progress); /* Headers */ - memset(header, 0, 32); + bzero(header, 32); strcpy(header, "KiSS"); header[4]= 0x20; /* Work out whether to save as 8bit or 4bit */ gimp_image_get_cmap(image, &colours); - if (colours > 16) { + if (colours > 15) { header[5]= 8; } else { header[5]= 4; @@ -387,6 +423,10 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { header[9]= drawable->width / 256; header[10]= drawable->height % 256; header[11]= drawable->height / 256; + header[12]= offx % 256; + header[13]= offx / 256; + header[14]= offy % 256; + header[15]= offy / 256; fwrite(header, 32, 1, fp); /* Arrange for memory etc. */ @@ -398,21 +438,27 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Get the image from the GIMP one line at a time and write it out */ for (i = 0; i < drawable->height; ++i) { gimp_pixel_rgn_get_rect(&pixel_rgn, line, 0, i, drawable->width, 1); + memset(buffer, 0, drawable->width); - switch (colours) { - case 16: - for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) { - buffer[k]= 16 * (line[j+1] ? line[j] : 0) - + (line[j+3] ? line[j+2] : 0); - } - fwrite(buffer, (drawable->width+1)/2, 1, fp); - break; - case 256: + if (colours > 16) { for (j = 0, k = 0; j < drawable->width*2; j+= 2, ++k) { - buffer[k]= line[j+1] ? line[j] : 0; + if (line[j+1] > 127) { + buffer[k]= line[j] + 1; + } } fwrite(buffer, drawable->width, 1, fp); - break; + + } else { + for (j = 0, k = 0; j < drawable->width*2; j+= 4, ++k) { + buffer[k]= 0; + if (line[j+1] > 127) { + buffer[k]+= (line[j] + 1)<< 4; + } + if (line[j+3] > 127) { + buffer[k]+= (line[j+2] + 1); + } + } + fwrite(buffer, (drawable->width+1)/2, 1, fp); } gimp_progress_update((float) i / (float) drawable->height); @@ -420,8 +466,8 @@ static gint save_image(char *file, char *brief, gint32 image, gint32 layer) { /* Close files, give back allocated memory */ fclose(fp); - free(buffer); - free(line); + g_free(buffer); + g_free(line); return TRUE; } diff --git a/plug-ins/common/bz2.c b/plug-ins/common/bz2.c index b8fb5a4760..ce3a8e0c5b 100644 --- a/plug-ins/common/bz2.c +++ b/plug-ins/common/bz2.c @@ -245,24 +245,24 @@ save_image (char *filename, /* fork off a bzip2 process */ if ((pid = fork()) < 0) { - g_warning ("bz2: fork failed: %s\n", g_strerror(errno)); + g_message ("bz2: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { if (!(f = fopen(filename,"w"))){ - g_warning("bz2: fopen failed: %s\n", g_strerror(errno)); + g_message("bz2: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this process be the output file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno)); + g_message ("bz2: dup2 failed: %s\n", g_strerror(errno)); /* and bzip2 into it */ execlp ("bzip2", "bzip2", "-cf", tmpname, NULL); - g_warning ("bz2: exec failed: bzip2: %s\n", g_strerror(errno)); + g_message ("bz2: exec failed: bzip2: %s\n", g_strerror(errno)); _exit(127); } else @@ -272,7 +272,7 @@ save_image (char *filename, if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("bz2: bzip2 exited abnormally on file %s\n", tmpname); + g_message ("bz2: bzip2 exited abnormally on file %s\n", tmpname); return 0; } } @@ -305,24 +305,24 @@ load_image (char *filename, gint32 run_mode) /* fork off a g(un)zip and wait for it */ if ((pid = fork()) < 0) { - g_warning ("bz2: fork failed: %s\n", g_strerror(errno)); + g_message ("bz2: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) /* child process */ { FILE* f; if (!(f = fopen(tmpname,"w"))){ - g_warning("bz2: fopen failed: %s\n", g_strerror(errno)); + g_message("bz2: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this child process be the temp file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("bz2: dup2 failed: %s\n", g_strerror(errno)); + g_message ("bz2: dup2 failed: %s\n", g_strerror(errno)); /* and unzip into it */ execlp ("bzip2", "bzip2", "-cfd", filename, NULL); - g_warning ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno)); + g_message ("bz2: exec failed: bunzip2: %s\n", g_strerror(errno)); _exit(127); } else /* parent process */ @@ -332,7 +332,7 @@ load_image (char *filename, gint32 run_mode) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("bz2: bzip2 exited abnormally on file %s\n", filename); + g_message ("bz2: bzip2 exited abnormally on file %s\n", filename); return -1; } } @@ -386,7 +386,7 @@ static char* find_extension (char* filename) while (1) { if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("bz2: can't open bzip2ed file without a sensible extension\n"); + g_message ("bz2: can't open bzip2ed file without a sensible extension\n"); return NULL; } if (0 == strcmp(ext, ".xcfbz2")) { diff --git a/plug-ins/common/compressor.c b/plug-ins/common/compressor.c index 60ea376f6b..57a7c69014 100644 --- a/plug-ins/common/compressor.c +++ b/plug-ins/common/compressor.c @@ -246,7 +246,7 @@ save_image (char *filename, ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, saving as gzip'd xcf\n"); + g_message("gz: no sensible extension, saving as gzip'd xcf\n"); ext = ".xcf"; } @@ -281,24 +281,24 @@ save_image (char *filename, /* fork off a gzip process */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { if (!(f = fopen(filename,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this process be the output file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and gzip into it */ execlp ("gzip", "gzip", "-cf", tmpname, NULL); - g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno)); _exit(127); } else @@ -308,7 +308,7 @@ save_image (char *filename, if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", tmpname); + g_message ("gz: gzip exited abnormally on file %s\n", tmpname); return 0; } } @@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode) ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, attempting to load with file magic\n"); + g_message("gz: no sensible extension, attempting to load with file magic\n"); } /* find a temp name */ @@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode) /* fork off a g(un)zip and wait for it */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) /* child process */ { FILE* f; if (!(f = fopen(tmpname,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this child process be the temp file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and unzip into it */ execlp ("gzip", "gzip", "-cfd", filename, NULL); - g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); _exit(127); } else /* parent process */ @@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", filename); + g_message ("gz: gzip exited abnormally on file %s\n", filename); return -1; } } diff --git a/plug-ins/common/gif.c b/plug-ins/common/gif.c index b33d1622c0..0ca605a9af 100644 --- a/plug-ins/common/gif.c +++ b/plug-ins/common/gif.c @@ -426,7 +426,7 @@ run (char *name, * or trim down the number of GIMP colours at load-time. We do the * latter for now. */ - printf("GIF: Highest used index is %d\n", highest_used_index); + g_print ("GIF: Highest used index is %d\n", highest_used_index); if (!promote_to_rgb) { gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1); @@ -607,7 +607,7 @@ load_image (char *filename) fd = fopen (filename, "rb"); if (!fd) { - printf ("GIF: can't open \"%s\"\n", filename); + g_message ("GIF: can't open \"%s\"\n", filename); return -1; } @@ -619,13 +619,13 @@ load_image (char *filename) if (!ReadOK (fd, buf, 6)) { - printf ("GIF: error reading magic number\n"); + g_message ("GIF: error reading magic number\n"); return -1; } if (strncmp ((char *) buf, "GIF", 3) != 0) { - printf ("GIF: not a GIF file\n"); + g_message ("GIF: not a GIF file\n"); return -1; } @@ -634,13 +634,13 @@ load_image (char *filename) if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0)) { - printf ("GIF: bad version number, not '87a' or '89a'\n"); + g_message ("GIF: bad version number, not '87a' or '89a'\n"); return -1; } if (!ReadOK (fd, buf, 7)) { - printf ("GIF: failed to read screen descriptor\n"); + g_message ("GIF: failed to read screen descriptor\n"); return -1; } @@ -656,14 +656,14 @@ load_image (char *filename) /* Global Colormap */ if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale)) { - printf ("GIF: error reading global colormap\n"); + g_message ("GIF: error reading global colormap\n"); return -1; } } if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49) { - printf ("GIF: warning - non-square pixels\n"); + g_message ("GIF: warning - non-square pixels\n"); } @@ -674,7 +674,7 @@ load_image (char *filename) { if (!ReadOK (fd, &c, 1)) { - printf ("GIF: EOF / read error on image data\n"); + g_message ("GIF: EOF / read error on image data\n"); return image_ID; /* will be -1 if failed on first image! */ } @@ -689,7 +689,7 @@ load_image (char *filename) /* Extension */ if (!ReadOK (fd, &c, 1)) { - printf ("GIF: OF / read error on extention function code\n"); + g_message ("GIF: OF / read error on extention function code\n"); return image_ID; /* will be -1 if failed on first image! */ } DoExtension (fd, c); @@ -699,7 +699,7 @@ load_image (char *filename) if (c != ',') { /* Not a valid start character */ - printf ("GIF: bogus character 0x%02x, ignoring\n", (int) c); + g_message ("GIF: bogus character 0x%02x, ignoring\n", (int) c); continue; } @@ -707,7 +707,7 @@ load_image (char *filename) if (!ReadOK (fd, buf, 9)) { - printf ("GIF: couldn't read left/top/width/height\n"); + g_message ("GIF: couldn't read left/top/width/height\n"); return image_ID; /* will be -1 if failed on first image! */ } @@ -719,7 +719,7 @@ load_image (char *filename) { if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale)) { - printf ("GIF: error reading local colormap\n"); + g_message ("GIF: error reading local colormap\n"); return image_ID; /* will be -1 if failed on first image! */ } image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]), @@ -768,7 +768,7 @@ ReadColorMap (FILE *fd, { if (!ReadOK (fd, rgb, sizeof (rgb))) { - printf ("GIF: bad colormap\n"); + g_message ("GIF: bad colormap\n"); return TRUE; } @@ -829,7 +829,7 @@ DoExtension (FILE *fd, while (GetDataBlock (fd, (unsigned char *) buf) != 0) { if (showComment) - printf ("GIF: gif comment: %s\n", buf); + g_print ("GIF: gif comment: %s\n", buf); } return FALSE; case 0xf9: /* Graphic Control Extension */ @@ -852,7 +852,7 @@ DoExtension (FILE *fd, break; } - printf ("GIF: got a '%s' extension\n", str); + g_print ("GIF: got a '%s' extension\n", str); while (GetDataBlock (fd, (unsigned char *) buf) != 0) ; @@ -870,7 +870,7 @@ GetDataBlock (FILE *fd, if (!ReadOK (fd, &count, 1)) { - printf ("GIF: error in getting DataBlock size\n"); + g_message ("GIF: error in getting DataBlock size\n"); return -1; } @@ -878,7 +878,7 @@ GetDataBlock (FILE *fd, if ((count != 0) && (!ReadOK (fd, buf, count))) { - printf ("GIF: error in reading DataBlock\n"); + g_message ("GIF: error in reading DataBlock\n"); return -1; } @@ -909,7 +909,7 @@ GetCode (FILE *fd, { if (curbit >= lastbit) { - printf ("GIF: ran off the end of by bits\n"); + g_message ("GIF: ran off the end of by bits\n"); gimp_quit (); } return -1; @@ -1020,7 +1020,7 @@ LWZReadByte (FILE *fd, ; if (count != 0) - printf ("GIF: missing EOD in data stream (common occurence)"); + g_print ("GIF: missing EOD in data stream (common occurence)"); return -2; } @@ -1037,7 +1037,7 @@ LWZReadByte (FILE *fd, *sp++ = table[1][code]; if (code == table[0][code]) { - printf ("GIF: circular table entry BIG ERROR\n"); + g_message ("GIF: circular table entry BIG ERROR\n"); gimp_quit (); } code = table[0][code]; @@ -1105,13 +1105,13 @@ ReadImage (FILE *fd, */ if (!ReadOK (fd, &c, 1)) { - printf ("GIF: EOF / read error on image data\n"); + g_message ("GIF: EOF / read error on image data\n"); return -1; } if (LWZReadByte (fd, TRUE, c) < 0) { - printf ("GIF: error while reading\n"); + g_message ("GIF: error while reading\n"); return -1; } @@ -1167,7 +1167,7 @@ ReadImage (FILE *fd, promote_to_rgb = TRUE; /* Promote everything we have so far into RGB(A) */ - printf("GIF: Promoting image to RGB...\n"); + g_print ("GIF: Promoting image to RGB...\n"); gimp_run_procedure("gimp_convert_rgb", &nreturn_vals, PARAM_IMAGE, image_ID, PARAM_END); @@ -1193,10 +1193,10 @@ ReadImage (FILE *fd, case 0x06: case 0x07: strcat(framename," (unknown disposal)"); - printf("GIF: Hmm... please forward this GIF to the " - "GIF plugin author!\n (adam@foxbox.org)\n"); + g_message ("GIF: Hmm... please forward this GIF to the " + "GIF plugin author!\n (adam@foxbox.org)\n"); break; - default: printf("GIF: Something got corrupted.\n"); break; + default: g_message ("GIF: Something got corrupted.\n"); break; } previous_disposal = Gif89.disposal; @@ -1225,12 +1225,12 @@ ReadImage (FILE *fd, dest = (guchar *) g_malloc (len * height); if (verbose) - printf ("GIF: reading %d by %d%s GIF image, ncols=%d\n", - len, height, interlace ? " interlaced" : "", ncols); + g_print ("GIF: reading %d by %d%s GIF image, ncols=%d\n", + len, height, interlace ? " interlaced" : "", ncols); if (!alpha_frame && promote_to_rgb) { - printf("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n"); + g_message ("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n"); exit(-1); } @@ -1319,7 +1319,7 @@ ReadImage (FILE *fd, fini: if (LWZReadByte (fd, FALSE, c) >= 0) - printf ("GIF: too much input data, ignoring extra...\n"); + g_print ("GIF: too much input data, ignoring extra...\n"); gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE); gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height); @@ -1426,7 +1426,7 @@ static int find_unused_ia_colour (guchar *pixels, gboolean ix_used[256]; /* - fprintf(stderr,"GIF: Image has >=256 colors - attempting to reduce...\n"); + g_message ("GIF: Image has >=256 colors - attempting to reduce...\n"); */ for (i=0;i<256;i++) @@ -1439,12 +1439,12 @@ static int find_unused_ia_colour (guchar *pixels, if (ix_used[i] == (gboolean)FALSE) { - fprintf(stderr,"GIF: Found unused colour index %d.\n",(int)i); + g_message ("GIF: Found unused colour index %d.\n",(int)i); return i; } - fprintf(stderr,"GIF: Couldn't simply reduce colours further. Saving as opaque.\n"); + g_message ("GIF: Couldn't simply reduce colours further. Saving as opaque.\n"); return (-1); } @@ -1688,9 +1688,7 @@ save_image (char *filename, break; default: - /* FIXME: should be a popup (or, of course, ideally GIMP shouldn't - let RGB images through in the first place :) ) */ - fprintf (stderr, "GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n"); + g_message ("GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n"); return FALSE; break; } @@ -1707,7 +1705,7 @@ save_image (char *filename, outfile = fopen (filename, "wb"); if (!outfile) { - fprintf (stderr, "GIF: can't open %s\n", filename); + g_message ("GIF: can't open %s\n", filename); return FALSE; } @@ -1722,7 +1720,7 @@ save_image (char *filename, else { BitsPerPixel = colorstobpp (256); - fprintf (stderr, "GIF: Too many colours?\n"); + g_message ("GIF: Too many colours?\n"); } cols = gimp_image_width(image_ID); @@ -2159,7 +2157,7 @@ colorstobpp (int colors) bpp = 8; else { - printf ("GIF: too many colors: %d\n", colors); + g_message ("GIF: too many colors: %d\n", colors); return 8; } @@ -2691,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment) { if (comment==NULL||strlen(comment)<1) { - printf("GIF: warning: no comment given - comment block not written.\n"); + g_message ("GIF: warning: no comment given - comment block not written.\n"); return; } @@ -3087,7 +3085,7 @@ cl_hash (register count_int hsize) /* reset code table */ static void writeerr () { - printf ("GIF: error writing output file\n"); + g_message ("GIF: error writing output file\n"); return; } @@ -3240,7 +3238,7 @@ comment_entry_callback (GtkWidget *widget, /* Temporary kludge for overlength strings - just return */ if (ssize>240) { - printf("GIF save: Your comment string is too long.\n"); + g_message ("GIF save: Your comment string is too long.\n"); return; } @@ -3249,7 +3247,7 @@ comment_entry_callback (GtkWidget *widget, strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget))); - /* printf("COMMENT: %s\n",globalcomment); */ + /* g_print ("COMMENT: %s\n",globalcomment); */ } /* The End */ diff --git a/plug-ins/common/gz.c b/plug-ins/common/gz.c index 60ea376f6b..57a7c69014 100644 --- a/plug-ins/common/gz.c +++ b/plug-ins/common/gz.c @@ -246,7 +246,7 @@ save_image (char *filename, ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, saving as gzip'd xcf\n"); + g_message("gz: no sensible extension, saving as gzip'd xcf\n"); ext = ".xcf"; } @@ -281,24 +281,24 @@ save_image (char *filename, /* fork off a gzip process */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { if (!(f = fopen(filename,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this process be the output file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and gzip into it */ execlp ("gzip", "gzip", "-cf", tmpname, NULL); - g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno)); _exit(127); } else @@ -308,7 +308,7 @@ save_image (char *filename, if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", tmpname); + g_message ("gz: gzip exited abnormally on file %s\n", tmpname); return 0; } } @@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode) ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, attempting to load with file magic\n"); + g_message("gz: no sensible extension, attempting to load with file magic\n"); } /* find a temp name */ @@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode) /* fork off a g(un)zip and wait for it */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) /* child process */ { FILE* f; if (!(f = fopen(tmpname,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this child process be the temp file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and unzip into it */ execlp ("gzip", "gzip", "-cfd", filename, NULL); - g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); _exit(127); } else /* parent process */ @@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", filename); + g_message ("gz: gzip exited abnormally on file %s\n", filename); return -1; } } diff --git a/plug-ins/common/jpeg.c b/plug-ins/common/jpeg.c index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/common/jpeg.c +++ b/plug-ins/common/jpeg.c @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/common/pnm.c b/plug-ins/common/pnm.c index 5f85ac175a..c36885bb91 100644 --- a/plug-ins/common/pnm.c +++ b/plug-ins/common/pnm.c @@ -722,7 +722,7 @@ save_image (char *filename, fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd == -1) { - fprintf (stderr, "pnm: can't open \"%s\"\n", filename); + g_message ("pnm: can't open \"%s\"\n", filename); return FALSE; } diff --git a/plug-ins/common/postscript.c b/plug-ins/common/postscript.c index 6b88cacf7a..2dac09c339 100644 --- a/plug-ins/common/postscript.c +++ b/plug-ins/common/postscript.c @@ -234,8 +234,6 @@ static void save_toggle_update (GtkWidget *widget, static void save_mm_toggle_update (GtkWidget *widget, gpointer data); -static void show_message (char *); - GPlugInInfo PLUG_IN_INFO = { @@ -531,7 +529,7 @@ load_image (char *filename) ifp = fopen (filename, "r"); if (ifp == NULL) { - show_message ("can't open file for reading"); + g_message ("can't open file for reading"); return (-1); } fclose (ifp); @@ -548,14 +546,14 @@ load_image (char *filename) ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury); if (!ifp) { - show_message ("can't interprete file"); + g_message ("can't interprete file"); return (-1); } image_list = (gint32 *)g_malloc (10 * sizeof (gint32)); if (image_list == NULL) { - show_message ("out of memory"); + g_message ("out of memory"); return (-1); } n_images = 0; @@ -635,7 +633,7 @@ save_image (char *filename, /* Make sure we're not saving an image with an alpha channel */ if (gimp_drawable_has_alpha (drawable_ID)) { - show_message ("PostScript save cannot handle images with alpha channels"); + g_message ("PostScript save cannot handle images with alpha channels"); return FALSE; } @@ -646,7 +644,7 @@ save_image (char *filename, case RGB_IMAGE: break; default: - show_message ("cannot operate on unknown image types"); + g_message ("cannot operate on unknown image types"); return (FALSE); break; } @@ -655,7 +653,7 @@ save_image (char *filename, ofp = fopen (filename, "wb"); if (!ofp) { - show_message ("cant open file for writing"); + g_message ("cant open file for writing"); return (FALSE); } @@ -1272,7 +1270,7 @@ load_ps (char *filename, if (bitline) g_free (bitline); if (err) - show_message ("EOF encountered on reading"); + g_message ("EOF encountered on reading"); gimp_drawable_flush (drawable); @@ -1662,7 +1660,7 @@ save_gray (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1751,7 +1749,7 @@ save_index (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1820,7 +1818,7 @@ save_rgb (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -2442,18 +2440,3 @@ save_mm_toggle_update (GtkWidget *widget, } } } - - -/* Show a message. Where to show it, depends on the runmode */ -static void show_message (char *message) - -{ -#ifdef Simple_Message_Box_Available - /* If there would be a simple message box like the one */ - /* used in ../app/interface.h, I would like to use it. */ - if (l_run_mode == RUN_INTERACTIVE) - gtk_message_box (message); - else -#endif - fprintf (stderr, "ps: %s\n", message); -} diff --git a/plug-ins/common/ps.c b/plug-ins/common/ps.c index 6b88cacf7a..2dac09c339 100644 --- a/plug-ins/common/ps.c +++ b/plug-ins/common/ps.c @@ -234,8 +234,6 @@ static void save_toggle_update (GtkWidget *widget, static void save_mm_toggle_update (GtkWidget *widget, gpointer data); -static void show_message (char *); - GPlugInInfo PLUG_IN_INFO = { @@ -531,7 +529,7 @@ load_image (char *filename) ifp = fopen (filename, "r"); if (ifp == NULL) { - show_message ("can't open file for reading"); + g_message ("can't open file for reading"); return (-1); } fclose (ifp); @@ -548,14 +546,14 @@ load_image (char *filename) ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury); if (!ifp) { - show_message ("can't interprete file"); + g_message ("can't interprete file"); return (-1); } image_list = (gint32 *)g_malloc (10 * sizeof (gint32)); if (image_list == NULL) { - show_message ("out of memory"); + g_message ("out of memory"); return (-1); } n_images = 0; @@ -635,7 +633,7 @@ save_image (char *filename, /* Make sure we're not saving an image with an alpha channel */ if (gimp_drawable_has_alpha (drawable_ID)) { - show_message ("PostScript save cannot handle images with alpha channels"); + g_message ("PostScript save cannot handle images with alpha channels"); return FALSE; } @@ -646,7 +644,7 @@ save_image (char *filename, case RGB_IMAGE: break; default: - show_message ("cannot operate on unknown image types"); + g_message ("cannot operate on unknown image types"); return (FALSE); break; } @@ -655,7 +653,7 @@ save_image (char *filename, ofp = fopen (filename, "wb"); if (!ofp) { - show_message ("cant open file for writing"); + g_message ("cant open file for writing"); return (FALSE); } @@ -1272,7 +1270,7 @@ load_ps (char *filename, if (bitline) g_free (bitline); if (err) - show_message ("EOF encountered on reading"); + g_message ("EOF encountered on reading"); gimp_drawable_flush (drawable); @@ -1662,7 +1660,7 @@ save_gray (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1751,7 +1749,7 @@ save_index (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1820,7 +1818,7 @@ save_rgb (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -2442,18 +2440,3 @@ save_mm_toggle_update (GtkWidget *widget, } } } - - -/* Show a message. Where to show it, depends on the runmode */ -static void show_message (char *message) - -{ -#ifdef Simple_Message_Box_Available - /* If there would be a simple message box like the one */ - /* used in ../app/interface.h, I would like to use it. */ - if (l_run_mode == RUN_INTERACTIVE) - gtk_message_box (message); - else -#endif - fprintf (stderr, "ps: %s\n", message); -} diff --git a/plug-ins/common/psd.c b/plug-ins/common/psd.c index 884ec73a17..e0f2273ce0 100644 --- a/plug-ins/common/psd.c +++ b/plug-ins/common/psd.c @@ -447,7 +447,7 @@ psd_type_to_gimp_base_type (psd_imagetype psdtype) case PSD_INDEXEDA_IMAGE: case PSD_INDEXED_IMAGE: return(INDEXED); default: - printf("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n"); + g_message ("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n"); gimp_quit(); return(RGB); } @@ -464,7 +464,7 @@ psd_mode_to_gimp_base_type (gushort psdtype) case 2: return(INDEXED); case 3: return(RGB); default: - printf("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n"); + g_message ("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n"); gimp_quit(); return(RGB); } @@ -715,7 +715,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum) if (psd_image.layer[layernum].num_channels > MAX_CHANNELS) { - printf("\nPSD: Sorry - this image has too many channels. Tell Adam!\n"); + g_message ("\nPSD: Sorry - this image has too many channels. Tell Adam!\n"); gimp_quit(); } @@ -744,7 +744,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum) if (strncmp(sig, "8BIM", 4)!=0) { - printf("PSD: Error - layer blend signature is incorrect. :-(\n"); + g_message ("PSD: Error - layer blend signature is incorrect. :-(\n"); gimp_quit(); } @@ -884,7 +884,7 @@ do_layer_struct(FILE *fd, guint32 *offset) if (psd_image.num_layers > MAX_LAYERS) { - printf("\nPSD: Sorry - this image has too many layers. Tell Adam!\n"); + g_message ("\nPSD: Sorry - this image has too many layers. Tell Adam!\n"); gimp_quit(); } @@ -1003,7 +1003,7 @@ do_layer_pixeldata(FILE *fd, guint32 *offset) } break; default: /* *unknown* */ - printf("*** Unknown compression type in channel.\n"); + g_message ("*** Unknown compression type in channel.\n"); gimp_quit(); break; } diff --git a/plug-ins/common/url.c b/plug-ins/common/url.c index 424d84fe34..1b15974bce 100644 --- a/plug-ins/common/url.c +++ b/plug-ins/common/url.c @@ -128,7 +128,7 @@ load_image (char *filename) if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("url: can't open URL without an extension\n"); + g_message ("url: can't open URL without an extension\n"); return -1; } @@ -141,13 +141,13 @@ load_image (char *filename) if ((pid = fork()) < 0) { - g_warning ("url: fork failed: %s\n", g_strerror(errno)); + g_message ("url: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { execlp ("wget", "wget", filename, "-O", tmpname, NULL); - g_warning ("url: exec failed: wget: %s\n", g_strerror(errno)); + g_message ("url: exec failed: wget: %s\n", g_strerror(errno)); _exit(127); } else @@ -157,7 +157,7 @@ load_image (char *filename) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("url: wget exited abnormally on URL %s\n", filename); + g_message ("url: wget exited abnormally on URL %s\n", filename); return -1; } } diff --git a/plug-ins/gif/gif.c b/plug-ins/gif/gif.c index b33d1622c0..0ca605a9af 100644 --- a/plug-ins/gif/gif.c +++ b/plug-ins/gif/gif.c @@ -426,7 +426,7 @@ run (char *name, * or trim down the number of GIMP colours at load-time. We do the * latter for now. */ - printf("GIF: Highest used index is %d\n", highest_used_index); + g_print ("GIF: Highest used index is %d\n", highest_used_index); if (!promote_to_rgb) { gimp_image_set_cmap (image_ID, gimp_cmap, highest_used_index+1); @@ -607,7 +607,7 @@ load_image (char *filename) fd = fopen (filename, "rb"); if (!fd) { - printf ("GIF: can't open \"%s\"\n", filename); + g_message ("GIF: can't open \"%s\"\n", filename); return -1; } @@ -619,13 +619,13 @@ load_image (char *filename) if (!ReadOK (fd, buf, 6)) { - printf ("GIF: error reading magic number\n"); + g_message ("GIF: error reading magic number\n"); return -1; } if (strncmp ((char *) buf, "GIF", 3) != 0) { - printf ("GIF: not a GIF file\n"); + g_message ("GIF: not a GIF file\n"); return -1; } @@ -634,13 +634,13 @@ load_image (char *filename) if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0)) { - printf ("GIF: bad version number, not '87a' or '89a'\n"); + g_message ("GIF: bad version number, not '87a' or '89a'\n"); return -1; } if (!ReadOK (fd, buf, 7)) { - printf ("GIF: failed to read screen descriptor\n"); + g_message ("GIF: failed to read screen descriptor\n"); return -1; } @@ -656,14 +656,14 @@ load_image (char *filename) /* Global Colormap */ if (ReadColorMap (fd, GifScreen.BitPixel, GifScreen.ColorMap, &GifScreen.GrayScale)) { - printf ("GIF: error reading global colormap\n"); + g_message ("GIF: error reading global colormap\n"); return -1; } } if (GifScreen.AspectRatio != 0 && GifScreen.AspectRatio != 49) { - printf ("GIF: warning - non-square pixels\n"); + g_message ("GIF: warning - non-square pixels\n"); } @@ -674,7 +674,7 @@ load_image (char *filename) { if (!ReadOK (fd, &c, 1)) { - printf ("GIF: EOF / read error on image data\n"); + g_message ("GIF: EOF / read error on image data\n"); return image_ID; /* will be -1 if failed on first image! */ } @@ -689,7 +689,7 @@ load_image (char *filename) /* Extension */ if (!ReadOK (fd, &c, 1)) { - printf ("GIF: OF / read error on extention function code\n"); + g_message ("GIF: OF / read error on extention function code\n"); return image_ID; /* will be -1 if failed on first image! */ } DoExtension (fd, c); @@ -699,7 +699,7 @@ load_image (char *filename) if (c != ',') { /* Not a valid start character */ - printf ("GIF: bogus character 0x%02x, ignoring\n", (int) c); + g_message ("GIF: bogus character 0x%02x, ignoring\n", (int) c); continue; } @@ -707,7 +707,7 @@ load_image (char *filename) if (!ReadOK (fd, buf, 9)) { - printf ("GIF: couldn't read left/top/width/height\n"); + g_message ("GIF: couldn't read left/top/width/height\n"); return image_ID; /* will be -1 if failed on first image! */ } @@ -719,7 +719,7 @@ load_image (char *filename) { if (ReadColorMap (fd, bitPixel, localColorMap, &grayScale)) { - printf ("GIF: error reading local colormap\n"); + g_message ("GIF: error reading local colormap\n"); return image_ID; /* will be -1 if failed on first image! */ } image_ID = ReadImage (fd, filename, LM_to_uint (buf[4], buf[5]), @@ -768,7 +768,7 @@ ReadColorMap (FILE *fd, { if (!ReadOK (fd, rgb, sizeof (rgb))) { - printf ("GIF: bad colormap\n"); + g_message ("GIF: bad colormap\n"); return TRUE; } @@ -829,7 +829,7 @@ DoExtension (FILE *fd, while (GetDataBlock (fd, (unsigned char *) buf) != 0) { if (showComment) - printf ("GIF: gif comment: %s\n", buf); + g_print ("GIF: gif comment: %s\n", buf); } return FALSE; case 0xf9: /* Graphic Control Extension */ @@ -852,7 +852,7 @@ DoExtension (FILE *fd, break; } - printf ("GIF: got a '%s' extension\n", str); + g_print ("GIF: got a '%s' extension\n", str); while (GetDataBlock (fd, (unsigned char *) buf) != 0) ; @@ -870,7 +870,7 @@ GetDataBlock (FILE *fd, if (!ReadOK (fd, &count, 1)) { - printf ("GIF: error in getting DataBlock size\n"); + g_message ("GIF: error in getting DataBlock size\n"); return -1; } @@ -878,7 +878,7 @@ GetDataBlock (FILE *fd, if ((count != 0) && (!ReadOK (fd, buf, count))) { - printf ("GIF: error in reading DataBlock\n"); + g_message ("GIF: error in reading DataBlock\n"); return -1; } @@ -909,7 +909,7 @@ GetCode (FILE *fd, { if (curbit >= lastbit) { - printf ("GIF: ran off the end of by bits\n"); + g_message ("GIF: ran off the end of by bits\n"); gimp_quit (); } return -1; @@ -1020,7 +1020,7 @@ LWZReadByte (FILE *fd, ; if (count != 0) - printf ("GIF: missing EOD in data stream (common occurence)"); + g_print ("GIF: missing EOD in data stream (common occurence)"); return -2; } @@ -1037,7 +1037,7 @@ LWZReadByte (FILE *fd, *sp++ = table[1][code]; if (code == table[0][code]) { - printf ("GIF: circular table entry BIG ERROR\n"); + g_message ("GIF: circular table entry BIG ERROR\n"); gimp_quit (); } code = table[0][code]; @@ -1105,13 +1105,13 @@ ReadImage (FILE *fd, */ if (!ReadOK (fd, &c, 1)) { - printf ("GIF: EOF / read error on image data\n"); + g_message ("GIF: EOF / read error on image data\n"); return -1; } if (LWZReadByte (fd, TRUE, c) < 0) { - printf ("GIF: error while reading\n"); + g_message ("GIF: error while reading\n"); return -1; } @@ -1167,7 +1167,7 @@ ReadImage (FILE *fd, promote_to_rgb = TRUE; /* Promote everything we have so far into RGB(A) */ - printf("GIF: Promoting image to RGB...\n"); + g_print ("GIF: Promoting image to RGB...\n"); gimp_run_procedure("gimp_convert_rgb", &nreturn_vals, PARAM_IMAGE, image_ID, PARAM_END); @@ -1193,10 +1193,10 @@ ReadImage (FILE *fd, case 0x06: case 0x07: strcat(framename," (unknown disposal)"); - printf("GIF: Hmm... please forward this GIF to the " - "GIF plugin author!\n (adam@foxbox.org)\n"); + g_message ("GIF: Hmm... please forward this GIF to the " + "GIF plugin author!\n (adam@foxbox.org)\n"); break; - default: printf("GIF: Something got corrupted.\n"); break; + default: g_message ("GIF: Something got corrupted.\n"); break; } previous_disposal = Gif89.disposal; @@ -1225,12 +1225,12 @@ ReadImage (FILE *fd, dest = (guchar *) g_malloc (len * height); if (verbose) - printf ("GIF: reading %d by %d%s GIF image, ncols=%d\n", - len, height, interlace ? " interlaced" : "", ncols); + g_print ("GIF: reading %d by %d%s GIF image, ncols=%d\n", + len, height, interlace ? " interlaced" : "", ncols); if (!alpha_frame && promote_to_rgb) { - printf("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n"); + g_message ("GIF: Ouchie! Can't handle non-alpha RGB frames.\n Please mail the plugin author. (adam@gimp.org)\n"); exit(-1); } @@ -1319,7 +1319,7 @@ ReadImage (FILE *fd, fini: if (LWZReadByte (fd, FALSE, c) >= 0) - printf ("GIF: too much input data, ignoring extra...\n"); + g_print ("GIF: too much input data, ignoring extra...\n"); gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, TRUE, FALSE); gimp_pixel_rgn_set_rect (&pixel_rgn, dest, 0, 0, drawable->width, drawable->height); @@ -1426,7 +1426,7 @@ static int find_unused_ia_colour (guchar *pixels, gboolean ix_used[256]; /* - fprintf(stderr,"GIF: Image has >=256 colors - attempting to reduce...\n"); + g_message ("GIF: Image has >=256 colors - attempting to reduce...\n"); */ for (i=0;i<256;i++) @@ -1439,12 +1439,12 @@ static int find_unused_ia_colour (guchar *pixels, if (ix_used[i] == (gboolean)FALSE) { - fprintf(stderr,"GIF: Found unused colour index %d.\n",(int)i); + g_message ("GIF: Found unused colour index %d.\n",(int)i); return i; } - fprintf(stderr,"GIF: Couldn't simply reduce colours further. Saving as opaque.\n"); + g_message ("GIF: Couldn't simply reduce colours further. Saving as opaque.\n"); return (-1); } @@ -1688,9 +1688,7 @@ save_image (char *filename, break; default: - /* FIXME: should be a popup (or, of course, ideally GIMP shouldn't - let RGB images through in the first place :) ) */ - fprintf (stderr, "GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n"); + g_message ("GIF: Sorry, can't save RGB images as GIFs - convert to INDEXED\nor GRAY first.\n"); return FALSE; break; } @@ -1707,7 +1705,7 @@ save_image (char *filename, outfile = fopen (filename, "wb"); if (!outfile) { - fprintf (stderr, "GIF: can't open %s\n", filename); + g_message ("GIF: can't open %s\n", filename); return FALSE; } @@ -1722,7 +1720,7 @@ save_image (char *filename, else { BitsPerPixel = colorstobpp (256); - fprintf (stderr, "GIF: Too many colours?\n"); + g_message ("GIF: Too many colours?\n"); } cols = gimp_image_width(image_ID); @@ -2159,7 +2157,7 @@ colorstobpp (int colors) bpp = 8; else { - printf ("GIF: too many colors: %d\n", colors); + g_message ("GIF: too many colors: %d\n", colors); return 8; } @@ -2691,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment) { if (comment==NULL||strlen(comment)<1) { - printf("GIF: warning: no comment given - comment block not written.\n"); + g_message ("GIF: warning: no comment given - comment block not written.\n"); return; } @@ -3087,7 +3085,7 @@ cl_hash (register count_int hsize) /* reset code table */ static void writeerr () { - printf ("GIF: error writing output file\n"); + g_message ("GIF: error writing output file\n"); return; } @@ -3240,7 +3238,7 @@ comment_entry_callback (GtkWidget *widget, /* Temporary kludge for overlength strings - just return */ if (ssize>240) { - printf("GIF save: Your comment string is too long.\n"); + g_message ("GIF save: Your comment string is too long.\n"); return; } @@ -3249,7 +3247,7 @@ comment_entry_callback (GtkWidget *widget, strcpy(globalcomment, gtk_entry_get_text (GTK_ENTRY (widget))); - /* printf("COMMENT: %s\n",globalcomment); */ + /* g_print ("COMMENT: %s\n",globalcomment); */ } /* The End */ diff --git a/plug-ins/gz/gz.c b/plug-ins/gz/gz.c index 60ea376f6b..57a7c69014 100644 --- a/plug-ins/gz/gz.c +++ b/plug-ins/gz/gz.c @@ -246,7 +246,7 @@ save_image (char *filename, ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, saving as gzip'd xcf\n"); + g_message("gz: no sensible extension, saving as gzip'd xcf\n"); ext = ".xcf"; } @@ -281,24 +281,24 @@ save_image (char *filename, /* fork off a gzip process */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { if (!(f = fopen(filename,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this process be the output file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and gzip into it */ execlp ("gzip", "gzip", "-cf", tmpname, NULL); - g_warning ("gz: exec failed: gzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno)); _exit(127); } else @@ -308,7 +308,7 @@ save_image (char *filename, if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", tmpname); + g_message ("gz: gzip exited abnormally on file %s\n", tmpname); return 0; } } @@ -330,7 +330,7 @@ load_image (char *filename, gint32 run_mode) ext = find_extension(filename); if (0 == *ext) { - g_warning("gz: no sensible extension, attempting to load with file magic\n"); + g_message("gz: no sensible extension, attempting to load with file magic\n"); } /* find a temp name */ @@ -344,24 +344,24 @@ load_image (char *filename, gint32 run_mode) /* fork off a g(un)zip and wait for it */ if ((pid = fork()) < 0) { - g_warning ("gz: fork failed: %s\n", g_strerror(errno)); + g_message ("gz: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) /* child process */ { FILE* f; if (!(f = fopen(tmpname,"w"))){ - g_warning("gz: fopen failed: %s\n", g_strerror(errno)); + g_message("gz: fopen failed: %s\n", g_strerror(errno)); _exit(127); } /* make stdout for this child process be the temp file */ if (-1 == dup2(fileno(f),fileno(stdout))) - g_warning ("gz: dup2 failed: %s\n", g_strerror(errno)); + g_message ("gz: dup2 failed: %s\n", g_strerror(errno)); /* and unzip into it */ execlp ("gzip", "gzip", "-cfd", filename, NULL); - g_warning ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); + g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno)); _exit(127); } else /* parent process */ @@ -371,7 +371,7 @@ load_image (char *filename, gint32 run_mode) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("gz: gzip exited abnormally on file %s\n", filename); + g_message ("gz: gzip exited abnormally on file %s\n", filename); return -1; } } diff --git a/plug-ins/jpeg/jpeg-load.c b/plug-ins/jpeg/jpeg-load.c index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg-load.c +++ b/plug-ins/jpeg/jpeg-load.c @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/jpeg/jpeg-load.h b/plug-ins/jpeg/jpeg-load.h index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg-load.h +++ b/plug-ins/jpeg/jpeg-load.h @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/jpeg/jpeg-save.c b/plug-ins/jpeg/jpeg-save.c index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg-save.c +++ b/plug-ins/jpeg/jpeg-save.c @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/jpeg/jpeg-save.h b/plug-ins/jpeg/jpeg-save.h index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg-save.h +++ b/plug-ins/jpeg/jpeg-save.h @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/jpeg/jpeg.c b/plug-ins/jpeg/jpeg.c index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg.c +++ b/plug-ins/jpeg/jpeg.c @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/jpeg/jpeg.h b/plug-ins/jpeg/jpeg.h index c570091cc2..877ccbbd5f 100644 --- a/plug-ins/jpeg/jpeg.h +++ b/plug-ins/jpeg/jpeg.h @@ -508,7 +508,7 @@ save_image (char *filename, */ if ((outfile = fopen (filename, "wb")) == NULL) { - fprintf (stderr, "can't open %s\n", filename); + g_message ("can't open %s\n", filename); return FALSE; } jpeg_stdio_dest (&cinfo, outfile); diff --git a/plug-ins/pnm/pnm.c b/plug-ins/pnm/pnm.c index 5f85ac175a..c36885bb91 100644 --- a/plug-ins/pnm/pnm.c +++ b/plug-ins/pnm/pnm.c @@ -722,7 +722,7 @@ save_image (char *filename, fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd == -1) { - fprintf (stderr, "pnm: can't open \"%s\"\n", filename); + g_message ("pnm: can't open \"%s\"\n", filename); return FALSE; } diff --git a/plug-ins/ps/ps.c b/plug-ins/ps/ps.c index 6b88cacf7a..2dac09c339 100644 --- a/plug-ins/ps/ps.c +++ b/plug-ins/ps/ps.c @@ -234,8 +234,6 @@ static void save_toggle_update (GtkWidget *widget, static void save_mm_toggle_update (GtkWidget *widget, gpointer data); -static void show_message (char *); - GPlugInInfo PLUG_IN_INFO = { @@ -531,7 +529,7 @@ load_image (char *filename) ifp = fopen (filename, "r"); if (ifp == NULL) { - show_message ("can't open file for reading"); + g_message ("can't open file for reading"); return (-1); } fclose (ifp); @@ -548,14 +546,14 @@ load_image (char *filename) ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury); if (!ifp) { - show_message ("can't interprete file"); + g_message ("can't interprete file"); return (-1); } image_list = (gint32 *)g_malloc (10 * sizeof (gint32)); if (image_list == NULL) { - show_message ("out of memory"); + g_message ("out of memory"); return (-1); } n_images = 0; @@ -635,7 +633,7 @@ save_image (char *filename, /* Make sure we're not saving an image with an alpha channel */ if (gimp_drawable_has_alpha (drawable_ID)) { - show_message ("PostScript save cannot handle images with alpha channels"); + g_message ("PostScript save cannot handle images with alpha channels"); return FALSE; } @@ -646,7 +644,7 @@ save_image (char *filename, case RGB_IMAGE: break; default: - show_message ("cannot operate on unknown image types"); + g_message ("cannot operate on unknown image types"); return (FALSE); break; } @@ -655,7 +653,7 @@ save_image (char *filename, ofp = fopen (filename, "wb"); if (!ofp) { - show_message ("cant open file for writing"); + g_message ("cant open file for writing"); return (FALSE); } @@ -1272,7 +1270,7 @@ load_ps (char *filename, if (bitline) g_free (bitline); if (err) - show_message ("EOF encountered on reading"); + g_message ("EOF encountered on reading"); gimp_drawable_flush (drawable); @@ -1662,7 +1660,7 @@ save_gray (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1751,7 +1749,7 @@ save_index (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -1820,7 +1818,7 @@ save_rgb (FILE *ofp, if (ferror (ofp)) { - show_message ("write error occured"); + g_message ("write error occured"); return (FALSE); } return (TRUE); @@ -2442,18 +2440,3 @@ save_mm_toggle_update (GtkWidget *widget, } } } - - -/* Show a message. Where to show it, depends on the runmode */ -static void show_message (char *message) - -{ -#ifdef Simple_Message_Box_Available - /* If there would be a simple message box like the one */ - /* used in ../app/interface.h, I would like to use it. */ - if (l_run_mode == RUN_INTERACTIVE) - gtk_message_box (message); - else -#endif - fprintf (stderr, "ps: %s\n", message); -} diff --git a/plug-ins/psd/psd.c b/plug-ins/psd/psd.c index 884ec73a17..e0f2273ce0 100644 --- a/plug-ins/psd/psd.c +++ b/plug-ins/psd/psd.c @@ -447,7 +447,7 @@ psd_type_to_gimp_base_type (psd_imagetype psdtype) case PSD_INDEXEDA_IMAGE: case PSD_INDEXED_IMAGE: return(INDEXED); default: - printf("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n"); + g_message ("PSD: Error: Can't convert PSD imagetype to GIMP imagetype\n"); gimp_quit(); return(RGB); } @@ -464,7 +464,7 @@ psd_mode_to_gimp_base_type (gushort psdtype) case 2: return(INDEXED); case 3: return(RGB); default: - printf("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n"); + g_message ("PSD: Error: Can't convert PSD mode to GIMP base imagetype\n"); gimp_quit(); return(RGB); } @@ -715,7 +715,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum) if (psd_image.layer[layernum].num_channels > MAX_CHANNELS) { - printf("\nPSD: Sorry - this image has too many channels. Tell Adam!\n"); + g_message ("\nPSD: Sorry - this image has too many channels. Tell Adam!\n"); gimp_quit(); } @@ -744,7 +744,7 @@ do_layer_record(FILE *fd, guint32 *offset, gint layernum) if (strncmp(sig, "8BIM", 4)!=0) { - printf("PSD: Error - layer blend signature is incorrect. :-(\n"); + g_message ("PSD: Error - layer blend signature is incorrect. :-(\n"); gimp_quit(); } @@ -884,7 +884,7 @@ do_layer_struct(FILE *fd, guint32 *offset) if (psd_image.num_layers > MAX_LAYERS) { - printf("\nPSD: Sorry - this image has too many layers. Tell Adam!\n"); + g_message ("\nPSD: Sorry - this image has too many layers. Tell Adam!\n"); gimp_quit(); } @@ -1003,7 +1003,7 @@ do_layer_pixeldata(FILE *fd, guint32 *offset) } break; default: /* *unknown* */ - printf("*** Unknown compression type in channel.\n"); + g_message ("*** Unknown compression type in channel.\n"); gimp_quit(); break; } diff --git a/plug-ins/uri/uri-backend-wget.c b/plug-ins/uri/uri-backend-wget.c index 424d84fe34..1b15974bce 100644 --- a/plug-ins/uri/uri-backend-wget.c +++ b/plug-ins/uri/uri-backend-wget.c @@ -128,7 +128,7 @@ load_image (char *filename) if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("url: can't open URL without an extension\n"); + g_message ("url: can't open URL without an extension\n"); return -1; } @@ -141,13 +141,13 @@ load_image (char *filename) if ((pid = fork()) < 0) { - g_warning ("url: fork failed: %s\n", g_strerror(errno)); + g_message ("url: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { execlp ("wget", "wget", filename, "-O", tmpname, NULL); - g_warning ("url: exec failed: wget: %s\n", g_strerror(errno)); + g_message ("url: exec failed: wget: %s\n", g_strerror(errno)); _exit(127); } else @@ -157,7 +157,7 @@ load_image (char *filename) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("url: wget exited abnormally on URL %s\n", filename); + g_message ("url: wget exited abnormally on URL %s\n", filename); return -1; } } diff --git a/plug-ins/uri/uri.c b/plug-ins/uri/uri.c index 424d84fe34..1b15974bce 100644 --- a/plug-ins/uri/uri.c +++ b/plug-ins/uri/uri.c @@ -128,7 +128,7 @@ load_image (char *filename) if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("url: can't open URL without an extension\n"); + g_message ("url: can't open URL without an extension\n"); return -1; } @@ -141,13 +141,13 @@ load_image (char *filename) if ((pid = fork()) < 0) { - g_warning ("url: fork failed: %s\n", g_strerror(errno)); + g_message ("url: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { execlp ("wget", "wget", filename, "-O", tmpname, NULL); - g_warning ("url: exec failed: wget: %s\n", g_strerror(errno)); + g_message ("url: exec failed: wget: %s\n", g_strerror(errno)); _exit(127); } else @@ -157,7 +157,7 @@ load_image (char *filename) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("url: wget exited abnormally on URL %s\n", filename); + g_message ("url: wget exited abnormally on URL %s\n", filename); return -1; } } diff --git a/plug-ins/url/url.c b/plug-ins/url/url.c index 424d84fe34..1b15974bce 100644 --- a/plug-ins/url/url.c +++ b/plug-ins/url/url.c @@ -128,7 +128,7 @@ load_image (char *filename) if (!ext || ext[1] == 0 || strchr(ext, '/')) { - g_warning ("url: can't open URL without an extension\n"); + g_message ("url: can't open URL without an extension\n"); return -1; } @@ -141,13 +141,13 @@ load_image (char *filename) if ((pid = fork()) < 0) { - g_warning ("url: fork failed: %s\n", g_strerror(errno)); + g_message ("url: fork failed: %s\n", g_strerror(errno)); return -1; } else if (pid == 0) { execlp ("wget", "wget", filename, "-O", tmpname, NULL); - g_warning ("url: exec failed: wget: %s\n", g_strerror(errno)); + g_message ("url: exec failed: wget: %s\n", g_strerror(errno)); _exit(127); } else @@ -157,7 +157,7 @@ load_image (char *filename) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - g_warning ("url: wget exited abnormally on URL %s\n", filename); + g_message ("url: wget exited abnormally on URL %s\n", filename); return -1; } } diff --git a/plug-ins/xd/xd.c b/plug-ins/xd/xd.c index ca71ec39ed..118f268f53 100644 --- a/plug-ins/xd/xd.c +++ b/plug-ins/xd/xd.c @@ -215,7 +215,7 @@ get_name_ver_and_xd (gchar* filename0, if (!ext1 || strcmp (ext1, ".xd") != 0) { - g_warning ("xd: unrecognized extension %s\n", filename); + g_message ("xd: unrecognized extension %s\n", filename); goto bail; } @@ -225,7 +225,7 @@ get_name_ver_and_xd (gchar* filename0, if (!ext2) { - g_warning ("xd: unrecognized extension %s\n", filename); + g_message ("xd: unrecognized extension %s\n", filename); goto bail; } @@ -237,7 +237,7 @@ get_name_ver_and_xd (gchar* filename0, if (end[0] != 0 || *version < 0) { - g_warning ("xd: illegal version number %s\n", ext2+1); + g_message ("xd: illegal version number %s\n", ext2+1); goto bail; } @@ -248,7 +248,7 @@ get_name_ver_and_xd (gchar* filename0, if (!ext3) { - g_warning ("xd: unrecognized extension %s\n", filename); + g_message ("xd: unrecognized extension %s\n", filename); goto bail; } @@ -268,14 +268,14 @@ get_name_ver_and_xd (gchar* filename0, if (!*xd) { - g_warning ("xd: open failed: %s\n", gdbm_strerror (gdbm_errno)); + g_message ("xd: open failed: %s\n", gdbm_strerror (gdbm_errno)); return FALSE; } if (*version > ((*xd)->versions + (save_or_n_load && 1))) { - g_warning ("xd: version number too high\n"); + g_message ("xd: version number too high\n"); goto bail; } @@ -364,7 +364,7 @@ save_image (char *filename, { xd_close (xd); unlink (tmpname); - g_warning ("xd: checkin failed\n"); + g_message ("xd: checkin failed\n"); return -1; } @@ -397,7 +397,7 @@ load_image (char *filename, gint32 run_mode, gboolean interactive) if (xd_checkout (xd, tmpname, ver) != 0) { - g_warning ("xd: checkout failed\n"); + g_message ("xd: checkout failed\n"); xd_close (xd); return -1; } @@ -532,7 +532,7 @@ get_buffer (XdFile* xd, gchar* ext, gint ver) if (xd_checkout (xd, tmpname, ver) != 0) { - g_warning ("xd: checkout failed\n"); + g_message ("xd: checkout failed\n"); return err; } @@ -598,7 +598,7 @@ get_buffer (XdFile* xd, gchar* ext, gint ver) bail: - g_warning ("xd: save failed in preview generation\n"); + g_message ("xd: save failed in preview generation\n"); return err; } @@ -613,7 +613,7 @@ gdk_pixmap_create_from_xpm_b (GdkWindow *window, gchar* foo = "/tmp/foo.xpm"; FILE* f; - g_warning ("gdk_pixmap_create_from_xpm: this proceedure is slow because Peter is a wuss. it should be rewritten."); + g_print ("gdk_pixmap_create_from_xpm: this proceedure is slow because Peter is a wuss. it should be rewritten."); f = fopen (foo, "w");