comparison src/gtkimhtml.c @ 9008:6dc1f052edc0

[gaim-migrate @ 9784] GdkColors were meant to be free. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sat, 22 May 2004 07:04:19 +0000
parents 0a08f671b591
children b24967757d46
comparison
equal deleted inserted replaced
9007:0a08f671b591 9008:6dc1f052edc0
3453 if (url) { 3453 if (url) {
3454 g_snprintf(str, sizeof(str), "LINK %d", linkno++); 3454 g_snprintf(str, sizeof(str), "LINK %d", linkno++);
3455 str[47] = '\0'; 3455 str[47] = '\0';
3456 3456
3457 gtk_widget_style_get(GTK_WIDGET(imhtml), "hyperlink-color", &color, NULL); 3457 gtk_widget_style_get(GTK_WIDGET(imhtml), "hyperlink-color", &color, NULL);
3458 if (color) 3458 if (color) {
3459 imhtml->edit.link = linktag = gtk_text_buffer_create_tag(imhtml->text_buffer, str, "foreground-gdk", color, "underline", PANGO_UNDERLINE_SINGLE, NULL); 3459 imhtml->edit.link = linktag = gtk_text_buffer_create_tag(imhtml->text_buffer, str, "foreground-gdk", color, "underline", PANGO_UNDERLINE_SINGLE, NULL);
3460 else 3460 gdk_color_free(color);
3461 } else {
3461 imhtml->edit.link = linktag = gtk_text_buffer_create_tag(imhtml->text_buffer, str, "foreground", "blue", "underline", PANGO_UNDERLINE_SINGLE, NULL); 3462 imhtml->edit.link = linktag = gtk_text_buffer_create_tag(imhtml->text_buffer, str, "foreground", "blue", "underline", PANGO_UNDERLINE_SINGLE, NULL);
3463 }
3462 g_object_set_data_full(G_OBJECT(linktag), "link_url", g_strdup(url), g_free); 3464 g_object_set_data_full(G_OBJECT(linktag), "link_url", g_strdup(url), g_free);
3463 g_signal_connect(G_OBJECT(linktag), "event", G_CALLBACK(tag_event), NULL); 3465 g_signal_connect(G_OBJECT(linktag), "event", G_CALLBACK(tag_event), NULL);
3464 3466
3465 if (imhtml->editable && gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) { 3467 if (imhtml->editable && gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) {
3466 remove_font_link(imhtml, &start, &end, FALSE); 3468 remove_font_link(imhtml, &start, &end, FALSE);