libgimpwidgets: don't treat -1 as value of enum PangoAttrType
This commit is contained in:
@ -1231,7 +1231,10 @@ gimp_label_set_attributes (GtkLabel *label,
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
PangoAttrType attr_type = va_arg (args, PangoAttrType);
|
PangoAttrType attr_type = va_arg (args, PangoAttrType);
|
||||||
|
|
||||||
|
if (attr_type == -1)
|
||||||
|
attr_type = PANGO_ATTR_INVALID;
|
||||||
|
|
||||||
switch (attr_type)
|
switch (attr_type)
|
||||||
{
|
{
|
||||||
@ -1307,7 +1310,6 @@ gimp_label_set_attributes (GtkLabel *label,
|
|||||||
default:
|
default:
|
||||||
g_warning ("%s: invalid PangoAttribute type %d",
|
g_warning ("%s: invalid PangoAttribute type %d",
|
||||||
G_STRFUNC, attr_type);
|
G_STRFUNC, attr_type);
|
||||||
case -1:
|
|
||||||
case PANGO_ATTR_INVALID:
|
case PANGO_ATTR_INVALID:
|
||||||
attr = NULL;
|
attr = NULL;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user