pidgin/gtkimhtml.c

changeset 22810
ede0b51be7c3
parent 22803
e1f64090d32e
child 22834
1394e7efb818
equal deleted inserted replaced
22809:c2b010c50376 22810:ede0b51be7c3
2695 } else 2695 } else
2696 g_free(face); 2696 g_free(face);
2697 2697
2698 if (sml) 2698 if (sml)
2699 font->sml = sml; 2699 font->sml = sml;
2700 else if (oldfont && oldfont->sml) 2700 else {
2701 font->sml = g_strdup(oldfont->sml); 2701 g_free(sml);
2702 if (oldfont && oldfont->sml)
2703 font->sml = g_strdup(oldfont->sml);
2704 }
2702 2705
2703 if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) { 2706 if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) {
2704 if (*size == '+') { 2707 if (*size == '+') {
2705 sscanf (size + 1, "%hd", &font->size); 2708 sscanf (size + 1, "%hd", &font->size);
2706 font->size += 3; 2709 font->size += 3;
2748 } 2751 }
2749 break; 2752 break;
2750 case 46: /* IMG (opt) */ 2753 case 46: /* IMG (opt) */
2751 case 59: /* IMG */ 2754 case 59: /* IMG */
2752 { 2755 {
2753 const char *id; 2756 char *id;
2754 2757
2755 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); 2758 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
2756 ws[0] = '\0'; wpos = 0; 2759 ws[0] = '\0'; wpos = 0;
2757 2760
2758 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE)) 2761 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE))
2760 2763
2761 id = gtk_imhtml_get_html_opt(tag, "ID="); 2764 id = gtk_imhtml_get_html_opt(tag, "ID=");
2762 if (!id) 2765 if (!id)
2763 break; 2766 break;
2764 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); 2767 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter);
2768 g_free(id);
2765 break; 2769 break;
2766 } 2770 }
2767 case 47: /* P (opt) */ 2771 case 47: /* P (opt) */
2768 case 48: /* H3 (opt) */ 2772 case 48: /* H3 (opt) */
2769 case 49: /* HTML (opt) */ 2773 case 49: /* HTML (opt) */

mercurial