diff options
| author | ruki <[email protected]> | 2018-02-03 17:30:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-02-03 17:30:06 +0800 |
| commit | e2fa783bbb4f2b2eaa45b6c57dea664982b53931 (patch) | |
| tree | aa04e5430bab079c15756013cd1ddb3e2bfda5fc | |
| parent | 59c54d54023e4bf9f47095dada02497747f5e0a7 (diff) | |
fix show result dialog in mconfdialog
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | xmake/core/ui/mconfdialog.lua | 6 | ||||
| -rw-r--r-- | xmake/core/ui/panel.lua | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 033e8eca6..5b03bb283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * Add `xmake f --menu` to configure project with a menu configuration interface * Add `set_values` api to `option()` * Support to generate a menu configuration interface from user custom project options +* Add source file position to interpreter and search results in menu ### Changes @@ -432,6 +433,7 @@ * 通过`xmake f --menu`实现可视化菜单交互配置,简化工程的编译配置 * 添加`set_values`接口到option * 改进option,支持根据工程中用户自定义的option,自动生成可视化配置菜单 +* 在调用api设置工程配置时以及在配置菜单中添加源文件位置信息 ### 改进 diff --git a/xmake/core/ui/mconfdialog.lua b/xmake/core/ui/mconfdialog.lua index fdd82565d..819b0745e 100644 --- a/xmake/core/ui/mconfdialog.lua +++ b/xmake/core/ui/mconfdialog.lua @@ -283,7 +283,11 @@ end function mconfdialog:show_result(text) local dialog_result = self:resultdialog() dialog_result:text():text_set(text) - self:insert(dialog_result, {centerx = true, centery = true}) + if not self:view("mconfdialog.result") then + self:insert(dialog_result, {centerx = true, centery = true}) + else + self:select(dialog_result) + end end -- on event diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua index 2cc092664..b403f339d 100644 --- a/xmake/core/ui/panel.lua +++ b/xmake/core/ui/panel.lua @@ -98,7 +98,7 @@ function panel:insert(v, opt) -- check assert(not v:parent() or v:parent() == self) - assert(not self:view(v:name()), "%s has been in this panel!", v) + assert(not self:view(v:name()), v:name() .. " has been in this panel!") -- this view has been inserted into this panel? remove it first if v:parent() == self then |
