signal names refactoring

This commit is contained in:
Vadim Lopatin 2015-12-04 14:35:15 +03:00
parent 373960b17e
commit ea784c9909
4 changed files with 12 additions and 12 deletions

View File

@ -192,13 +192,13 @@ class DSourceEdit : SourceEdit {
completionPopupItems.updateActionState(this); completionPopupItems.updateActionState(this);
PopupMenu popupMenu = new PopupMenu(completionPopupItems); PopupMenu popupMenu = new PopupMenu(completionPopupItems);
popupMenu.onMenuItemActionListener = this; popupMenu.menuItemAction = this;
popupMenu.maxHeight(400); popupMenu.maxHeight(400);
popupMenu.selectItem(0); popupMenu.selectItem(0);
PopupWidget popup = window.showPopup(popupMenu, this, PopupAlign.Point | PopupAlign.Right, textPosToClient(_caretPos).left + left + _leftPaneWidth, textPosToClient(_caretPos).top + top + margins.top); PopupWidget popup = window.showPopup(popupMenu, this, PopupAlign.Point | PopupAlign.Right, textPosToClient(_caretPos).left + left + _leftPaneWidth, textPosToClient(_caretPos).top + top + margins.top);
popup.setFocus(); popup.setFocus();
popup.onPopupCloseListener = delegate(PopupWidget source) { setFocus(); }; popup.popupClosed = delegate(PopupWidget source) { setFocus(); };
popup.flags = PopupFlags.CloseOnClickOutside; popup.flags = PopupFlags.CloseOnClickOutside;
Log.d("Showing popup at ", textPosToClient(_caretPos).left, " ", textPosToClient(_caretPos).top); Log.d("Showing popup at ", textPosToClient(_caretPos).left, " ", textPosToClient(_caretPos).top);

View File

@ -318,8 +318,8 @@ class IDEFrame : AppFrame {
_tabs = new TabWidget("TABS"); _tabs = new TabWidget("TABS");
_tabs.hiddenTabsVisibility = Visibility.Gone; _tabs.hiddenTabsVisibility = Visibility.Gone;
_tabs.setStyles(STYLE_DOCK_HOST_BODY, STYLE_TAB_UP_DARK, STYLE_TAB_UP_BUTTON_DARK, STYLE_TAB_UP_BUTTON_DARK_TEXT); _tabs.setStyles(STYLE_DOCK_HOST_BODY, STYLE_TAB_UP_DARK, STYLE_TAB_UP_BUTTON_DARK, STYLE_TAB_UP_BUTTON_DARK_TEXT);
_tabs.onTabChangedListener = &onTabChanged; _tabs.tabChanged = &onTabChanged;
_tabs.onTabCloseListener = &onTabClose; _tabs.tabClose = &onTabClose;
_dockHost.bodyWidget = _tabs; _dockHost.bodyWidget = _tabs;
@ -443,7 +443,7 @@ class IDEFrame : AppFrame {
tb.addButtons(ACTION_DEBUG_START); tb.addButtons(ACTION_DEBUG_START);
projectConfigurationCombo = new ToolBarComboBox("projectConfig", [ProjectConfiguration.DEFAULT_NAME.to!dstring]);//Updateable projectConfigurationCombo = new ToolBarComboBox("projectConfig", [ProjectConfiguration.DEFAULT_NAME.to!dstring]);//Updateable
projectConfigurationCombo.onItemClickListener = delegate(Widget source, int index) { projectConfigurationCombo.itemClick = delegate(Widget source, int index) {
if (currentWorkspace) { if (currentWorkspace) {
currentWorkspace.setStartupProjectConfiguration(projectConfigurationCombo.selectedItem.to!string); currentWorkspace.setStartupProjectConfiguration(projectConfigurationCombo.selectedItem.to!string);
} }
@ -453,7 +453,7 @@ class IDEFrame : AppFrame {
tb.addControl(projectConfigurationCombo); tb.addControl(projectConfigurationCombo);
ToolBarComboBox cbBuildConfiguration = new ToolBarComboBox("buildConfig", ["Debug"d, "Release"d, "Unittest"d]); ToolBarComboBox cbBuildConfiguration = new ToolBarComboBox("buildConfig", ["Debug"d, "Release"d, "Unittest"d]);
cbBuildConfiguration.onItemClickListener = delegate(Widget source, int index) { cbBuildConfiguration.itemClick = delegate(Widget source, int index) {
if (currentWorkspace && index < 3) { if (currentWorkspace && index < 3) {
currentWorkspace.buildConfiguration = [BuildConfiguration.Debug, BuildConfiguration.Release, BuildConfiguration.Unittest][index]; currentWorkspace.buildConfiguration = [BuildConfiguration.Debug, BuildConfiguration.Release, BuildConfiguration.Unittest][index];
} }
@ -543,7 +543,7 @@ class IDEFrame : AppFrame {
FileDialog dlg = createFileDialog(caption); FileDialog dlg = createFileDialog(caption);
dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.dh;*.json;*.xml;*.ini")); dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.dh;*.json;*.xml;*.ini"));
dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*")); dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*"));
dlg.onDialogResult = delegate(Dialog dlg, const Action result) { dlg.dialogResult = delegate(Dialog dlg, const Action result) {
if (result.id == ACTION_OPEN.id) { if (result.id == ACTION_OPEN.id) {
string filename = result.stringParam; string filename = result.stringParam;
openSourceFile(filename); openSourceFile(filename);
@ -584,7 +584,7 @@ class IDEFrame : AppFrame {
caption = "Open Workspace or Project"d; caption = "Open Workspace or Project"d;
FileDialog dlg = createFileDialog(caption); FileDialog dlg = createFileDialog(caption);
dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;package.json")); dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;package.json"));
dlg.onDialogResult = delegate(Dialog dlg, const Action result) { dlg.dialogResult = delegate(Dialog dlg, const Action result) {
if (result.id == ACTION_OPEN.id) { if (result.id == ACTION_OPEN.id) {
string filename = result.stringParam; string filename = result.stringParam;
if (filename.length) if (filename.length)
@ -634,7 +634,7 @@ class IDEFrame : AppFrame {
Setting s = _settings.copySettings(); Setting s = _settings.copySettings();
//Log.d("settings after copy:\n", s.toJSON(true)); //Log.d("settings after copy:\n", s.toJSON(true));
SettingsDialog dlg = new SettingsDialog(UIString("DlangIDE settings"d), window, s, createSettingsPages()); SettingsDialog dlg = new SettingsDialog(UIString("DlangIDE settings"d), window, s, createSettingsPages());
dlg.onDialogResult = delegate(Dialog dlg, const Action result) { dlg.dialogResult = delegate(Dialog dlg, const Action result) {
if (result.id == ACTION_APPLY.id) { if (result.id == ACTION_APPLY.id) {
//Log.d("settings after edit:\n", s.toJSON(true)); //Log.d("settings after edit:\n", s.toJSON(true));
_settings.applySettings(s); _settings.applySettings(s);

View File

@ -193,7 +193,7 @@ class SearchWidget : TabWidget {
_findText = new EditLine(); _findText = new EditLine();
_findText.padding(Rect(5,4,50,4)); _findText.padding(Rect(5,4,50,4));
_findText.layoutWidth(400); _findText.layoutWidth(400);
_findText.editorActionListener = &onEditorAction; // to handle Enter key press in editor _findText.editorAction = &onEditorAction; // to handle Enter key press in editor
_layout.addChild(_findText); _layout.addChild(_findText);
auto goButton = new ImageButton("findTextButton", "edit-find"); auto goButton = new ImageButton("findTextButton", "edit-find");

View File

@ -64,10 +64,10 @@ class WorkspacePanel : DockWindow {
override protected Widget createBodyWidget() { override protected Widget createBodyWidget() {
_tree = new TreeWidget("wstree"); _tree = new TreeWidget("wstree");
_tree.layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT); _tree.layoutHeight(FILL_PARENT).layoutHeight(FILL_PARENT);
_tree.selectionListener = &onTreeItemSelected; _tree.selectionChange = &onTreeItemSelected;
_tree.fontSize = 16; _tree.fontSize = 16;
_tree.noCollapseForSingleTopLevelItem = true; _tree.noCollapseForSingleTopLevelItem = true;
_tree.popupMenuListener = &onTreeItemPopupMenu; _tree.popupMenu = &onTreeItemPopupMenu;
_workspacePopupMenu = new MenuItem(); _workspacePopupMenu = new MenuItem();
_workspacePopupMenu.add(ACTION_PROJECT_FOLDER_ADD_ITEM); _workspacePopupMenu.add(ACTION_PROJECT_FOLDER_ADD_ITEM);