diff --git a/src/dlangui/core/stdaction.d b/src/dlangui/core/stdaction.d index 7c166d65..49adeb45 100644 --- a/src/dlangui/core/stdaction.d +++ b/src/dlangui/core/stdaction.d @@ -30,7 +30,9 @@ enum StandardAction : int { Ignore, Open, Save, + SaveAll, DiscardChanges, + DiscardAll, OpenUrl, } @@ -44,6 +46,8 @@ const Action ACTION_RETRY = new Action(StandardAction.Retry, "ACTION_RETRY"c); const Action ACTION_IGNORE = new Action(StandardAction.Ignore, "ACTION_IGNORE"c); const Action ACTION_OPEN = new Action(StandardAction.Open, "ACTION_OPEN"c); const Action ACTION_SAVE = new Action(StandardAction.Save, "ACTION_SAVE"c); +const Action ACTION_SAVE_ALL = new Action(StandardAction.SaveAll, "ACTION_SAVE_ALL"c); const Action ACTION_DISCARD_CHANGES = new Action(StandardAction.DiscardChanges, "ACTION_DISCARD_CHANGES"c); +const Action ACTION_DISCARD_ALL = new Action(StandardAction.DiscardAll, "ACTION_DISCARD_ALL"c); const Action ACTION_OPEN_URL = (new Action(StandardAction.OpenUrl)).iconId("applications-internet"); diff --git a/src/dlangui/dialogs/dialog.d b/src/dlangui/dialogs/dialog.d index 894ba2df..54349e07 100644 --- a/src/dlangui/dialogs/dialog.d +++ b/src/dlangui/dialogs/dialog.d @@ -67,7 +67,7 @@ class Dialog : VerticalLayout { /** Measure widget according to desired width and height constraints. (Step 1 of two phase layout). */ - void measure(int parentWidth, int parentHeight) { + override void measure(int parentWidth, int parentHeight) { super.measure(parentWidth, parentHeight); if ((_flags & DialogFlag.Resizable) && (_flags & DialogFlag.Popup)) { Point sz = Point(_parentWindow.width * 4 / 5, _parentWindow.height * 4 / 5); diff --git a/src/dlangui/widgets/tabs.d b/src/dlangui/widgets/tabs.d index 5a48c981..7b3bb9a2 100644 --- a/src/dlangui/widgets/tabs.d +++ b/src/dlangui/widgets/tabs.d @@ -686,6 +686,12 @@ class TabWidget : VerticalLayout, TabHandler, TabCloseHandler { return _tabHost.tabBody(id); } + /// get tab content widget by id + Widget tabBody(int index) { + string id = _tabControl.tab(index).id; + return _tabHost.tabBody(id); + } + /// returns tab item by id (null if index out of range) TabItem tab(int index) { return _tabControl.tab(index); @@ -694,6 +700,10 @@ class TabWidget : VerticalLayout, TabHandler, TabCloseHandler { TabItem tab(string id) { return _tabControl.tab(id); } + /// returns tab count + @property int tabCount() const { + return _tabControl.tabCount; + } /// get tab index by tab id (-1 if not found) int tabIndex(string id) { return _tabControl.tabIndex(id); diff --git a/views/res/i18n/std_en.ini b/views/res/i18n/std_en.ini index 253bc157..f209c1f6 100644 --- a/views/res/i18n/std_en.ini +++ b/views/res/i18n/std_en.ini @@ -10,4 +10,6 @@ ACTION_RETRY=Retry ACTION_IGNORE=Ignore ACTION_OPEN=Open ACTION_SAVE=Save -ACTION_DISCARD_CHANGES=Discard changes +ACTION_SAVE_ALL=Save All +ACTION_DISCARD_CHANGES=Discard +ACTION_DISCARD_ALL=Discard all