mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Navigator cosmetics
This commit is contained in:
parent
2f45699faf
commit
2f5c162efb
2 changed files with 16 additions and 16 deletions
|
|
@ -169,7 +169,6 @@ void Navigator::Navigate()
|
|||
Search();
|
||||
navigating = false;
|
||||
}
|
||||
SyncCursor();
|
||||
}
|
||||
else
|
||||
if(m.kind == KIND_SRCFILE) {
|
||||
|
|
@ -182,6 +181,7 @@ void Navigator::Navigate()
|
|||
}
|
||||
}
|
||||
navigating = false;
|
||||
SyncCursor();
|
||||
}
|
||||
|
||||
void Navigator::NavigatorClick()
|
||||
|
|
@ -227,21 +227,6 @@ void Ide::SearchCode()
|
|||
}
|
||||
}
|
||||
|
||||
void Ide::SwitchHeader()
|
||||
{
|
||||
int c = filelist.GetCursor();
|
||||
if(c < 0) return;
|
||||
String currfile = filelist[c];
|
||||
const char *ext = GetFileExtPos(currfile);
|
||||
if(!stricmp(ext, ".h") || !stricmp(ext, ".hpp")
|
||||
|| !stricmp(ext, ".lay") || !stricmp(ext, ".iml")) {
|
||||
int f = filelist.Find(ForceExt(currfile, ".cpp"));
|
||||
if(f < 0) f = filelist.Find(ForceExt(currfile, ".c"));
|
||||
if(f < 0) f = filelist.Find(ForceExt(currfile, ".cc"));
|
||||
if(f >= 0) filelist.SetCursor(f);
|
||||
}
|
||||
}
|
||||
|
||||
void Navigator::NavigatorDisplay::PaintBackground(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
|
||||
{
|
||||
int ii = q;
|
||||
|
|
|
|||
|
|
@ -67,3 +67,18 @@ void Ide::Cycle(const AnnotationItem& cm, int liney, bool navigate)
|
|||
q = q < 0 ? 0 : (q + 1) % list.GetCount();
|
||||
GotoPos(list[q].path, list[q].pos);
|
||||
}
|
||||
|
||||
void Ide::SwitchHeader()
|
||||
{
|
||||
int c = filelist.GetCursor();
|
||||
if(c < 0) return;
|
||||
String currfile = filelist[c];
|
||||
const char *ext = GetFileExtPos(currfile);
|
||||
if(!stricmp(ext, ".h") || !stricmp(ext, ".hpp")
|
||||
|| !stricmp(ext, ".lay") || !stricmp(ext, ".iml")) {
|
||||
int f = filelist.Find(ForceExt(currfile, ".cpp"));
|
||||
if(f < 0) f = filelist.Find(ForceExt(currfile, ".c"));
|
||||
if(f < 0) f = filelist.Find(ForceExt(currfile, ".cc"));
|
||||
if(f >= 0) filelist.SetCursor(f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue