[gtk+] label: Move function into only caller
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] label: Move function into only caller
- Date: Fri, 6 Jan 2012 04:24:04 +0000 (UTC)
commit 18ce0b21a06995864fa5e7417f0cf96f883d70cf
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 5 17:06:00 2012 +0100
label: Move function into only caller
gtk/gtklabel.c | 30 ++++++++++--------------------
1 files changed, 10 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 5ca9b1d..e6a629d 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -423,8 +423,6 @@ static void gtk_label_set_use_markup_internal (GtkLabel *label,
gboolean val);
static void gtk_label_set_use_underline_internal (GtkLabel *label,
gboolean val);
-static void gtk_label_set_attributes_internal (GtkLabel *label,
- PangoAttrList *attrs);
static void gtk_label_set_uline_text_internal (GtkLabel *label,
const gchar *str);
static void gtk_label_set_pattern_internal (GtkLabel *label,
@@ -2071,23 +2069,6 @@ gtk_label_compose_effective_attrs (GtkLabel *label)
}
}
-static void
-gtk_label_set_attributes_internal (GtkLabel *label,
- PangoAttrList *attrs)
-{
- GtkLabelPrivate *priv = label->priv;
-
- if (attrs)
- pango_attr_list_ref (attrs);
-
- if (priv->attrs)
- pango_attr_list_unref (priv->attrs);
- priv->attrs = attrs;
-
- g_object_notify (G_OBJECT (label), "attributes");
-}
-
-
/* Calculates text, attrs and mnemonic_keyval from
* label, use_underline and use_markup
*/
@@ -2174,9 +2155,18 @@ void
gtk_label_set_attributes (GtkLabel *label,
PangoAttrList *attrs)
{
+ GtkLabelPrivate *priv = label->priv;
+
g_return_if_fail (GTK_IS_LABEL (label));
- gtk_label_set_attributes_internal (label, attrs);
+ if (attrs)
+ pango_attr_list_ref (attrs);
+
+ if (priv->attrs)
+ pango_attr_list_unref (priv->attrs);
+ priv->attrs = attrs;
+
+ g_object_notify (G_OBJECT (label), "attributes");
gtk_label_recalculate (label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]