[gimp] libgimpwidgets: don't treat -1 as value of enum PangoAttrType
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: don't treat -1 as value of enum PangoAttrType
- Date: Thu, 17 Mar 2011 14:29:17 +0000 (UTC)
commit c6e35435adba1cb8e1b9e8d2ceabe6ae024dc429
Author: Michael Natterer <mitch gimp org>
Date: Thu Mar 17 15:28:41 2011 +0100
libgimpwidgets: don't treat -1 as value of enum PangoAttrType
libgimpwidgets/gimpwidgets.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgimpwidgets/gimpwidgets.c b/libgimpwidgets/gimpwidgets.c
index 6fea129..a1b0ef6 100644
--- a/libgimpwidgets/gimpwidgets.c
+++ b/libgimpwidgets/gimpwidgets.c
@@ -1231,7 +1231,10 @@ gimp_label_set_attributes (GtkLabel *label,
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)
{
@@ -1307,7 +1310,6 @@ gimp_label_set_attributes (GtkLabel *label,
default:
g_warning ("%s: invalid PangoAttribute type %d",
G_STRFUNC, attr_type);
- case -1:
case PANGO_ATTR_INVALID:
attr = NULL;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]