mirror of https://github.com/buggins/dlangide.git
fix build
This commit is contained in:
parent
7b1b97a344
commit
837ebd8ad2
|
@ -58,32 +58,10 @@ class BackgroundOperationWatcherTest : BackgroundOperationWatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Subclass of toolbars that can update their items
|
|
||||||
class UpdateableToolBarComboBox : ToolBarComboBox {
|
|
||||||
this(string id, dstring[] items) {
|
|
||||||
super(id, items);
|
|
||||||
}
|
|
||||||
|
|
||||||
@property items(dstring[] newItems) {
|
|
||||||
_adapter.items = newItems;
|
|
||||||
if(newItems.length > 0) {
|
|
||||||
selectedItemIndex = 0;
|
|
||||||
}
|
|
||||||
requestLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
@property dstring selectedItem() {
|
|
||||||
size_t index = _selectedItemIndex;
|
|
||||||
if(index < 0 || index >= _adapter.itemCount) return "";
|
|
||||||
|
|
||||||
return _adapter.items.get(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// DIDE app frame
|
/// DIDE app frame
|
||||||
class IDEFrame : AppFrame {
|
class IDEFrame : AppFrame {
|
||||||
|
|
||||||
private UpdateableToolBarComboBox projectConfigurationCombo;
|
private ToolBarComboBox projectConfigurationCombo;
|
||||||
|
|
||||||
MenuItem mainMenuItems;
|
MenuItem mainMenuItems;
|
||||||
WorkspacePanel _wsPanel;
|
WorkspacePanel _wsPanel;
|
||||||
|
@ -464,7 +442,7 @@ class IDEFrame : AppFrame {
|
||||||
|
|
||||||
tb.addButtons(ACTION_DEBUG_START);
|
tb.addButtons(ACTION_DEBUG_START);
|
||||||
|
|
||||||
projectConfigurationCombo = new UpdateableToolBarComboBox("projectConfig", [ProjectConfiguration.DEFAULT_NAME.to!dstring]);
|
projectConfigurationCombo = new ToolBarComboBox("projectConfig", [ProjectConfiguration.DEFAULT_NAME.to!dstring]);//Updateable
|
||||||
projectConfigurationCombo.onItemClickListener = delegate(Widget source, int index) {
|
projectConfigurationCombo.onItemClickListener = delegate(Widget source, int index) {
|
||||||
if (currentWorkspace) {
|
if (currentWorkspace) {
|
||||||
currentWorkspace.setStartupProjectConfiguration(projectConfigurationCombo.selectedItem.to!string);
|
currentWorkspace.setStartupProjectConfiguration(projectConfigurationCombo.selectedItem.to!string);
|
||||||
|
|
Loading…
Reference in New Issue