diff options
-rw-r--r-- | src/im-menu.c | 16 | ||||
-rw-r--r-- | src/im-menu.h | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/im-menu.c b/src/im-menu.c index ac23a29..931d998 100644 --- a/src/im-menu.c +++ b/src/im-menu.c @@ -189,3 +189,19 @@ im_menu_insert_section (ImMenu *menu, g_object_unref (item); } + +void +im_menu_set_status (ImMenu * menu, + const gchar *id, + const gchar *status_str) +{ + g_return_if_fail(IM_IS_MENU(menu)); + g_return_if_fail(id != NULL); + g_return_if_fail(status_str != NULL); + + ImMenuClass * klass = IM_MENU_GET_CLASS(menu); + if (klass->set_status != NULL) + klass->set_status(menu, id, status_str); + + return; +} diff --git a/src/im-menu.h b/src/im-menu.h index d3775ad..633a444 100644 --- a/src/im-menu.h +++ b/src/im-menu.h @@ -37,6 +37,7 @@ typedef struct _ImMenuPrivate ImMenuPrivate; struct _ImMenuClass { GObjectClass parent_class; + void (*set_status) (ImMenu * menu, const gchar * id, const gchar * status_str); }; struct _ImMenu @@ -61,4 +62,8 @@ void im_menu_insert_section (ImMenu const gchar *namespace, GMenuModel *section); +void im_menu_set_status (ImMenu * menu, + const gchar *id, + const gchar *status_str); + #endif |