summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-01-09 23:24:20 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-01-09 23:24:20 +0000
commit85267e9224f8ffec7aeafb8ccbed583d60e7bf4c (patch)
tree9bc3d863efb36335af01de375ad02509b1005059 /gtk/gtklabel.c
parent637c61da761f10836994c47c70a80735889506d7 (diff)
downloadgtk+-85267e9224f8ffec7aeafb8ccbed583d60e7bf4c.tar.gz
don't draw if label->layout is NULL due to a pending resize
2001-01-09 Havoc Pennington <hp@redhat.com> * gtk/gtklabel.c (gtk_label_expose): don't draw if label->layout is NULL due to a pending resize * gtk/gtktreeview.c (gtk_tree_view_check_dirty): don't set the column width to values less than 1 * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_width): clamp width to be between min/max width, and still set the width even if autosize is turned on, so the tree view can use this function in order to autosize. (gtk_tree_view_column_init): set initial width to 1 not 0 * gtk/gtktreeview.c (gtk_tree_view_size_request_buttons): use setter function to modify column width, so we get notification (gtk_tree_view_insert_iter_height): ditto (gtk_tree_view_calc_size): ditto (gtk_tree_view_check_dirty): ditto * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init): Add properties to change all the interesting attributes of the tree view column. (gtk_tree_view_column_set_header_clickable): rename set_clickable (gtk_tree_view_column_get_clickable): add (gtk_tree_view_column_set_cell_renderer): don't unset the current attributes; assume a cell renderer with equivalent object properties has been swapped in. Do g_object_notify(). (gtk_tree_view_column_set_visible): g_object_notify (gtk_tree_view_column_get_sizing): rename from get_col_type (gtk_tree_view_column_set_sizing): g_object_notify (gtk_tree_view_column_set_width): add g_object_notify (gtk_tree_view_column_set_min_width): ditto (gtk_tree_view_column_set_max_width): ditto (gtk_tree_view_column_set_title): ditto (gtk_tree_view_column_set_clickable): ditto (gtk_tree_view_column_set_widget): ditto (gtk_tree_view_column_set_justification): ditto
Diffstat (limited to 'gtk/gtklabel.c')
-rw-r--r--gtk/gtklabel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index e443c2dfa7..c5f7883b53 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -711,9 +711,13 @@ gtk_label_expose (GtkWidget *widget,
g_return_val_if_fail (event != NULL, FALSE);
label = GTK_LABEL (widget);
-
+
+ /* if label->layout is NULL it means we got a set_text since
+ * our last size request, so a resize should be queued,
+ * which means a full expose is in the queue anyway.
+ */
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget) &&
- label->label && (*label->label != '\0'))
+ label->layout && label->label && (*label->label != '\0'))
{
misc = GTK_MISC (widget);