comparison pidgin/gtkimhtml.c @ 27666:a08e84032814

merge of '2348ff22f0ff3453774b8b25b36238465580c609' and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 05:43:38 +0000
parents 73c8e1964eef
children f058edca3d66 deecc1d663c4
comparison
equal deleted inserted replaced
27186:048bcf41deef 27666:a08e84032814
1547 _("Hyperlink color"), 1547 _("Hyperlink color"),
1548 _("Color to draw hyperlinks."), 1548 _("Color to draw hyperlinks."),
1549 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1549 GDK_TYPE_COLOR, G_PARAM_READABLE));
1550 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("hyperlink-visited-color", 1550 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("hyperlink-visited-color",
1551 _("Hyperlink visited color"), 1551 _("Hyperlink visited color"),
1552 _("Color to draw hyperlinks after it has been visited (or activated)."), 1552 _("Color to draw hyperlink after it has been visited (or activated)."),
1553 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1553 GDK_TYPE_COLOR, G_PARAM_READABLE));
1554 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("hyperlink-prelight-color", 1554 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("hyperlink-prelight-color",
1555 _("Hyperlink prelight color"), 1555 _("Hyperlink prelight color"),
1556 _("Color to draw hyperlinks when mouse is over them."), 1556 _("Color to draw hyperlinks when mouse is over them."),
1557 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1557 GDK_TYPE_COLOR, G_PARAM_READABLE));
1571 _("Action Message Name Color"), 1571 _("Action Message Name Color"),
1572 _("Color to draw the name of an action message."), 1572 _("Color to draw the name of an action message."),
1573 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1573 GDK_TYPE_COLOR, G_PARAM_READABLE));
1574 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("whisper-action-name-color", 1574 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("whisper-action-name-color",
1575 _("Action Message Name Color for Whispered Message"), 1575 _("Action Message Name Color for Whispered Message"),
1576 _("Color to draw the name of an action message."), 1576 _("Color to draw the name of a whispered action message."),
1577 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1577 GDK_TYPE_COLOR, G_PARAM_READABLE));
1578 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("whisper-name-color", 1578 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("whisper-name-color",
1579 _("Whisper Message Name Color"), 1579 _("Whisper Message Name Color"),
1580 _("Color to draw the name of an action message."), 1580 _("Color to draw the name of a whispered message."),
1581 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1581 GDK_TYPE_COLOR, G_PARAM_READABLE));
1582 1582
1583 /* Customizable typing notification ... sort of. Example: 1583 /* Customizable typing notification ... sort of. Example:
1584 * GtkIMHtml::typing-notification-font = "monospace italic light 8.0" 1584 * GtkIMHtml::typing-notification-font = "monospace italic light 8.0"
1585 * GtkIMHtml::typing-notification-color = "#ff0000" 1585 * GtkIMHtml::typing-notification-color = "#ff0000"
1586 * GtkIMHtml::typing-notification-enable = 1 1586 * GtkIMHtml::typing-notification-enable = 1
1587 */ 1587 */
1588 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("typing-notification-color", 1588 gtk_widget_class_install_style_property(widget_class, g_param_spec_boxed("typing-notification-color",
1589 _("Typing notification color"), 1589 _("Typing notification color"),
1590 _("The color to use for the typing notification font"), 1590 _("The color to use for the typing notification"),
1591 GDK_TYPE_COLOR, G_PARAM_READABLE)); 1591 GDK_TYPE_COLOR, G_PARAM_READABLE));
1592 gtk_widget_class_install_style_property(widget_class, g_param_spec_string("typing-notification-font", 1592 gtk_widget_class_install_style_property(widget_class, g_param_spec_string("typing-notification-font",
1593 _("Typing notification font"), 1593 _("Typing notification font"),
1594 _("The font to use for the typing notification"), 1594 _("The font to use for the typing notification"),
1595 "light 8.0", G_PARAM_READABLE)); 1595 "light 8.0", G_PARAM_READABLE));
2994 2994
2995 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE)) 2995 if (!(imhtml->format_functions & GTK_IMHTML_IMAGE))
2996 break; 2996 break;
2997 2997
2998 id = gtk_imhtml_get_html_opt(tag, "ID="); 2998 id = gtk_imhtml_get_html_opt(tag, "ID=");
2999 if (!id) 2999 if (id) {
3000 break; 3000 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter);
3001 gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); 3001 g_free(id);
3002 g_free(id); 3002 } else {
3003 char *src, *alt;
3004 src = gtk_imhtml_get_html_opt(tag, "SRC=");
3005 alt = gtk_imhtml_get_html_opt(tag, "ALT=");
3006 if (src) {
3007 gtk_imhtml_toggle_link(imhtml, src);
3008 gtk_text_buffer_insert(imhtml->text_buffer, iter, alt ? alt : src, -1);
3009 gtk_imhtml_toggle_link(imhtml, NULL);
3010 }
3011 g_free (src);
3012 g_free (alt);
3013 }
3003 break; 3014 break;
3004 } 3015 }
3005 case 47: /* P (opt) */ 3016 case 47: /* P (opt) */
3006 case 48: /* H3 (opt) */ 3017 case 48: /* H3 (opt) */
3007 case 49: /* HTML (opt) */ 3018 case 49: /* HTML (opt) */