[gthumb] empty list: set has_window to TRUE



commit 971e4ee30d1e5e35bb827c274c9a1599044861cb
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Nov 17 18:12:50 2011 +0100

    empty list: set has_window to TRUE

 gthumb/gth-empty-list.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-empty-list.c b/gthumb/gth-empty-list.c
index d80f91b..6d4d678 100644
--- a/gthumb/gth-empty-list.c
+++ b/gthumb/gth-empty-list.c
@@ -206,12 +206,16 @@ gth_empty_list_draw (GtkWidget *widget,
 	GtkStyleContext *style_context;
 	GtkAllocation    allocation;
 
+	if (! gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
+		return FALSE;
+
 	style_context = gtk_widget_get_style_context (widget);
 
 	gtk_widget_get_allocation (widget, &allocation);
+
 	gtk_render_frame (style_context, cr,
-			  allocation.x,
-			  allocation.y,
+			  0,
+			  0,
 			  allocation.width,
 			  allocation.height);
 
@@ -272,7 +276,11 @@ gth_empty_list_init (GthEmptyList *self)
 {
 	GtkStyleContext *style_context;
 
+	gtk_widget_set_has_window (GTK_WIDGET (self), TRUE);
+
 	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_EMPTY_LIST, GthEmptyListPrivate);
+	self->priv->layout = NULL;
+	self->priv->text = NULL;
 
 	style_context = gtk_widget_get_style_context (GTK_WIDGET (self));
 	gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_VIEW);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]