Mercurial > pidgin.yaz
changeset 8974:c2ad41f7c82b
[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 <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 19 May 2004 03:50:52 +0000 |
parents | 269f576d61ac |
children | 574393ccd705 |
files | src/gtkconv.c |
diffstat | 1 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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, "<StockItem>", GTK_STOCK_SAVE_AS }, + { N_("/Conversation/Clear"), "<CTL>L", menu_clear_cb, 0, "<StockItem>", GTK_STOCK_CLEAR }, { "/Conversation/sep1", NULL, NULL, 0, "<Separator>" },