# HG changeset patch # User Luke Schierer # Date 1084938652 0 # Node ID c2ad41f7c82b18b820567e20e6b7c2c328b8e93c # Parent 269f576d61acdbd0270dc14390012a5bc8309b2d [gaim-migrate @ 9748] "Moves the handling of ctrl-l == clear for conversations to be a menu item so that one can rebind it if one chooses." --deryni committer: Tailor Script diff -r 269f576d61ac -r c2ad41f7c82b src/gtkconv.c --- a/src/gtkconv.c Wed May 19 03:49:54 2004 +0000 +++ b/src/gtkconv.c Wed May 19 03:50:52 2004 +0000 @@ -654,6 +654,21 @@ gaim_conversation_get_account(conv)); } +static void +menu_clear_cb(gpointer data, guint action, GtkWidget *widget) +{ + GaimConvWindow *win = (GaimConvWindow *)data; + GaimConversation *conv; + GaimGtkConversation *gtkconv; + + conv = gaim_conv_window_get_active_conversation(win); + gtkconv = GAIM_GTK_CONVERSATION(conv); + + gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml)); + g_string_free(conv->history, TRUE); + conv->history = g_string_new(""); +} + struct _search { GaimGtkConversation *gtkconv; GtkWidget *entry; @@ -1416,14 +1431,6 @@ return TRUE; break; - case 'l': - gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml)); - g_string_free(conv->history, TRUE); - conv->history = g_string_new(""); - - return TRUE; - break; - case 'z': gtk_window_iconify(GTK_WINDOW(gtkwin->window)); @@ -3125,6 +3132,7 @@ { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, NULL }, { N_("/Conversation/_Save As..."), NULL, menu_save_as_cb, 0, "", GTK_STOCK_SAVE_AS }, + { N_("/Conversation/Clear"), "L", menu_clear_cb, 0, "", GTK_STOCK_CLEAR }, { "/Conversation/sep1", NULL, NULL, 0, "" },