mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Skulpture updates
git-svn-id: svn://ultimatepp.org/upp/trunk@1340 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
64eb5ebbf1
commit
0ceeda96eb
7 changed files with 31 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "Theme.h"
|
||||
#include <plugin/zip/zip.h>
|
||||
|
||||
Value StringToObject(const String& s, const String& file = "") {
|
||||
Vector<String> v = Split(s, ' ');
|
||||
|
|
@ -353,8 +354,35 @@ void Theme::LoadHeader(HeaderCtrl::Style& d, const VectorMap<String, String>& se
|
|||
Theme& Theme::Load(const String& path) {
|
||||
ini.Clear();
|
||||
|
||||
folder = path;
|
||||
ini.Load(AppendFileName(folder, "theme.ini"));
|
||||
if (DirectoryExists(path) && FileExists(AppendFileName(path, "theme.ini"))) {
|
||||
folder = path;
|
||||
ini.Load(AppendFileName(folder, "theme.ini"));
|
||||
return *this;
|
||||
}
|
||||
|
||||
if (FileExists(path)) {
|
||||
//String outdir = GetTempFileName("UppTheme");
|
||||
String outdir = "c:\\Windows\\Temp\\" + Uuid::Create().ToString();
|
||||
RealizeDirectory(outdir);
|
||||
FileUnZip unzip(path);
|
||||
while(unzip) {
|
||||
String fn = AppendFileName(outdir, unzip.GetPath());
|
||||
if(unzip.IsFolder()) {
|
||||
RealizeDirectory(fn);
|
||||
unzip.SkipFile();
|
||||
}
|
||||
else {
|
||||
RealizePath(fn);
|
||||
FileOut out(fn);
|
||||
unzip.ReadFile(out);
|
||||
}
|
||||
}
|
||||
|
||||
folder = outdir;
|
||||
ini.Load(AppendFileName(outdir, "theme.ini"));
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 97 B |
Binary file not shown.
|
Before Width: | Height: | Size: 105 B |
Binary file not shown.
|
Before Width: | Height: | Size: 97 B |
|
|
@ -14,7 +14,7 @@ contrast[]-40
|
|||
|
||||
[MenuBar]
|
||||
look=png
|
||||
arealook[]=0
|
||||
arealook=null
|
||||
item=png hot 1 1 1 1
|
||||
topitem[0]=null
|
||||
topitem[1]=png hot 1 1 1 1
|
||||
|
|
|
|||
BIN
bazaar/Themes/Skulpture.zip
Normal file
BIN
bazaar/Themes/Skulpture.zip
Normal file
Binary file not shown.
BIN
bazaar/Themes/SkulptureStone.zip
Normal file
BIN
bazaar/Themes/SkulptureStone.zip
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue