| 21 |
21 |
| 22 #define HISTORY_SIZE (4 * 1024) |
22 #define HISTORY_SIZE (4 * 1024) |
| 23 |
23 |
| 24 static gboolean _scroll_webview_to_end(gpointer data) |
24 static gboolean _scroll_webview_to_end(gpointer data) |
| 25 { |
25 { |
| 26 GtkWebView *webview = data; |
26 PidginWebView *webview = data; |
| 27 gtk_webview_scroll_to_end(GTK_WEBVIEW(webview), FALSE); |
27 pidgin_webview_scroll_to_end(PIDGIN_WEBVIEW(webview), FALSE); |
| 28 g_object_unref(G_OBJECT(webview)); |
28 g_object_unref(G_OBJECT(webview)); |
| 29 return FALSE; |
29 return FALSE; |
| 30 } |
30 } |
| 31 |
31 |
| 32 static void historize(PurpleConversation *c) |
32 static void historize(PurpleConversation *c) |
| 133 purple_account_get_protocol_name(((PurpleLog*)logs->data)->account)); |
133 purple_account_get_protocol_name(((PurpleLog*)logs->data)->account)); |
| 134 #endif |
134 #endif |
| 135 |
135 |
| 136 #if 0 |
136 #if 0 |
| 137 /* TODO WebKit: Do this properly... */ |
137 /* TODO WebKit: Do this properly... */ |
| 138 if (!gtk_webview_is_empty(GTK_WEBVIEW(gtkconv->webview))) |
138 if (!pidgin_webview_is_empty(PIDGIN_WEBVIEW(gtkconv->webview))) |
| 139 gtk_webview_append_html(GTK_WEBVIEW(gtkconv->webview), "<BR>"); |
139 pidgin_webview_append_html(PIDGIN_WEBVIEW(gtkconv->webview), "<BR>"); |
| 140 #endif |
140 #endif |
| 141 |
141 |
| 142 escaped_alias = g_markup_escape_text(alias, -1); |
142 escaped_alias = g_markup_escape_text(alias, -1); |
| 143 |
143 |
| 144 if (((PurpleLog *)logs->data)->tm) |
144 if (((PurpleLog *)logs->data)->tm) |
| 145 header_date = purple_date_format_full(((PurpleLog *)logs->data)->tm); |
145 header_date = purple_date_format_full(((PurpleLog *)logs->data)->tm); |
| 146 else |
146 else |
| 147 header_date = purple_date_format_full(localtime(&((PurpleLog *)logs->data)->time)); |
147 header_date = purple_date_format_full(localtime(&((PurpleLog *)logs->data)->time)); |
| 148 |
148 |
| 149 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), escaped_alias, header_date); |
149 header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), escaped_alias, header_date); |
| 150 gtk_webview_append_html(GTK_WEBVIEW(gtkconv->webview), header); |
150 pidgin_webview_append_html(PIDGIN_WEBVIEW(gtkconv->webview), header); |
| 151 g_free(header); |
151 g_free(header); |
| 152 g_free(escaped_alias); |
152 g_free(escaped_alias); |
| 153 |
153 |
| 154 g_strchomp(history); |
154 g_strchomp(history); |
| 155 gtk_webview_append_html(GTK_WEBVIEW(gtkconv->webview), history); |
155 pidgin_webview_append_html(PIDGIN_WEBVIEW(gtkconv->webview), history); |
| 156 g_free(history); |
156 g_free(history); |
| 157 |
157 |
| 158 gtk_webview_append_html(GTK_WEBVIEW(gtkconv->webview), "<hr>"); |
158 pidgin_webview_append_html(PIDGIN_WEBVIEW(gtkconv->webview), "<hr>"); |
| 159 |
159 |
| 160 #if 0 |
160 #if 0 |
| 161 /* FIXME: WebView has no protocol setting */ |
161 /* FIXME: WebView has no protocol setting */ |
| 162 gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml), protocol); |
162 gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml), protocol); |
| 163 g_free(protocol); |
163 g_free(protocol); |