| 1032 } |
1032 } |
| 1033 |
1033 |
| 1034 static void imhtml_paste_insert(GtkIMHtml *imhtml, const char *text, gboolean plaintext) |
1034 static void imhtml_paste_insert(GtkIMHtml *imhtml, const char *text, gboolean plaintext) |
| 1035 { |
1035 { |
| 1036 GtkTextIter iter; |
1036 GtkTextIter iter; |
| 1037 GtkIMHtmlOptions flags = plaintext ? 0 : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); |
1037 GtkIMHtmlOptions flags = plaintext ? GTK_IMHTML_NO_SMILEY : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); |
| 1038 |
1038 |
| 1039 if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) |
1039 if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) |
| 1040 gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); |
1040 gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); |
| 1041 |
1041 |
| 1042 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, gtk_text_buffer_get_insert(imhtml->text_buffer)); |
1042 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, gtk_text_buffer_get_insert(imhtml->text_buffer)); |
| 3002 } |
3002 } |
| 3003 c += tlen; |
3003 c += tlen; |
| 3004 pos += tlen; |
3004 pos += tlen; |
| 3005 g_free(tag); /* This was allocated back in VALID_TAG() */ |
3005 g_free(tag); /* This was allocated back in VALID_TAG() */ |
| 3006 } else if (imhtml->edit.link == NULL && |
3006 } else if (imhtml->edit.link == NULL && |
| |
3007 !(options & GTK_IMHTML_NO_SMILEY) && |
| 3007 gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { |
3008 gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { |
| 3008 GtkIMHtmlFontDetail *fd; |
3009 GtkIMHtmlFontDetail *fd; |
| 3009 gchar *sml = NULL; |
3010 gchar *sml = NULL; |
| 3010 |
3011 |
| 3011 br = FALSE; |
3012 br = FALSE; |