Mercurial > pidgin
comparison src/gtkimhtml.c @ 11750:21aff66af1e7
[gaim-migrate @ 14041]
Inserting a smiley with text selected will now replace that text with the
smiley. I have a feeling there's a bug report about this somewhere.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 23 Oct 2005 13:13:21 +0000 |
parents | 5d7da4056644 |
children | c0fca40fd938 |
comparison
equal
deleted
inserted
replaced
11749:7da512f06185 | 11750:21aff66af1e7 |
---|---|
4342 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley) | 4342 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley) |
4343 { | 4343 { |
4344 GtkTextMark *mark; | 4344 GtkTextMark *mark; |
4345 GtkTextIter iter; | 4345 GtkTextIter iter; |
4346 | 4346 |
4347 if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) | |
4348 gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); | |
4349 | |
4347 mark = gtk_text_buffer_get_insert(imhtml->text_buffer); | 4350 mark = gtk_text_buffer_get_insert(imhtml->text_buffer); |
4348 | 4351 |
4349 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, mark); | 4352 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, mark); |
4350 gtk_imhtml_insert_smiley_at_iter(imhtml, sml, smiley, &iter); | 4353 gtk_imhtml_insert_smiley_at_iter(imhtml, sml, smiley, &iter); |
4351 } | 4354 } |