pidgin: 4af22030: Use pidgin_create_webview in the gtknoti...

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


----------------------------------------------------------------------
Revision: 4af2203020cdfaf8959afc1660152121ee7ad2c2
Parent:   c961bcf584968f59bf40a53c054956f94c878c76
Author:   qulogic at pidgin.im
Date:     09/08/11 22:40:51
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4af2203020cdfaf8959afc1660152121ee7ad2c2

Changelog: 

Use pidgin_create_webview in the gtknotify code.

Changes against parent c961bcf584968f59bf40a53c054956f94c878c76

  patched  pidgin/gtknotify.c

-------------- next part --------------
============================================================
--- pidgin/gtknotify.c	375d032ca8d46ace28d9eb7b17bf94e8fa807a77
+++ pidgin/gtknotify.c	37ecbca7ee40c4b4ba70c9f972c5a9756954d055
@@ -819,7 +819,7 @@ pidgin_notify_formatted(const char *titl
 	GtkWidget *label;
 	GtkWidget *button;
 	GtkWidget *web_view;
-	GtkWidget *scrolled_window;
+	GtkWidget *frame;
 	char label_text[2048];
 	char *linked_text, *primary_esc, *secondary_esc;
 
@@ -855,17 +855,11 @@ pidgin_notify_formatted(const char *titl
 	gtk_widget_show(label);
 
 	/* Add the webview */
-	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
-	web_view = gtk_webview_new();
-	gtk_container_add(GTK_CONTAINER(scrolled_window), web_view);
-
+	frame = pidgin_create_webview(FALSE, &web_view, NULL, NULL);
 	gtk_widget_set_name(web_view, "pidgin_notify_webview");
 	gtk_widget_set_size_request(web_view, 300, 250);
-	gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
-	gtk_widget_show_all(scrolled_window);
+	gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
+	gtk_widget_show(frame);
 
 	/* Add the Close button. */
 	button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
@@ -1138,7 +1132,6 @@ pidgin_notify_userinfo(PurpleConnection 
 	if (pinfo != NULL) {
 		GtkWidget *webview = g_object_get_data(G_OBJECT(pinfo->window), "webview-widget");
 		char *linked_text = purple_markup_linkify(info);
-		g_assert(webview);
 		gtk_webview_load_html_string_with_imgstore(GTK_WEBVIEW(webview), linked_text);
 		g_free(linked_text);
 		g_free(key);


More information about the Commits mailing list