changeset 32458:c89d7ad82dba

Emit the format-cleared signal when the webview format is cleared.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 05 Jan 2012 06:30:29 +0000
parents d503827d7fcc
children 64aea8af2831
files pidgin/gtkwebview.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkwebview.c	Thu Jan 05 06:11:04 2012 +0000
+++ b/pidgin/gtkwebview.c	Thu Jan 05 06:30:29 2012 +0000
@@ -829,11 +829,14 @@
 void
 gtk_webview_clear_formatting(GtkWebView *webview)
 {
-	GtkWebViewPriv *priv = GTK_WEBVIEW_GET_PRIVATE(webview);
-	priv->edit.bold = FALSE;
-	priv->edit.italic = FALSE;
-	priv->edit.underline = FALSE;
-	priv->edit.strike = FALSE;
+	GObject *object;
+
+	object = g_object_ref(G_OBJECT(webview));
+	g_signal_emit(object, signals[CLEAR_FORMAT], 0);
+
+	gtk_widget_grab_focus(GTK_WIDGET(webview));
+
+	g_object_unref(object);
 }
 
 void