mirror of https://gitlab.com/nakst/essence
close all tabs menu item
This commit is contained in:
parent
4206aae3f6
commit
599a2786d8
|
@ -861,6 +861,16 @@ int WindowTabBandMessage(EsElement *element, EsMessage *message) {
|
||||||
EsSyscall(ES_SYSCALL_WINDOW_MOVE, band->window->handle, (uintptr_t) &newBounds, 0, ES_FLAGS_DEFAULT);
|
EsSyscall(ES_SYSCALL_WINDOW_MOVE, band->window->handle, (uintptr_t) &newBounds, 0, ES_FLAGS_DEFAULT);
|
||||||
}, band);
|
}, band);
|
||||||
|
|
||||||
|
EsMenuAddItem(menu, band->window->isMaximised ? ES_ELEMENT_DISABLED : ES_FLAGS_DEFAULT,
|
||||||
|
band->items.Length() > 1 ? interfaceString_DesktopCloseAllTabs : interfaceString_DesktopCloseWindow, -1,
|
||||||
|
[] (EsMenu *, EsGeneric context) {
|
||||||
|
WindowTabBand *band = (WindowTabBand *) context.p;
|
||||||
|
|
||||||
|
for (uintptr_t i = 0; i < band->items.Length(); i++) {
|
||||||
|
WindowTabClose((WindowTab *) band->items[i]);
|
||||||
|
}
|
||||||
|
}, band);
|
||||||
|
|
||||||
EsMenuShow(menu);
|
EsMenuShow(menu);
|
||||||
} else {
|
} else {
|
||||||
return ReorderListMessage(band, message);
|
return ReorderListMessage(band, message);
|
||||||
|
|
|
@ -93,6 +93,8 @@ DEFINE_INTERFACE_STRING(DesktopCloseTab, "Close tab");
|
||||||
DEFINE_INTERFACE_STRING(DesktopMoveTabToNewWindow, "Move to new window");
|
DEFINE_INTERFACE_STRING(DesktopMoveTabToNewWindow, "Move to new window");
|
||||||
DEFINE_INTERFACE_STRING(DesktopInspectUI, "Inspect UI");
|
DEFINE_INTERFACE_STRING(DesktopInspectUI, "Inspect UI");
|
||||||
DEFINE_INTERFACE_STRING(DesktopCenterWindow, "Center in screen");
|
DEFINE_INTERFACE_STRING(DesktopCenterWindow, "Center in screen");
|
||||||
|
DEFINE_INTERFACE_STRING(DesktopCloseWindow, "Close window");
|
||||||
|
DEFINE_INTERFACE_STRING(DesktopCloseAllTabs, "Close all tabs");
|
||||||
|
|
||||||
DEFINE_INTERFACE_STRING(DesktopSettingsApplication, "Settings");
|
DEFINE_INTERFACE_STRING(DesktopSettingsApplication, "Settings");
|
||||||
DEFINE_INTERFACE_STRING(DesktopSettingsTitle, "Settings");
|
DEFINE_INTERFACE_STRING(DesktopSettingsTitle, "Settings");
|
||||||
|
|
Loading…
Reference in New Issue