text: Style cleanups
Inline wrapper functions, and remove deep nested if's.
This commit is contained in:
parent
1d55af9dfa
commit
15441bb280
@ -266,7 +266,7 @@ static void buffer_connect_signals (ClutterText *self);
|
|||||||
static void buffer_disconnect_signals (ClutterText *self);
|
static void buffer_disconnect_signals (ClutterText *self);
|
||||||
static ClutterTextBuffer *get_buffer (ClutterText *self);
|
static ClutterTextBuffer *get_buffer (ClutterText *self);
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
clutter_text_dirty_paint_volume (ClutterText *text)
|
clutter_text_dirty_paint_volume (ClutterText *text)
|
||||||
{
|
{
|
||||||
ClutterTextPrivate *priv = text->priv;
|
ClutterTextPrivate *priv = text->priv;
|
||||||
@ -278,7 +278,7 @@ clutter_text_dirty_paint_volume (ClutterText *text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
clutter_text_queue_redraw (ClutterActor *self)
|
clutter_text_queue_redraw (ClutterActor *self)
|
||||||
{
|
{
|
||||||
/* This is a wrapper for clutter_actor_queue_redraw that also
|
/* This is a wrapper for clutter_actor_queue_redraw that also
|
||||||
@ -387,15 +387,20 @@ clutter_text_get_display_text (ClutterText *self)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
clutter_text_ensure_effective_attributes (ClutterText *self)
|
clutter_text_ensure_effective_attributes (ClutterText *self)
|
||||||
{
|
{
|
||||||
ClutterTextPrivate *priv = self->priv;
|
ClutterTextPrivate *priv = self->priv;
|
||||||
|
|
||||||
/* If we already have the effective attributes then we don't need to
|
/* If we already have the effective attributes then we don't need to
|
||||||
do anything */
|
do anything */
|
||||||
if (priv->effective_attrs == NULL)
|
if (priv->effective_attrs != NULL)
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
/* same as if we don't have any attribute at all */
|
||||||
|
if (priv->attrs == NULL && priv->markup_attrs == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (priv->attrs != NULL)
|
if (priv->attrs != NULL)
|
||||||
{
|
{
|
||||||
/* If there are no markup attributes then we can just use
|
/* If there are no markup attributes then we can just use
|
||||||
@ -434,7 +439,6 @@ clutter_text_ensure_effective_attributes (ClutterText *self)
|
|||||||
/* We can just use the markup attributes directly */
|
/* We can just use the markup attributes directly */
|
||||||
priv->effective_attrs = pango_attr_list_ref (priv->markup_attrs);
|
priv->effective_attrs = pango_attr_list_ref (priv->markup_attrs);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PangoLayout *
|
static PangoLayout *
|
||||||
|
Loading…
Reference in New Issue
Block a user