Mercurial > pidgin.yaz
comparison plugins/spellchk.c @ 11288:a4ce03725025
[gaim-migrate @ 13486]
Die g_assert() and let Gaim live.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 17 Aug 2005 14:36:15 +0000 |
parents | 0ef4fbeeefaf |
children | 87a7fdd3ffcc |
comparison
equal
deleted
inserted
replaced
11287:fb6e85c55fb8 | 11288:a4ce03725025 |
---|---|
446 /* g_free(spell->word); */ | 446 /* g_free(spell->word); */ |
447 spell->inserting = FALSE; | 447 spell->inserting = FALSE; |
448 spell->word = NULL; | 448 spell->word = NULL; |
449 } | 449 } |
450 | 450 |
451 spellchk* | 451 void |
452 spellchk_new_attach(GaimConversation *c) { | 452 spellchk_new_attach(GaimConversation *c) { |
453 spellchk *spell; | 453 spellchk *spell; |
454 GtkTextBuffer *buffer; | 454 GtkTextBuffer *buffer; |
455 GtkTextIter start, end; | 455 GtkTextIter start, end; |
456 GaimGtkConversation *gtkconv; | 456 GaimGtkConversation *gtkconv; |
459 gtkconv = GAIM_GTK_CONVERSATION(c); | 459 gtkconv = GAIM_GTK_CONVERSATION(c); |
460 | 460 |
461 view = GTK_TEXT_VIEW(gtkconv->entry); | 461 view = GTK_TEXT_VIEW(gtkconv->entry); |
462 | 462 |
463 spell = g_object_get_data(G_OBJECT(view), SPELLCHK_OBJECT_KEY); | 463 spell = g_object_get_data(G_OBJECT(view), SPELLCHK_OBJECT_KEY); |
464 g_assert(spell == NULL); | 464 if (spell == NULL) |
465 return; | |
465 | 466 |
466 /* attach to the widget */ | 467 /* attach to the widget */ |
467 spell = g_new0(spellchk, 1); | 468 spell = g_new0(spellchk, 1); |
468 spell->view = view; | 469 spell->view = view; |
469 | 470 |
492 G_CALLBACK(insert_text_before), spell); | 493 G_CALLBACK(insert_text_before), spell); |
493 g_signal_connect_after(G_OBJECT(buffer), | 494 g_signal_connect_after(G_OBJECT(buffer), |
494 "insert-text", | 495 "insert-text", |
495 G_CALLBACK(insert_text_after), spell); | 496 G_CALLBACK(insert_text_after), spell); |
496 | 497 |
497 return spell; | 498 return; |
498 } | 499 } |
499 | 500 |
500 static int buf_get_line(char *ibuf, char **buf, int *position, int len) | 501 static int buf_get_line(char *ibuf, char **buf, int *position, int len) |
501 { | 502 { |
502 int pos = *position; | 503 int pos = *position; |