Show tooltips.

This commit is contained in:
Daiki Ueno
2012-04-23 16:43:06 +09:00
parent 4df2ecc8ae
commit 4a346211b8
6 changed files with 126 additions and 26 deletions

View File

@ -571,6 +571,7 @@ struct _SymbolsParseData {
GSList *symbols;
gchar *label;
gchar *icon;
gchar *tooltip;
EekSymbolCategory category;
guint keyval;
gint groups;
@ -683,6 +684,11 @@ symbols_start_element_callback (GMarkupParseContext *pcontext,
if (attribute != NULL)
data->icon = g_strdup (attribute);
attribute = get_attribute (attribute_names, attribute_values,
"tooltip");
if (attribute != NULL)
data->tooltip = g_strdup (attribute);
attribute = get_attribute (attribute_names, attribute_values,
"category");
if (attribute != NULL)
@ -766,6 +772,11 @@ symbols_end_element_callback (GMarkupParseContext *pcontext,
g_free (data->icon);
data->icon = NULL;
}
if (data->tooltip) {
eek_symbol_set_tooltip (symbol, data->tooltip);
g_free (data->tooltip);
data->tooltip = NULL;
}
data->symbols = g_slist_prepend (data->symbols, symbol);
goto out;