pidgin: a7643cb3: Always top-align the logs in the log-vie...

sadrul at pidgin.im sadrul at pidgin.im
Tue Apr 29 17:50:42 EDT 2008


-----------------------------------------------------------------
Revision: a7643cb3d44dfc5f1f8196d364c9b98bd7215d94
Ancestor: 4631c04318880d3e20521e0177520e64546dd995
Author: sadrul at pidgin.im
Date: 2008-04-29T21:44:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a7643cb3d44dfc5f1f8196d364c9b98bd7215d94

Modified files:
        finch/gntlog.c

ChangeLog: 

Always top-align the logs in the log-viewer.

-------------- next part --------------
============================================================
--- finch/gntlog.c	0d813473e883f1546d03604eae641ff41fa6f9ac
+++ finch/gntlog.c	ffdc9f8575c0de596b5219bdbca4a2b0798063df
@@ -139,7 +139,8 @@ static void search_cb(GntWidget *button,
 
 }
 
-static void destroy_cb(GntWidget *w, struct log_viewer_hash_t *ht) {
+static void destroy_cb(GntWidget *w, struct log_viewer_hash_t *ht)
+{
 	FinchLogViewer *lv = syslog_viewer;
 
 	if (ht != NULL) {
@@ -162,12 +163,12 @@ static void destroy_cb(GntWidget *w, str
 	gnt_widget_destroy(w);
 }
 
-static void log_select_cb(GntWidget *w, gpointer old, gpointer new, FinchLogViewer *viewer) {
+static void log_select_cb(GntWidget *w, gpointer old, gpointer new, FinchLogViewer *viewer)
+{
 	GntTree *tree = GNT_TREE(w);
 	PurpleLog *log = NULL;
 	PurpleLogReadFlags flags;
 	char *read = NULL, *strip, *newline;
-	int h;
 
 	if (!viewer->search && !gnt_tree_get_parent_key(tree, new))
 		return;
@@ -204,8 +205,6 @@ static void log_select_cb(GntWidget *w, 
 
 	gnt_text_view_clear(GNT_TEXT_VIEW(viewer->text));
 	gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(viewer->text), strip, GNT_TEXT_FLAG_NORMAL);
-	gnt_widget_get_size(viewer->text, NULL, &h);
-	gnt_text_view_scroll(GNT_TEXT_VIEW(viewer->text), h - 2);
 	g_free(read);
 	g_free(strip);
 }
@@ -321,6 +320,7 @@ static FinchLogViewer *display_log_viewe
 	/* Viewer ************/
 	lv->text = gnt_text_view_new();
 	gnt_box_add_widget(GNT_BOX(hbox), lv->text);
+	gnt_text_view_set_flag(GNT_TEXT_VIEW(lv->text), GNT_TEXT_VIEW_TOP_ALIGN);
 
 	hbox = gnt_hbox_new(FALSE);
 	gnt_box_add_widget(GNT_BOX(vbox), hbox);


More information about the Commits mailing list