diff options
| author | Dana Jansens <danakj@orodu.net> | 2011-01-27 17:30:45 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2012-09-30 14:50:30 -0400 |
| commit | 9f31f80ce8adaa4c4cc899e7ab9106d971fe4e96 (patch) | |
| tree | aff5c6b7fb3e724e1bfac03e3db9b7d4ed7a7f45 /openbox/menu.h | |
| parent | 7d32190a4cce0a579e187998ec5f834a3b8932e5 (diff) | |
add menu_sort_entries() which sorts all entries in an ObMenu
this function sorts each group of entries that appear together between two
consecutive separators (or ends of the list)
Diffstat (limited to 'openbox/menu.h')
| -rw-r--r-- | openbox/menu.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openbox/menu.h b/openbox/menu.h index 76cc238f..7d719729 100644 --- a/openbox/menu.h +++ b/openbox/menu.h @@ -59,6 +59,7 @@ struct _ObMenu gchar *name; /* Displayed title */ gchar *title; + gchar *collate_key; /*! The shortcut key that would be used to activate this menu if it was displayed as a submenu */ gunichar shortcut; @@ -108,6 +109,7 @@ struct _ObNormalMenuEntry { gint icon_alpha; gchar *label; + gchar *collate_key; /*! The shortcut key that would be used to activate this menu entry */ gunichar shortcut; /*! The shortcut's position in the string */ @@ -211,7 +213,10 @@ ObMenuEntry* menu_add_normal(ObMenu *menu, gint id, const gchar *label, ObMenuEntry* menu_add_submenu(ObMenu *menu, gint id, const gchar *submenu); ObMenuEntry* menu_add_separator(ObMenu *menu, gint id, const gchar *label); -void menu_clear_entries(ObMenu *menu); +/*! This sorts groups of menu entries between consecutive separators */ +void menu_sort_entries(ObMenu *self); + +void menu_clear_entries(ObMenu *self); void menu_entry_remove(ObMenuEntry *self); void menu_entry_set_label(ObMenuEntry *self, const gchar *label, |
