mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 12:02:32 +00:00
disallow the empty string as token. Spotted by Kevin Cozens.
2004-10-04 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/gimprc.pdb (gimprc_query, gimprc_set): disallow the empty string as token. Spotted by Kevin Cozens. * app/pdb/gimprc_cmds.c: regenerated.
This commit is contained in:
parent
cb18a9bd42
commit
f20872950d
|
@ -1,3 +1,10 @@
|
|||
2004-10-04 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* tools/pdbgen/pdb/gimprc.pdb (gimprc_query, gimprc_set): disallow
|
||||
the empty string as token. Spotted by Kevin Cozens.
|
||||
|
||||
* app/pdb/gimprc_cmds.c: regenerated.
|
||||
|
||||
2004-10-04 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpaspectpreview.c (gimp_aspect_preview_draw_buffer):
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
|
@ -70,11 +71,13 @@ gimprc_query_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
/* use edit_config because unknown tokens are set there */
|
||||
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
|
||||
if (strlen (token))
|
||||
{
|
||||
/* use edit_config because unknown tokens are set there */
|
||||
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
|
||||
}
|
||||
|
||||
if (! value)
|
||||
success = FALSE;
|
||||
success = (value != NULL);
|
||||
}
|
||||
|
||||
return_args = procedural_db_return_args (&gimprc_query_proc, success);
|
||||
|
@ -139,8 +142,13 @@ gimprc_set_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
/* use edit_config because that's the one that gets saved */
|
||||
gimp_rc_set_unknown_token (GIMP_RC (gimp->edit_config), token, value);
|
||||
if (strlen (token))
|
||||
{
|
||||
/* use edit_config because that's the one that gets saved */
|
||||
gimp_rc_set_unknown_token (GIMP_RC (gimp->edit_config), token, value);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&gimprc_set_proc, success);
|
||||
|
|
|
@ -56,11 +56,13 @@ HELP
|
|||
vars => [ 'gchar *value = NULL' ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
/* use edit_config because unknown tokens are set there */
|
||||
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
|
||||
if (strlen (token))
|
||||
{
|
||||
/* use edit_config because unknown tokens are set there */
|
||||
value = gimp_rc_query (GIMP_RC (gimp->edit_config), token);
|
||||
}
|
||||
|
||||
if (! value)
|
||||
success = FALSE;
|
||||
success = (value != NULL);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -91,8 +93,13 @@ HELP
|
|||
headers => [ qw("config/gimpconfig.h") ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
/* use edit_config because that's the one that gets saved */
|
||||
gimp_rc_set_unknown_token (GIMP_RC (gimp->edit_config), token, value);
|
||||
if (strlen (token))
|
||||
{
|
||||
/* use edit_config because that's the one that gets saved */
|
||||
gimp_rc_set_unknown_token (GIMP_RC (gimp->edit_config), token, value);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -200,7 +207,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
@headers = qw("core/gimp.h");
|
||||
@headers = qw(<string.h> "core/gimp.h");
|
||||
|
||||
@procs = qw(gimprc_query gimprc_set
|
||||
get_default_comment get_monitor_resolution get_theme_dir
|
||||
|
|
Loading…
Reference in a new issue