Subversion Repositories tpanel

Rev

Rev 446 | Rev 463 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 446 Rev 462
Line 77... Line 77...
77
        return false;
77
        return false;
78
 
78
 
79
    int depth = 0;
79
    int depth = 0;
80
    size_t index = 0;
80
    size_t index = 0;
81
 
81
 
-
 
82
    if (xml.getElementIndex("versionInfo", &depth) == TExpat::npos)
-
 
83
    {
-
 
84
        MSG_ERROR("Couldn't find the project version information! Broken surface?");
-
 
85
        TError::setError();
-
 
86
        return false;
-
 
87
    }
-
 
88
 
-
 
89
    depth++;
-
 
90
    bool valid = false;
-
 
91
 
-
 
92
    mSetup.versionInfo.formatVersion = xml.getElementInt("formatVersion", depth);
-
 
93
    mSetup.versionInfo.graphicsVersion = xml.getElementInt("graphicsVersion", depth);
-
 
94
    mSetup.versionInfo.fileVersion = xml.getElement("fileVersion", depth);
-
 
95
    mSetup.versionInfo.designVersion = xml.getElement("designVersion", depth);
-
 
96
    mSetup.versionInfo.g5appsVersion = xml.getElementInt("g5appsVersion", depth, &valid);
-
 
97
 
-
 
98
    if (!valid)
-
 
99
        mSetup.versionInfo.g5appsVersion = 0;   // No TP5 file
-
 
100
 
-
 
101
    depth--;
-
 
102
 
-
 
103
    if (xml.getElementIndex("versionInfo", &depth) == TExpat::npos)
-
 
104
    {
-
 
105
        MSG_ERROR("Couldn't find the project version information! Broken surface?");
-
 
106
        TError::setError();
-
 
107
        return false;
-
 
108
    }
-
 
109
 
-
 
110
    depth++;
-
 
111
    valid = false;
-
 
112
 
-
 
113
    mSetup.supportFiles.mapFile = xml.getElement("mapFile", depth);
-
 
114
    mSetup.supportFiles.colorFile = xml.getElement("colorFile", depth);
-
 
115
    mSetup.supportFiles.fontFile = xml.getElement("fontFile", depth);
-
 
116
    mSetup.supportFiles.themeFile = xml.getElement("themeFile", depth);
-
 
117
    mSetup.supportFiles.iconFile = xml.getElement("iconFile", depth);
-
 
118
    mSetup.supportFiles.externalButtonFile = xml.getElement("externalButtonFile", depth);
-
 
119
    mSetup.supportFiles.appFile = xml.getElement("appFile", depth);
-
 
120
 
-
 
121
    depth--;
-
 
122
 
82
    if (xml.getElementIndex("projectInfo", &depth) == TExpat::npos)
123
    if (xml.getElementIndex("projectInfo", &depth) == TExpat::npos)
83
    {
124
    {
84
        MSG_ERROR("Couldn't find the project information! Broken surface?");
125
        MSG_ERROR("Couldn't find the project information! Broken surface?");
85
        TError::setError();
126
        TError::setError();
86
        return false;
127
        return false;
Line 279... Line 320...
279
        while ((index = xml.getNextElementIndex("resourceList", depth)) != TExpat::npos);
320
        while ((index = xml.getNextElementIndex("resourceList", depth)) != TExpat::npos);
280
    }
321
    }
281
 
322
 
282
    if (xml.getElementIndex("paletteList", &depth) == TExpat::npos)
323
    if (xml.getElementIndex("paletteList", &depth) == TExpat::npos)
283
    {
324
    {
-
 
325
        if (!isTP5())
-
 
326
        {
284
        MSG_WARNING("There exists no color palette! There will be only the system colors available.");
327
            MSG_WARNING("There exists no color palette! There will be only the system colors available.");
-
 
328
        }
-
 
329
        else
-
 
330
        {
-
 
331
            PALETTE_SETUP ps;
-
 
332
            ps.name = ps.file = mSetup.supportFiles.colorFile;
-
 
333
            ps.paletteID = 1;
-
 
334
            mSetup.palettes.push_back(ps);
-
 
335
        }
-
 
336
 
285
        return true;
337
        return true;
286
    }
338
    }
287
 
339
 
288
    depth++;
340
    depth++;
289
 
341