Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ZenWalker
Glade
Commits
d7e7d16b
Commit
d7e7d16b
authored
Jan 13, 2011
by
Tristan Van Berkom
Browse files
* plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType,
closes bug 597045.
parent
ffd323a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d7e7d16b
...
...
@@ -6,6 +6,9 @@
* gladeui/glade-signal-editor.c: Left align the warning icon and expand the first
row of the signal tree when loading a widget.
* plugins/gtk+/glade-attributes.c: Fixed mismatching PangoAttributeType with GType,
closes bug 597045.
2011-01-12 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-palette.c: Fixed leaking project (set_project NULL when
...
...
plugins/gtk+/glade-attributes.c
View file @
d7e7d16b
...
...
@@ -148,7 +148,8 @@ GLADE_MAKE_EPROP (GladeEPropAttrs, glade_eprop_attrs)
(type) == EDIT_SPIN ? COLUMN_SPIN_ACTIVE : \
(type) == EDIT_COMBO ? COLUMN_COMBO_ACTIVE: COLUMN_BUTTON_ACTIVE)
static
GtkListStore
*
get_enum_model_for_combo
(
PangoAttrType
type
)
static
GtkListStore
*
get_enum_model_for_combo
(
PangoAttrType
type
)
{
static
GtkListStore
*
style_store
=
NULL
,
*
weight_store
=
NULL
,
*
variant_store
=
NULL
,
...
...
@@ -521,25 +522,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
)
{
...
...
@@ -570,10 +552,9 @@ glade_gtk_attribute_from_string (PangoAttrType type, const gchar * strval)
/* Enums ... */
g_value_init
(
&
(
gattr
->
value
),
type_from_attr_type
(
type
));
g_value_set_enum
(
&
(
gattr
->
value
),
enum_value_from_string
(
type
,
strval
));
glade_utils_
enum_value_from_string
(
type
_from_attr_type
(
type
)
,
strval
));
break
;
case
PANGO_ATTR_UNDERLINE
:
case
PANGO_ATTR_STRIKETHROUGH
:
/* Booleans */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment