Decided what to do about menuless menubars and implemented it.
This commit is contained in:
parent
99216435c7
commit
c6b4d80602
2
TODO.md
2
TODO.md
|
@ -16,7 +16,6 @@ ultimately:
|
|||
- in which case, hide leading or trailing separators?
|
||||
- generate libui.lib and related files
|
||||
- make OS-specific headers generated by an IDL
|
||||
- figure out what to do on Windows and GTK+ if we don't have menus but the user wants a menubar (zero-height widget? don't bother? complain?)
|
||||
- bin.c
|
||||
- find a way to move the has parent check at the beginning of binDestroy()
|
||||
- menu item state change while the menu is visible (not in response to user action)
|
||||
|
@ -41,3 +40,4 @@ notes to self
|
|||
- note that uiInitOptions should be initialized to zero
|
||||
- explicitly document that uiCheckboxSetChecked() and uiEntrySetText() do not fire uiCheckboxOnToggled() and uiEntryOnChanged(), respectively
|
||||
- note that uiControlResize() on a uiContainer also updates
|
||||
- note that if a menu is requested on systems with menubars on windows but no menus are defined, the result is a blank menubar, with whatever that means left up to the OS to decide
|
||||
|
|
|
@ -297,6 +297,7 @@ GtkWidget *makeMenubar(uiWindow *w)
|
|||
|
||||
menubar = gtk_menu_bar_new();
|
||||
|
||||
if (menus != NULL)
|
||||
for (i = 0; i < menus->len; i++) {
|
||||
m = g_array_index(menus, struct menu *, i);
|
||||
menuitem = gtk_menu_item_new_with_label(m->name);
|
||||
|
|
Loading…
Reference in New Issue