Commit ea0ede20 authored by Allison Karlitskaya's avatar Allison Karlitskaya

GtkMenuTracker: add 'special' items

Allow the possibility for items to be marked with a special attribute and
expose this via GtkTrackerMenuItem.  For internal use only.

We will use this to implement the special 'Hide', 'Hide Others' and 'Show All'
items and the 'Services' submenu in the Mac OS application menu.

https://bugzilla.gnome.org/show_bug.cgi?id=720552
parent e70f506e
......@@ -653,6 +653,16 @@ gtk_menu_tracker_item_get_accel (GtkMenuTrackerItem *self)
return gtk_action_muxer_get_primary_accel (GTK_ACTION_MUXER (self->observable), self->action_and_target);
}
const gchar *
gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self)
{
const gchar *special = NULL;
g_menu_item_get_attribute (self->item, "x-gtk-private-special", "&s", &special);
return special;
}
GMenuModel *
_gtk_menu_tracker_item_get_submenu (GtkMenuTrackerItem *self)
{
......
......@@ -48,6 +48,8 @@ GtkMenuTrackerItem * _gtk_menu_tracker_item_new (GtkActi
const gchar *action_namespace,
gboolean is_separator);
const gchar * gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self);
GtkActionObservable * _gtk_menu_tracker_item_get_observable (GtkMenuTrackerItem *self);
gboolean gtk_menu_tracker_item_get_is_separator (GtkMenuTrackerItem *self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment