[glade3/glade-3-8] * plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType, closes bug 597
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3/glade-3-8] * plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType, closes bug 597
- Date: Thu, 13 Jan 2011 09:34:41 +0000 (UTC)
commit c10f72fd380a1d4da3179d11bc4be06e860658c7
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Jan 13 18:41:45 2011 +0900
* plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType,
closes bug 597045.
Conflicts:
ChangeLog
plugins/gtk+/glade-attributes.c
ChangeLog | 5 +++++
plugins/gtk+/glade-attributes.c | 23 ++---------------------
2 files changed, 7 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9c5adfd..a710596 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-13 Tristan Van Berkom <tristanvb openismus com>
+
+ * plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType,
+ closes bug 597045.
+
2011-01-09 Tristan Van Berkom <tristanvb openismus com>
* gladeui/glade-editor.c: Make query dialog come with a "Create" button instead
diff --git a/plugins/gtk+/glade-attributes.c b/plugins/gtk+/glade-attributes.c
index 0d4f7fc..e566bbe 100755
--- a/plugins/gtk+/glade-attributes.c
+++ b/plugins/gtk+/glade-attributes.c
@@ -510,25 +510,6 @@ glade_gtk_string_from_attr (GladeAttribute *gattr)
return ret;
}
-static gint
-enum_value_from_string (PangoAttrType type, const gchar *strval)
-{
- GEnumClass *enum_class;
- GEnumValue *enum_value;
- gint value = 0;
-
- enum_class = g_type_class_ref (type_from_attr_type (type));
- if ((enum_value = g_enum_get_value_by_nick (enum_class, strval)) != NULL)
- value = enum_value->value;
- else
- g_critical ("Couldnt find enum value for %s, type %s",
- strval, g_type_name (type_from_attr_type (type)));
-
- g_type_class_unref (enum_class);
-
- return value;
-}
-
GladeAttribute *
glade_gtk_attribute_from_string (PangoAttrType type,
const gchar *strval)
@@ -559,10 +540,10 @@ glade_gtk_attribute_from_string (PangoAttrType type,
/* Enums ... */
g_value_init (&(gattr->value), type_from_attr_type (type));
- g_value_set_enum (&(gattr->value), enum_value_from_string (type, strval));
+ g_value_set_enum (&(gattr->value),
+ glade_utils_enum_value_from_string (type_from_attr_type (type), strval));
break;
-
case PANGO_ATTR_UNDERLINE:
case PANGO_ATTR_STRIKETHROUGH:
/* Booleans */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]