comparison pidgin/gtkimhtml.c @ 27822:1d012e75153f

propagate from branch 'im.pidgin.pidgin' (head 1b822949efa4354726f0d774f743e3417426728a) to branch 'im.pidgin.pidgin.yaz' (head 07b6c247ee684e6ff132270b5424a7ed82d7fd33)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 17 Apr 2008 17:04:20 +0000
parents 030185a59a1a 6827600df4fc
children d45f85653a75
comparison
equal deleted inserted replaced
27821:3a305a4511ea 27822:1d012e75153f
2703 } else 2703 } else
2704 g_free(face); 2704 g_free(face);
2705 2705
2706 if (sml) 2706 if (sml)
2707 font->sml = sml; 2707 font->sml = sml;
2708 else if (oldfont && oldfont->sml) 2708 else {
2709 font->sml = g_strdup(oldfont->sml); 2709 g_free(sml);
2710 if (oldfont && oldfont->sml)
2711 font->sml = g_strdup(oldfont->sml);
2712 }
2710 2713
2711 if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) { 2714 if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) {
2712 if (*size == '+') { 2715 if (*size == '+') {
2713 sscanf (size + 1, "%hd", &font->size); 2716 sscanf (size + 1, "%hd", &font->size);
2714 font->size += 3; 2717 font->size += 3;
2756 } 2759 }
2757 break; 2760 break;
2758 case 46: /* IMG (opt) */ 2761 case 46: /* IMG (opt) */
2759 case 59: /* IMG */ 2762 case 59: /* IMG */
2760 { 2763 {
2761 const char *id; 2764 char *id;
2762 2765
2763 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); 2766 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
2764 ws[0] = '\0'; wpos = 0; 2767 ws[0] = '\0'; wpos = 0;
2765 2768
2766 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE)) 2769 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE))
2768 2771
2769 id = gtk_imhtml_get_html_opt(tag, "ID="); 2772 id = gtk_imhtml_get_html_opt(tag, "ID=");
2770 if (!id) 2773 if (!id)
2771 break; 2774 break;
2772 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); 2775 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter);
2776 g_free(id);
2773 break; 2777 break;
2774 } 2778 }
2775 case 47: /* P (opt) */ 2779 case 47: /* P (opt) */
2776 case 48: /* H3 (opt) */ 2780 case 48: /* H3 (opt) */
2777 case 49: /* HTML (opt) */ 2781 case 49: /* HTML (opt) */