[anjal] Moblin Bugzilla 3562: Window resizes for most operations.



commit a9aa7fbb94e183e1d6fec15447f00db4a2edd6b9
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Fri Jun 26 15:45:40 2009 +0530

    Moblin Bugzilla 3562: Window resizes for most operations.

 src/mail-folder-view.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/mail-folder-view.c b/src/mail-folder-view.c
index c5c6f2f..1f55dc9 100644
--- a/src/mail-folder-view.c
+++ b/src/mail-folder-view.c
@@ -72,6 +72,7 @@ struct  _MailFolderViewPrivate {
 	GtkWidget *info_spinner;
 	CamelOperation *cancel;
 	GtkCellRenderer *from_to;
+	GtkTreeViewColumn *cols[3];
 
 	char *folder_name;
 };
@@ -1216,9 +1217,14 @@ static void
 mfv_tree_resize (GtkWidget *w, GtkAllocation *req, GtkTreeViewColumn *col)
 {
 	MailFolderView *shell = g_object_get_data((GObject *)w, "shell");
-	if ((req->width - (gtk_tree_view_column_get_fixed_width(col)+66) > 10) && GTK_WIDGET_VISIBLE(shell->priv->folder_pane)) {
-		gtk_tree_view_column_set_fixed_width (col, req->width - 66);
-	}
+
+	gtk_tree_view_column_set_fixed_width (shell->priv->cols[2], 24);
+	gtk_tree_view_column_set_sizing (shell->priv->cols[2], GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+
+	if ((req->width - (gtk_tree_view_column_get_fixed_width(col)+56) > 1) && GTK_WIDGET_VISIBLE(shell->priv->folder_pane)) 
+		gtk_tree_view_column_set_fixed_width (shell->priv->cols[1], req->width - 56);
+	gtk_tree_view_column_set_fixed_width (shell->priv->cols[2], 16);
+
 	g_signal_handlers_disconnect_by_func (w, mfv_tree_resize, col);
 }
 
@@ -1457,6 +1463,7 @@ mail_folder_view_construct (MailFolderView *shell)
 	gtk_tree_view_column_set_title (column, _("Flags"));
 	gtk_tree_view_append_column (GTK_TREE_VIEW (shell->tree), column);
 	gtk_tree_view_column_set_resizable (column, TRUE);
+	shell->priv->cols[0] = column;
 
 	vbox = custom_cell_renderer_vbox_new ();
 	g_object_set_data ((GObject *)vbox, "mfv", shell);
@@ -1484,7 +1491,7 @@ mail_folder_view_construct (MailFolderView *shell)
 	
 	/* Create the single column */
 	column = gtk_tree_view_column_new ();
-
+	shell->priv->cols[1] = column;
 	/* FIXME: A Horrible Gtk+ hack I do. If the cell is activatable, keyboard scroll is *very* slow.
 	   Drawing the focus seems bad takes CPU there. Avoiding it. Specially when you do 5 down arrow and do
 	   the first up-arrow. I takes ~2 secs to respond. I bypass it by this.*/
@@ -1599,6 +1606,7 @@ mail_folder_view_construct (MailFolderView *shell)
 	gtk_tree_view_column_set_sizing  (column, GTK_TREE_VIEW_COLUMN_FIXED);	
 	gtk_tree_view_append_column (GTK_TREE_VIEW (shell->tree), column);
 	gtk_tree_view_column_set_resizable (column, TRUE);
+	shell->priv->cols[2] = column;
 
 	/* Another VBox for Delete/Junk */
 	vbox = custom_cell_renderer_vbox_new ();



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