Mercurial > pidgin
changeset 32452:1edaf008c066
Use a GtkWebViewToolbar when creating an editable GtkWebView.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 04 Jan 2012 09:45:10 +0000 |
parents | a803139fc875 |
children | 215f7f125f4d |
files | pidgin/gtkutils.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkutils.c Wed Jan 04 09:44:06 2012 +0000 +++ b/pidgin/gtkutils.c Wed Jan 04 09:45:10 2012 +0000 @@ -68,6 +68,7 @@ #include "gtkthemes.h" #include "gtkutils.h" #include "gtkwebview.h" +#include "gtkwebviewtoolbar.h" #include "pidgin/minidialog.h" typedef struct { @@ -295,7 +296,7 @@ gtk_widget_show(vbox); if (editable) { - toolbar = gtk_imhtmltoolbar_new(); + toolbar = gtk_webviewtoolbar_new(); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); @@ -307,10 +308,7 @@ } webview = gtk_webview_new(); -#if 0 - /* TODO WEBKIT: Don't have editable webview yet. */ gtk_webview_set_editable(GTK_WEBVIEW(webview), editable); -#endif /* if 0 */ #ifdef USE_GTKSPELL if (editable && purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/spellcheck")) pidgin_setup_gtkspell(GTK_TEXT_VIEW(webview)); @@ -318,8 +316,8 @@ gtk_widget_show(webview); if (editable) { - gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(toolbar), webview); - gtk_imhtmltoolbar_associate_smileys(GTK_IMHTMLTOOLBAR(toolbar), "default"); + gtk_webviewtoolbar_attach(GTK_WEBVIEWTOOLBAR(toolbar), webview); + gtk_webviewtoolbar_associate_smileys(GTK_WEBVIEWTOOLBAR(toolbar), "default"); } sw = pidgin_make_scrollable(webview, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC, GTK_SHADOW_NONE, -1, -1);