From db4703df6c8ea1bd1b36484e4471ec8fe4d14483 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 26 Dec 2013 10:53:10 +0000 Subject: [PATCH] ide: Advanced menu now local too git-svn-id: svn://ultimatepp.org/upp/trunk@6697 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Insert.cpp | 8 +++++++- uppsrc/ide/ide.h | 1 + uppsrc/ide/idebar.cpp | 6 ++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/uppsrc/ide/Insert.cpp b/uppsrc/ide/Insert.cpp index d64f1d859..d81af263f 100644 --- a/uppsrc/ide/Insert.cpp +++ b/uppsrc/ide/Insert.cpp @@ -151,9 +151,15 @@ void Ide::InsertMenu(Bar& bar) bar.Add("Insert file path..", THISBACK(InsertFilePath)); } -void Ide::EditorMenu(Bar& bar) +void Ide::InsertAdvanced(Bar& bar) { bar.Add("Insert", THISBACK(InsertMenu)); + bar.Add("Advanced", THISBACK(EditSpecial)); +} + +void Ide::EditorMenu(Bar& bar) +{ + InsertAdvanced(bar); bar.MenuSeparator(); editor.StdBar(bar); } diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index 1abc29280..0d42ce160 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -869,6 +869,7 @@ public: void InsertCString(); void InsertFilePath(); void InsertMenu(Bar& bar); + void InsertAdvanced(Bar& bar); void EditorMenu(Bar& bar); void SearchMenu(Bar& bar); diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 19fbe062d..485b06604 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -212,10 +212,8 @@ void Ide::Edit(Bar& menu) { if(menu.IsMenuBar()) menu.Add("Find and Replace", THISBACK(SearchMenu)); - if(!designer && menu.IsMenuBar()) { - menu.Add("Insert", THISBACK(InsertMenu)); - menu.Add("Advanced", THISBACK(EditSpecial)); - } + if(!designer && menu.IsMenuBar()) + InsertAdvanced(menu); if(editor.GetLineCount() && editor.GetUtf8Line(0) == "$uvs: PENDING CONFLICT") { menu.MenuSeparator();