| 1010 } |
1010 } |
| 1011 |
1011 |
| 1012 static void imhtml_paste_insert(GtkIMHtml *imhtml, const char *text, gboolean plaintext) |
1012 static void imhtml_paste_insert(GtkIMHtml *imhtml, const char *text, gboolean plaintext) |
| 1013 { |
1013 { |
| 1014 GtkTextIter iter; |
1014 GtkTextIter iter; |
| 1015 GtkIMHtmlOptions flags = plaintext ? 0 : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); |
1015 GtkIMHtmlOptions flags = plaintext ? GTK_IMHTML_NO_SMILEY : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); |
| 1016 |
1016 |
| 1017 if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) |
1017 if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) |
| 1018 gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); |
1018 gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); |
| 1019 |
1019 |
| 1020 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, gtk_text_buffer_get_insert(imhtml->text_buffer)); |
1020 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, gtk_text_buffer_get_insert(imhtml->text_buffer)); |
| 2996 } |
2996 } |
| 2997 c += tlen; |
2997 c += tlen; |
| 2998 pos += tlen; |
2998 pos += tlen; |
| 2999 g_free(tag); /* This was allocated back in VALID_TAG() */ |
2999 g_free(tag); /* This was allocated back in VALID_TAG() */ |
| 3000 } else if (imhtml->edit.link == NULL && |
3000 } else if (imhtml->edit.link == NULL && |
| |
3001 !(options & GTK_IMHTML_NO_SMILEY) && |
| 3001 gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { |
3002 gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { |
| 3002 GtkIMHtmlFontDetail *fd; |
3003 GtkIMHtmlFontDetail *fd; |
| 3003 gchar *sml = NULL; |
3004 gchar *sml = NULL; |
| 3004 |
3005 |
| 3005 br = FALSE; |
3006 br = FALSE; |