changeset 1659:0cf0c7e0064c

check for title attr for INPUT element seems reasonably common for INPUT to have one
author corvid <corvid@lavabit.com>
date Thu, 22 Apr 2010 02:21:38 +0000
parents 9793f025b43a
children 3accd3e00cd2 0c5d982c92a0
files src/form.cc
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/form.cc	Thu Apr 22 02:18:59 2010 +0000
+++ b/src/form.cc	Thu Apr 22 02:21:38 2010 +0000
@@ -552,6 +552,15 @@
 //          gtk_entry_set_max_length(GTK_ENTRY(widget),
 //                                   strtol(attrbuf, NULL, 10));
       }
+      if (prefs.show_tooltip &&
+          (attrbuf = a_Html_get_attr(html, tag, tagsize, "title"))) {
+         CssPropertyList props;
+         char *tooltip_str = dStrdup(attrbuf);
+
+         props.set (PROPERTY_X_TOOLTIP, CSS_TYPE_STRING, tooltip_str);
+         html->styleEngine->setNonCssHints (&props);
+         dFree(tooltip_str);
+      }
       HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle());
    }
    dFree(type);