[DEVELOPMENT ENVIRONMENT]
* BUG: Do not display the current opened project in the list of recently opened projects. [GB.XML] * BUG: XMLDocument.Open() now can open a file located inside the project. git-svn-id: svn://localhost/gambas/trunk@1406 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
9b46a269c7
commit
4834202640
3 changed files with 13 additions and 4 deletions
|
@ -266,6 +266,7 @@ End
|
|||
|
||||
Public Sub OnUpdateRecent()
|
||||
|
||||
lstRecent.Clear
|
||||
chkSortRecent_Click
|
||||
|
||||
End
|
||||
|
|
|
@ -319,6 +319,7 @@ Public Function Open(sDir As String) As Boolean
|
|||
Positions.Clear
|
||||
|
||||
FMain.OnProjectChange
|
||||
FOpenProject.OnUpdateRecent
|
||||
FFind.Hide
|
||||
FFind.ReadConfig
|
||||
'FFind.OnProjectChange
|
||||
|
@ -3966,10 +3967,14 @@ Public Sub GetRecentFiles(Optional bSort As Boolean) As String[]
|
|||
|
||||
Dim aList As String[]
|
||||
|
||||
If Not bSort Then Return Recent
|
||||
|
||||
aList = Recent.Copy()
|
||||
Return aList.Sort()
|
||||
|
||||
If aList.Count Then
|
||||
If aList[0] = Project.Dir Then aList.Remove(0)
|
||||
If bSort Then aList.Sort()
|
||||
Endif
|
||||
|
||||
Return aList
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -108,10 +108,13 @@ END_METHOD
|
|||
|
||||
BEGIN_METHOD (CXMLDocument_Open,GB_STRING FileName;)
|
||||
|
||||
const char *path;
|
||||
|
||||
free_document(THIS);
|
||||
|
||||
THIS->doc=xmlParseFile(GB.ToZeroString(ARG(FileName)));
|
||||
path = GB.RealFileName(STRING(FileName), LENGTH(FileName));
|
||||
|
||||
THIS->doc=xmlParseFile(path);
|
||||
if (!THIS->doc)
|
||||
{
|
||||
GB.Error("Unable to parse XML file");
|
||||
|
|
Loading…
Reference in a new issue