[evolution] Bug #632768 - Message list not realized when opening new folder



commit 0d4a84a5fe468d3f4c623501ac1943fc1c9f91f8
Author: Milan Crha <mcrha redhat com>
Date:   Wed Nov 3 11:19:28 2010 +0100

    Bug #632768 - Message list not realized when opening new folder

 mail/message-list.c    |    2 +-
 widgets/table/e-tree.c |   32 +++++++++++++++++---------------
 2 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/mail/message-list.c b/mail/message-list.c
index f46a88e..3c30fde 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1907,7 +1907,7 @@ static ECell * create_composite_cell (gint col)
 	cell_hbox = e_cell_hbox_new ();
 
 	/* Exclude the meeting icon. */
-	cell_attach = e_cell_toggle_new (attachment_icons, 2);
+	cell_attach = e_cell_toggle_new (attachment_icons, G_N_ELEMENTS (attachment_icons));
 
 	cell_date = e_cell_date_new (NULL, GTK_JUSTIFY_RIGHT);
 	e_cell_date_set_format_component (E_CELL_DATE (cell_date), "mail");
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 01db243..5f0effa 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -3637,23 +3637,25 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message)
 	gtk_widget_get_allocation (widget, &allocation);
 
 	if (!tree->priv->info_text) {
-		tree->priv->info_text = gnome_canvas_item_new (
-			GNOME_CANVAS_GROUP (gnome_canvas_root (tree->priv->table_canvas)),
-			e_text_get_type (),
-			"line_wrap", TRUE,
-			"clip", TRUE,
-			"justification", GTK_JUSTIFY_LEFT,
-			"text", info_message,
-			"draw_background", FALSE,
-			"width", (gdouble) allocation.width - 60.0,
-			"clip_width", (gdouble) allocation.width - 60.0,
-			NULL);
+		if (allocation.width > 60) {
+			tree->priv->info_text = gnome_canvas_item_new (
+				GNOME_CANVAS_GROUP (gnome_canvas_root (tree->priv->table_canvas)),
+				e_text_get_type (),
+				"line_wrap", TRUE,
+				"clip", TRUE,
+				"justification", GTK_JUSTIFY_LEFT,
+				"text", info_message,
+				"draw_background", FALSE,
+				"width", (gdouble) allocation.width - 60.0,
+				"clip_width", (gdouble) allocation.width - 60.0,
+				NULL);
 
-		e_canvas_item_move_absolute (tree->priv->info_text, 30, 30);
+			e_canvas_item_move_absolute (tree->priv->info_text, 30, 30);
 
-		tree->priv->info_text_resize_id = g_signal_connect (
-			tree, "size_allocate",
-			G_CALLBACK (tree_size_allocate), tree);
+			tree->priv->info_text_resize_id = g_signal_connect (
+				tree, "size_allocate",
+				G_CALLBACK (tree_size_allocate), tree);
+		}
 	} else
 		gnome_canvas_item_set (tree->priv->info_text, "text", info_message, NULL);
 }



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