GtkMenuTrackerItem: Add support for display-hint

This commit adds a getter for the display-hint attribute.
This commit is contained in:
Matthias Clasen 2014-04-28 14:18:06 -04:00
parent 6429b33f44
commit 8fff8acbac
2 changed files with 12 additions and 0 deletions

View File

@ -674,6 +674,16 @@ gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self)
return special;
}
const gchar *
gtk_menu_tracker_item_get_display_hint (GtkMenuTrackerItem *self)
{
const gchar *display_hint = NULL;
g_menu_item_get_attribute (self->item, "display-hint", "&s", &display_hint);
return display_hint;
}
GMenuModel *
_gtk_menu_tracker_item_get_link (GtkMenuTrackerItem *self,
const gchar *link_name)

View File

@ -50,6 +50,8 @@ GtkMenuTrackerItem * _gtk_menu_tracker_item_new (GtkActi
const gchar * gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self);
const gchar * gtk_menu_tracker_item_get_display_hint (GtkMenuTrackerItem *self);
GtkActionObservable * _gtk_menu_tracker_item_get_observable (GtkMenuTrackerItem *self);
gboolean gtk_menu_tracker_item_get_is_separator (GtkMenuTrackerItem *self);