Show tooltips.
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user