pidgin: 29e5737d: Use pidgin_create_webview to make the He...

qulogic at pidgin.im qulogic at pidgin.im
Thu Sep 8 23:35:27 EDT 2011


----------------------------------------------------------------------
Revision: 29e5737d31f8504f0f1b30ed6595671b0a735535
Parent:   4af2203020cdfaf8959afc1660152121ee7ad2c2
Author:   qulogic at pidgin.im
Date:     09/08/11 23:28:02
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/29e5737d31f8504f0f1b30ed6595671b0a735535

Changelog: 

Use pidgin_create_webview to make the Help dialog.

Changes against parent 4af2203020cdfaf8959afc1660152121ee7ad2c2

  patched  pidgin/gtkdialogs.c

-------------- next part --------------
============================================================
--- pidgin/gtkdialogs.c	e1bd7e57cb5948c1a9c5386ffe148c28263f6f11
+++ pidgin/gtkdialogs.c	89209d49a90a329726f7d58a066ae5f74b66c8da
@@ -421,9 +421,8 @@ pidgin_build_help_dialog(const char *tit
 static GtkWidget *
 pidgin_build_help_dialog(const char *title, const char *role, GString *string)
 {
-	GtkWidget *win, *vbox, *frame, *logo, *imhtml, *button;
+	GtkWidget *win, *vbox, *frame, *logo, *webview, *button;
 	GdkPixbuf *pixbuf;
-	GtkTextIter iter;
 	AtkObject *obj;
 	char *filename, *tmp;
 
@@ -450,15 +449,15 @@ pidgin_build_help_dialog(const char *tit
 	g_free(tmp);
 	gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0);
 
-	frame = pidgin_create_imhtml(FALSE, &imhtml, NULL, NULL);
+	frame = pidgin_create_webview(FALSE, &webview, NULL, NULL);
 	/* FIXME: Compile now and fix it later when we have a proper replacement for this function
 	gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY);
 	*/
 	gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
 
-	gtk_webview_append_html(GTK_WEBVIEW(imhtml), string->str);
-	gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), &iter);
-	gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), &iter);
+	gtk_webview_append_html(GTK_WEBVIEW(webview), string->str);
+	/* FIXME: This doesn't seem to stay at the top. */
+	webkit_web_view_move_cursor(WEBKIT_WEB_VIEW(webview), GTK_MOVEMENT_BUFFER_ENDS, -1);
 
 	button = pidgin_dialog_add_button(GTK_DIALOG(win), GTK_STOCK_CLOSE,
 	                G_CALLBACK(destroy_win), win);


More information about the Commits mailing list