pidgin/gtkconv.c

changeset 30407
4ec2fadc96e8
parent 30002
cab5e4b11ed2
child 30706
612b36b49058
child 32378
bdfcbacbeb2b
equal deleted inserted replaced
30406:e6828577476b 30407:4ec2fadc96e8
277 static void 277 static void
278 default_formatize(PidginConversation *c) 278 default_formatize(PidginConversation *c)
279 { 279 {
280 PurpleConversation *conv = c->active_conv; 280 PurpleConversation *conv = c->active_conv;
281 gtk_imhtml_setup_entry(GTK_IMHTML(c->entry), conv->features); 281 gtk_imhtml_setup_entry(GTK_IMHTML(c->entry), conv->features);
282 }
283
284 static void
285 conversation_entry_clear(PidginConversation *gtkconv)
286 {
287 GtkIMHtml *imhtml = GTK_IMHTML(gtkconv->entry);
288 gtk_source_undo_manager_begin_not_undoable_action(imhtml->undo_manager);
289 gtk_imhtml_clear(imhtml);
290 gtk_source_undo_manager_end_not_undoable_action(imhtml->undo_manager);
282 } 291 }
283 292
284 static void 293 static void
285 clear_formatting_cb(GtkIMHtml *imhtml, PidginConversation *gtkconv) 294 clear_formatting_cb(GtkIMHtml *imhtml, PidginConversation *gtkconv)
286 { 295 {
555 char *buf, *clean; 564 char *buf, *clean;
556 565
557 account = purple_conversation_get_account(conv); 566 account = purple_conversation_get_account(conv);
558 567
559 if (check_for_and_do_command(conv)) { 568 if (check_for_and_do_command(conv)) {
560 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); 569 conversation_entry_clear(gtkconv);
561 return; 570 return;
562 } 571 }
563 572
564 if ((purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) && 573 if ((purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) &&
565 purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) 574 purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)))
610 } 619 }
611 620
612 g_free(clean); 621 g_free(clean);
613 g_free(buf); 622 g_free(buf);
614 623
615 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); 624 conversation_entry_clear(gtkconv);
616 gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE); 625 gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
617 } 626 }
618 627
619 static void 628 static void
620 add_remove_cb(GtkWidget *widget, PidginConversation *gtkconv) 629 add_remove_cb(GtkWidget *widget, PidginConversation *gtkconv)

mercurial