aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-09-17 14:45:59 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-21 13:13:31 +0200
commit009998bd3112d650c4f2c2c91698393fac6f7285 (patch)
treebc8405d24e19ed9eea6d714e4be1ab2e0f665444
parentd580f61c5cce53d8cbe1862cf0abed0e942c3550 (diff)
downloadayatana-ido-009998bd3112d650c4f2c2c91698393fac6f7285.tar.gz
ayatana-ido-009998bd3112d650c4f2c2c91698393fac6f7285.tar.bz2
ayatana-ido-009998bd3112d650c4f2c2c91698393fac6f7285.zip
idobasicmenuitem.c: Add optional markup to the basic menu item
-rw-r--r--src/idobasicmenuitem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/idobasicmenuitem.c b/src/idobasicmenuitem.c
index ab3ce87..8e8c41e 100644
--- a/src/idobasicmenuitem.c
+++ b/src/idobasicmenuitem.c
@@ -359,6 +359,12 @@ ido_basic_menu_item_new_from_model (GMenuItem * menu_item,
item = ido_basic_menu_item_new ();
+ IdoBasicMenuItemPrivate *p = ido_basic_menu_item_get_instance_private(IDO_BASIC_MENU_ITEM(item));
+ gboolean use_markup = FALSE;
+ g_menu_item_get_attribute(menu_item, "x-ayatana-use-markup", "b", &use_markup);
+ g_object_set(p->label, "use-markup", use_markup, NULL);
+ g_object_set(p->secondary_label, "use-markup", use_markup, NULL);
+
if (g_menu_item_get_attribute (menu_item, "label", "s", &label))
{
ido_basic_menu_item_set_text (IDO_BASIC_MENU_ITEM (item), label);