Mercurial > pidgin
comparison src/gtkimhtml.c @ 8148:c06b233aa84d
[gaim-migrate @ 8859]
thanks for pointing this out, Mohammed Sameer (msameer)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 20 Jan 2004 13:15:14 +0000 |
parents | 9aafd344230d |
children | eb2a420060f8 |
comparison
equal
deleted
inserted
replaced
8147:0d3e75a09f15 | 8148:c06b233aa84d |
---|---|
380 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel); | 380 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel); |
381 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &end, ins); | 381 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &end, ins); |
382 | 382 |
383 | 383 |
384 if (info == TARGET_HTML) { | 384 if (info == TARGET_HTML) { |
385 char *selection; | |
385 int len; | 386 int len; |
386 GString *str = g_string_new(NULL); | 387 GString *str = g_string_new(NULL); |
387 text = gtk_imhtml_get_markup_range(imhtml, &start, &end); | 388 text = gtk_imhtml_get_markup_range(imhtml, &start, &end); |
388 | 389 |
389 /* Mozilla asks that we start our text/html with the Unicode byte order mark */ | 390 /* Mozilla asks that we start our text/html with the Unicode byte order mark */ |
390 str = g_string_append_unichar(str, 0xfeff); | 391 str = g_string_append_unichar(str, 0xfeff); |
391 str = g_string_append(str, text); | 392 str = g_string_append(str, text); |
392 str = g_string_append_unichar(str, 0x0000); | 393 str = g_string_append_unichar(str, 0x0000); |
393 char *selection = g_convert(str->str, str->len, "UCS-2", "UTF-8", NULL, &len, NULL); | 394 selection = g_convert(str->str, str->len, "UCS-2", "UTF-8", NULL, &len, NULL); |
394 gtk_selection_data_set (selection_data, gdk_atom_intern("text/html", FALSE), 16, selection, len); | 395 gtk_selection_data_set (selection_data, gdk_atom_intern("text/html", FALSE), 16, selection, len); |
395 g_string_free(str, TRUE); | 396 g_string_free(str, TRUE); |
396 g_free(selection); | 397 g_free(selection); |
397 } else { | 398 } else { |
398 text = gtk_text_buffer_get_text(imhtml->text_buffer, &start, &end, FALSE); | 399 text = gtk_text_buffer_get_text(imhtml->text_buffer, &start, &end, FALSE); |