mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
T++ Move fix, DropList fix
git-svn-id: svn://ultimatepp.org/upp/trunk@607 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6c395bd86d
commit
3978239136
8 changed files with 29 additions and 14 deletions
|
|
@ -103,8 +103,9 @@ void PopUpTable::PopUp(Ctrl *owner, int x, int top, int bottom, int width) {
|
|||
void PopUpTable::PopUp(Ctrl *owner, int width)
|
||||
{
|
||||
Rect r = owner->GetScreenRect();
|
||||
r.right = r.left + width;
|
||||
PopUp(owner, r.left, r.top, r.bottom, width ? width : r.Width());
|
||||
if(width)
|
||||
r.right = r.left + width;
|
||||
PopUp(owner, r.left, r.top, r.bottom, r.Width());
|
||||
}
|
||||
|
||||
void PopUpTable::PopUp(Ctrl *owner)
|
||||
|
|
|
|||
|
|
@ -150,17 +150,20 @@ void SaveGroupInc(const String& grouppath)
|
|||
|
||||
void SetTopicGroupIncludeable(const char *path, bool set)
|
||||
{
|
||||
FindFile ff(AppendFileName(path, "*.tpp"));
|
||||
FindFile ff(AppendFileName(path, "*.*"));
|
||||
while(ff) {
|
||||
if(GetFileExt(ff.GetName()) == ".tpp") {
|
||||
String s = AppendFileName(path, ff.GetName());
|
||||
String t = AppendFileName(path, ForceExt(ff.GetName(), ".tppi"));
|
||||
if(set) {
|
||||
Topic p = ReadTopic(LoadFile(s));
|
||||
SaveFile(t, WriteTopicI(p.title, ParseQTF(p.text)));
|
||||
if(ff.IsFile()) {
|
||||
String fn = ff.GetName();
|
||||
String t = AppendFileName(path, ForceExt(fn, ".tppi"));
|
||||
if(GetFileExt(fn) == ".tpp") {
|
||||
String s = AppendFileName(path, fn);
|
||||
if(set) {
|
||||
Topic p = ReadTopic(LoadFile(s));
|
||||
SaveFile(t, WriteTopicI(p.title, ParseQTF(p.text)));
|
||||
}
|
||||
}
|
||||
else
|
||||
FileDelete(t);
|
||||
if(GetFileExt(fn) == ".tppi" && !set)
|
||||
DeleteFile(t);
|
||||
}
|
||||
ff.Next();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,13 +72,18 @@ void TopicEditor::MoveTopic()
|
|||
}
|
||||
Flush();
|
||||
RealizeDirectory(GetFileFolder(np));
|
||||
String pi = ForceExt(p, ".tppi");
|
||||
if(!SaveFile(np, LoadFile(p))) {
|
||||
Exclamation("Operation failed!");
|
||||
TopicCursor();
|
||||
return;
|
||||
}
|
||||
SaveFile(ForceExt(np, ".tppi"), LoadFile(pi));
|
||||
serial++;
|
||||
FileDelete(p);
|
||||
FileDelete(pi);
|
||||
InvalidateTopicInfoPath(p);
|
||||
InvalidateTopicInfoPath(np);
|
||||
TheIde()->IdeFlushFile();
|
||||
TheIde()->IdeOpenTopicFile(np);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ void LoadTopics(FileList& topic, const String& grouppath)
|
|||
while(ff) {
|
||||
if(ff.IsFile() && GetFileExt(ff.GetName()) == ".tpp")
|
||||
topic.Add(GetFileTitle(ff.GetName()), TopicImg::Topic());
|
||||
ff.Next();
|
||||
}
|
||||
topic.Sort(ListOrder());
|
||||
topic.Enable();
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public:
|
|||
virtual void IdeSetBar() = 0;
|
||||
virtual void IdeGotoCodeRef(String link) = 0;
|
||||
virtual void IdeOpenTopicFile(const String& file) = 0;
|
||||
virtual void IdeFlushFile() = 0;
|
||||
|
||||
virtual ~IdeContext() {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@ public:
|
|||
virtual void IdeSetBar();
|
||||
virtual void IdeGotoCodeRef(String coderef);
|
||||
virtual void IdeOpenTopicFile(const String& file);
|
||||
virtual void IdeFlushFile();
|
||||
|
||||
enum {
|
||||
EDITING, BUILDING, RUNNING, DEBUGGING,
|
||||
|
|
|
|||
|
|
@ -102,13 +102,18 @@ void Ide::OpenATopic()
|
|||
OpenTopic(t);
|
||||
}
|
||||
|
||||
void Ide::IdeFlushFile()
|
||||
{
|
||||
FlushFile();
|
||||
}
|
||||
|
||||
void Ide::IdeOpenTopicFile(const String& file)
|
||||
{
|
||||
EditFile(GetFileFolder(file));
|
||||
if(designer) {
|
||||
TopicEditor *te = dynamic_cast<TopicEditor *>(&designer->DesignerCtrl());
|
||||
if(te)
|
||||
te->GoTo(GetFileName(file), "", "");
|
||||
te->GoTo(GetFileTitle(file), "", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
#define IDE_VERSION "810.r167"
|
||||
#define IDE_VERSION "811.r168"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue