changeset 13335:d04cfb5fa85b

[gaim-migrate @ 15705] add a "Clear formatting" option to the right-click menu of IMHTMLs committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 27 Feb 2006 15:58:27 +0000
parents 99d081c638f6
children 999571d910ed
files src/gtkimhtml.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Mon Feb 27 15:35:17 2006 +0000
+++ b/src/gtkimhtml.c	Mon Feb 27 15:58:27 2006 +0000
@@ -809,7 +809,10 @@
 
 }
 
-
+static void clear_formatting_cb(GtkMenuItem *menu, GtkIMHtml *imhtml)
+{
+	gtk_imhtml_clear_formatting(imhtml);
+}
 
 static void hijack_menu_cb(GtkIMHtml *imhtml, GtkMenu *menu, gpointer data)
 {
@@ -826,6 +829,14 @@
 
 	g_signal_connect(G_OBJECT(menuitem), "activate",
 					 G_CALLBACK(paste_unformatted_cb), imhtml);
+
+	/* XXX: make this new with mnemonic, and HIG-happy after string thaw */
+	menuitem = gtk_menu_item_new_with_label(_("Clear formatting"));
+	gtk_widget_show(menuitem);
+	/* put it after Delete */
+	gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 5);
+
+	g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(clear_formatting_cb), imhtml);
 }
 
 static char *