[anjal] More scrolling coolness



commit c7bb6de923c4564c430d106a8146d9d5b47555a8
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Tue Apr 28 21:40:55 2009 +0530

    More scrolling coolness
---
 src/mail-conv-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mail-conv-view.c b/src/mail-conv-view.c
index bfcd5db..3b38736 100644
--- a/src/mail-conv-view.c
+++ b/src/mail-conv-view.c
@@ -212,7 +212,7 @@ mcv_adjust_scroll(MailConvView *mcv, MailMessageView *mmv)
 
 	ret = gtk_widget_translate_coordinates (mcv->priv->selected_child->data, mcv->child_box, 0, 0, &x, &y);
 	height = ((GtkContainer *)mcv->child_box)->focus_child->allocation.height;
-	gtk_adjustment_clamp_page (adj, y + height, y+height+gtk_adjustment_get_page_increment(adj));
+	gtk_adjustment_clamp_page (adj, y + height, y+height+gtk_adjustment_get_page_increment(adj)-36);
 }
 
 static void
@@ -309,15 +309,16 @@ mcv_message_removed (MailMessageView *mmv, MailConvView *mcv)
 		g_warning ("Unable to find the deleted  mail in conversation\n");
 }
 
+
 static void
 mcv_message_reply (MailMessageView *mmv, MailConvView *mcv)
 {
 	int x, y, height, ret;
 	GtkAdjustment *adj = gtk_viewport_get_vadjustment(mcv->priv->viewport);
 
-	ret = gtk_widget_translate_coordinates (mmv->footer, mmv->comp_view, 0, 0, &x, &y);
-//	height = ((GtkContainer *)mmv->comp_view)->focus_child->allocation.height;
-	gtk_adjustment_clamp_page (adj, y, y+600);
+	ret = gtk_widget_translate_coordinates (mail_message_view_get_focus_widget (mmv), mmv->comp_view, 0, 0, &x, &y);
+	gtk_adjustment_clamp_page (adj, y, y+((GtkWidget *)mmv)->allocation.height);
+	gtk_adjustment_set_value (adj,  y+((GtkWidget *)mmv)->allocation.height);
 }
 
 void



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