Allow None to be passed for PDB_DISPLAY.

2008-07-10  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-pdb.c: Allow None to be passed for
        PDB_DISPLAY.

svn path=/trunk/; revision=26107
This commit is contained in:
Manish Singh 2008-07-10 18:22:08 +00:00 committed by Manish Singh
parent 7b1dce4481
commit 874870be13
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-07-10 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/pygimp-pdb.c: Allow None to be passed for
PDB_DISPLAY.
2008-07-10 Sven Neumann <sven@gimp.org> 2008-07-10 Sven Neumann <sven@gimp.org>
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): * app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui):

View File

@ -481,6 +481,10 @@ pygimp_param_from_tuple(PyObject *args, const GimpParamDef *ptype, int nparams)
ret[i].data.d_region.height = PyInt_AsLong(h); ret[i].data.d_region.height = PyInt_AsLong(h);
break; break;
case GIMP_PDB_DISPLAY: case GIMP_PDB_DISPLAY:
if (item == Py_None) {
ret[i].data.d_display = -1;
break;
}
check(!pygimp_display_check(item)); check(!pygimp_display_check(item));
ret[i].data.d_display = ((PyGimpDisplay *)item)->ID; ret[i].data.d_display = ((PyGimpDisplay *)item)->ID;
break; break;