Commit 6ddbb705 authored by Manish Singh's avatar Manish Singh

more g_message changes

* more g_message changes

* CEL plugin update

* INSTALL: info on why plugins don't get built

-Yosh
parent 9bb6ea89
Fri May 29 23:54:42 PDT 1998 Manish Singh <yosh@gimp.org>
* 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 <msw@gimp.org> Sat May 30 02:03:19 EDT 1998 Matthew Wilson <msw@gimp.org>
* plug-ins/grid/grid.c: fix by sjburges to fix grid on selections. * plug-ins/grid/grid.c: fix by sjburges to fix grid on selections.
......
...@@ -115,6 +115,33 @@ After fixing a problem, it is safest to delete the file 'config.cache' ...@@ -115,6 +115,33 @@ After fixing a problem, it is safest to delete the file 'config.cache'
before re-running ./configure. 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<path_to_library> -L<path_to_another_one>"
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<path_to_header_file> -I<path_to_another_one>"
before you run configure.
It's wise to remove the file 'config.cache' before re-running configure.
Generic Instructions for Building Auto-Configured Packages Generic Instructions for Building Auto-Configured Packages
========================================================== ==========================================================
......
...@@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -283,7 +283,7 @@ about_dialog_load_logo (GtkWidget *window)
sprintf (buf, "%s/gimp_logo.ppm", DATADIR); sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
fp = fopen (buf, "r"); fp = fopen (buf, "rb");
if (!fp) if (!fp)
return 0; return 0;
......
...@@ -242,13 +242,13 @@ plug_in_init () ...@@ -242,13 +242,13 @@ plug_in_init ()
{ {
shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777); shm_ID = shmget (IPC_PRIVATE, TILE_WIDTH * TILE_HEIGHT * 4, IPC_CREAT | 0777);
if (shm_ID == -1) 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 else
{ {
shm_addr = (guchar*) shmat (shm_ID, 0, 0); shm_addr = (guchar*) shmat (shm_ID, 0, 0);
if (shm_addr == (guchar*) -1) 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; shm_ID = -1;
} }
...@@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg) ...@@ -1179,18 +1179,18 @@ plug_in_handle_message (WireMessage *msg)
plug_in_handle_quit (); plug_in_handle_quit ();
break; break;
case GP_CONFIG: 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); plug_in_close (current_plug_in, TRUE);
break; break;
case GP_TILE_REQ: case GP_TILE_REQ:
plug_in_handle_tile_req (msg->data); plug_in_handle_tile_req (msg->data);
break; break;
case GP_TILE_ACK: 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); plug_in_close (current_plug_in, TRUE);
break; break;
case GP_TILE_DATA: 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); plug_in_close (current_plug_in, TRUE);
break; break;
case GP_PROC_RUN: case GP_PROC_RUN:
...@@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg) ...@@ -1201,7 +1201,7 @@ plug_in_handle_message (WireMessage *msg)
plug_in_close (current_plug_in, FALSE); plug_in_close (current_plug_in, FALSE);
break; break;
case GP_TEMP_PROC_RUN: 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); plug_in_close (current_plug_in, TRUE);
break; break;
case GP_TEMP_PROC_RETURN: case GP_TEMP_PROC_RETURN:
...@@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1248,21 +1248,21 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
if (!gp_tile_data_write (current_writefd, &tile_data)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
if (!wire_read_msg (current_readfd, &msg)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
if (msg.type != GP_TILE_DATA) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1276,7 +1276,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
if (!tm) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1284,7 +1284,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
tile = tile_manager_get (tm, tile_info->tile_num, 0); tile = tile_manager_get (tm, tile_info->tile_num, 0);
if (!tile) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1301,7 +1301,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
wire_destroy (&msg); wire_destroy (&msg);
if (!gp_tile_ack_write (current_writefd)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1315,7 +1315,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
if (!tm) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1323,7 +1323,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
tile = tile_manager_get (tm, tile_req->tile_num, 0); tile = tile_manager_get (tm, tile_req->tile_num, 0);
if (!tile) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1345,7 +1345,7 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
if (!gp_tile_data_write (current_writefd, &tile_data)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req) ...@@ -1354,14 +1354,14 @@ plug_in_handle_tile_req (GPTileReq *tile_req)
if (!wire_read_msg (current_readfd, &msg)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
if (msg.type != GP_TILE_ACK) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) ...@@ -1385,7 +1385,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
if (!proc_rec) if (!proc_rec)
{ {
/* THIS IS PROBABLY NOT CORRECT -josh */ /* 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); plug_in_args_destroy (args, proc_run->nparams, FALSE);
return; return;
} }
...@@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run) ...@@ -1409,7 +1409,7 @@ plug_in_handle_proc_run (GPProcRun *proc_run)
if (!gp_proc_return_write (current_writefd, &proc_return)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return) ...@@ -1453,7 +1453,7 @@ plug_in_handle_proc_return (GPProcReturn *proc_return)
plug_in_push (blocked->plug_in); plug_in_push (blocked->plug_in);
if (!gp_proc_return_write (current_writefd, proc_return)) 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); plug_in_close (current_plug_in, TRUE);
return; return;
} }
...@@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1492,7 +1492,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
if ((proc_install->nparams < 1) || if ((proc_install->nparams < 1) ||
(proc_install->params[0].type != PDB_INT32)) (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", "does not take the standard plug-in args",
current_plug_in->args[0], proc_install->name); current_plug_in->args[0], proc_install->name);
return; return;
...@@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1505,7 +1505,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
(proc_install->params[1].type != PDB_IMAGE) || (proc_install->params[1].type != PDB_IMAGE) ||
(proc_install->params[2].type != PDB_DRAWABLE)) (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", "does not take the standard plug-in args",
current_plug_in->args[0], proc_install->name); current_plug_in->args[0], proc_install->name);
return; return;
...@@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1518,7 +1518,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
(proc_install->params[1].type != PDB_STRING) || (proc_install->params[1].type != PDB_STRING) ||
(proc_install->params[2].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", "does not take the standard plug-in args",
current_plug_in->args[0], proc_install->name); current_plug_in->args[0], proc_install->name);
return; return;
...@@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1533,7 +1533,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
(proc_install->params[3].type != PDB_STRING) || (proc_install->params[3].type != PDB_STRING) ||
(proc_install->params[4].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", "does not take the standard plug-in args",
current_plug_in->args[0], proc_install->name); current_plug_in->args[0], proc_install->name);
return; return;
...@@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1541,7 +1541,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
} }
else 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 \"<Toolbox>\", \"<Image>\", " "an invalid menu location. Use either \"<Toolbox>\", \"<Image>\", "
"\"<Load>\", or \"<Save>\".", "\"<Load>\", or \"<Save>\".",
current_plug_in->args[0], proc_install->name); current_plug_in->args[0], proc_install->name);
...@@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install) ...@@ -1561,7 +1561,7 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
proc_install->params[i].type == PDB_STRINGARRAY) && proc_install->params[i].type == PDB_STRINGARRAY) &&
proc_install->params[i-1].type != PDB_INT32) proc_install->params[i-1].type != PDB_INT32)
{ {
g_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 " "which fails to comply with the array parameter "
"passing standard. Argument %d is noncompliant.", "passing standard. Argument %d is noncompliant.",
current_plug_in->args[0], proc_install->name, i); current_plug_in->args[0], proc_install->name, i);
...@@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget, ...@@ -2142,7 +2142,7 @@ plug_in_callback (GtkWidget *widget,
} }
else 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); g_free (args);
return; return;
} }
...@@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget, ...@@ -2161,7 +2161,7 @@ plug_in_callback (GtkWidget *widget,
} }
else 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); g_free (args);
return; return;
} }
...@@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params, ...@@ -2474,7 +2474,7 @@ plug_in_params_to_args (GPParam *params,
colorarray[2] = params[i].data.d_color.blue; colorarray[2] = params[i].data.d_color.blue;
break; break;
case PDB_REGION: case PDB_REGION:
g_warning ("the \"region\" arg type is not currently supported"); g_message ("the \"region\" arg type is not currently supported");
break; break;
case PDB_DISPLAY: case PDB_DISPLAY:
args[i].value.pdb_int = params[i].data.d_display; args[i].value.pdb_int = params[i].data.d_display;
...@@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args, ...@@ -2632,7 +2632,7 @@ plug_in_args_to_params (Argument *args,
} }
break; break;
case PDB_REGION: case PDB_REGION:
g_warning ("the \"region\" arg type is not currently supported"); g_message ("the \"region\" arg type is not currently supported");
break; break;
case PDB_DISPLAY: case PDB_DISPLAY:
params[i].data.d_display = args[i].value.pdb_int; params[i].data.d_display = args[i].value.pdb_int;
...@@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params, ...@@ -2716,7 +2716,7 @@ plug_in_params_destroy (GPParam *params,
case PDB_COLOR: case PDB_COLOR:
break; break;
case PDB_REGION: case PDB_REGION:
g_warning ("the \"region\" arg type is not currently supported"); g_message ("the \"region\" arg type is not currently supported");
break; break;
case PDB_DISPLAY: case PDB_DISPLAY:
case PDB_IMAGE: case PDB_IMAGE:
...@@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args, ...@@ -2790,7 +2790,7 @@ plug_in_args_destroy (Argument *args,
g_free (args[i].value.pdb_pointer); g_free (args[i].value.pdb_pointer);
break; break;
case PDB_REGION: case PDB_REGION:
g_warning ("the \"region\" arg type is not currently supported"); g_message ("the \"region\" arg type is not currently supported");
break; break;
case PDB_DISPLAY: case PDB_DISPLAY:
case PDB_IMAGE: case PDB_IMAGE:
......
...@@ -516,7 +516,8 @@ app_init (void) ...@@ -516,7 +516,8 @@ app_init (void)
render_setup (transparency_type, transparency_size); render_setup (transparency_type, transparency_size);
tools_options_dialog_new (); tools_options_dialog_new ();
tools_select (RECT_SELECT); 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 (); color_transfer_init ();
...@@ -539,6 +540,8 @@ app_exit_finish (void) ...@@ -539,6 +540,8 @@ app_exit_finish (void)
return; return;
is_app_exit_finish_done = TRUE; is_app_exit_finish_done = TRUE;
g_set_message_handler (&message_console_func);
lc_dialog_free (); lc_dialog_free ();
gdisplays_delete (); gdisplays_delete ();
global_edit_free (); global_edit_free ();
......
...@@ -33,5 +33,7 @@ extern int no_splash; ...@@ -33,5 +33,7 @@ extern int no_splash;
extern int no_splash_image; extern int no_splash_image;
extern int no_data; extern int no_data;
extern int be_verbose; extern int be_verbose;
extern int use_debug_handler;
extern int console_messages;
#endif /* APPENV_H */ #endif /* APPENV_H */
...@@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs, ...@@ -467,7 +467,7 @@ sort_boundary (BoundSeg *segs,
} }
if (x != startx || y != starty) if (x != startx || y != starty)
g_warning ("Unconnected boundary group!"); g_message ("sort_boundary(): Unconnected boundary group!");
/* Mark the end of a group */ /* Mark the end of a group */
*num_groups = *num_groups + 1; *num_groups = *num_groups + 1;
......
...@@ -621,7 +621,7 @@ static void ...@@ -621,7 +621,7 @@ static void
color_balance_preview (ColorBalanceDialog *cbd) color_balance_preview (ColorBalanceDialog *cbd)
{ {
if (!cbd->image_map) if (!cbd->image_map)
g_warning ("No image map"); g_message ("color_balance_preview(): No image map");
active_tool->preserve = TRUE; active_tool->preserve = TRUE;
image_map_apply (cbd->image_map, color_balance, (void *) cbd); image_map_apply (cbd->image_map, color_balance, (void *) cbd);
active_tool->preserve = FALSE; active_tool->preserve = FALSE;
......
...@@ -817,7 +817,7 @@ static void ...@@ -817,7 +817,7 @@ static void
curves_preview (CurvesDialog *cd) curves_preview (CurvesDialog *cd)
{ {
if (!cd->image_map) 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... */ active_tool->preserve = TRUE; /* Going to dirty the display... */
......
...@@ -734,7 +734,7 @@ static void ...@@ -734,7 +734,7 @@ static void
hue_saturation_preview (HueSaturationDialog *hsd) hue_saturation_preview (HueSaturationDialog *hsd)
{ {
if (!hsd->image_map) if (!hsd->image_map)
g_warning ("No image map"); g_message ("hue_saturation_preview(): No image map");
active_tool->preserve = TRUE; active_tool->preserve = TRUE;