]> Pileus Git - ~andy/gtk/commitdiff
Set the attributes onto the PangoLayout even if they are newly created
authorOwen Taylor <otaylor@redhat.com>
Wed, 17 Jan 2001 21:32:34 +0000 (21:32 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 17 Jan 2001 21:32:34 +0000 (21:32 +0000)
Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>

* gtk/gtklabel.c (gtk_label_size_request): Set the
attributes onto the PangoLayout even if they are newly
created from label->pattern.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtklabel.c

index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index eb7f64a9c3bb15cbef370694a5eb7c1742b5d892..1bdaddba80e9182f6a2619b9c838be5751c95027 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 17 16:22:54 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtklabel.c (gtk_label_size_request): Set the
+       attributes onto the PangoLayout even if they are newly
+       created from label->pattern.
+
 Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/gdkdnd-x11.c: Remove unused variable.
index c5f7883b5352dc3944ecf3c6a870e4bd2b588c39..17036974e2ee3cdffc00b9880c6361b545e3c698 100644 (file)
@@ -513,15 +513,18 @@ gtk_label_size_request (GtkWidget      *widget,
        * permanently, and just modifes or creates the AttrList
        */
       if (label->attrs)
-        {
-          attrs = pango_attr_list_copy (label->attrs);
-          pango_layout_set_attributes (label->layout, attrs);
-        }
-      else
+       attrs = pango_attr_list_copy (label->attrs);
+      else if (label->pattern)
         attrs = pango_attr_list_new ();
-      
-      gtk_label_pattern_to_attrs (label, attrs);
-      pango_attr_list_unref (attrs);
+
+      if (label->pattern)
+       gtk_label_pattern_to_attrs (label, attrs);
+
+      if (attrs)
+       {
+         pango_layout_set_attributes (label->layout, attrs);
+         pango_attr_list_unref (attrs);
+       }
       
       switch (label->jtype)
        {