Subversion Repositories spk

Rev

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

Rev 134 Rev 158
Line 119... Line 119...
119
		}
119
		}
120
 
120
 
121
		if ( m_pPackage->GetIcon() )
121
		if ( m_pPackage->GetIcon() )
122
		{
122
		{
123
			C_File *f = m_pPackage->GetIcon();
123
			C_File *f = m_pPackage->GetIcon();
124
			f->SetFilename(CyStringFromSystemString(System::IO::Path::GetTempPath()) + "/package_icon." + m_pPackage->GetIconExt());
124
			f->setFilename(_S(System::IO::Path::GetTempPath()) + "/package_icon." + m_pPackage->iconExt());
125
			f->SetFullDir(CyStringFromSystemString(System::IO::Path::GetTempPath()));
125
			f->setFullDir(_S(System::IO::Path::GetTempPath()));
126
			long size;
126
			long size;
127
			unsigned char *data = f->UncompressData(&size, 0);
127
			unsigned char *data = f->UncompressData(&size, 0);
128
			if ( data && size )
128
			if ( data && size )
129
			{
129
			{
130
				f->writeFilePointer(data, size);
130
				f->writeFilePointer(data, size);
Line 1267... Line 1267...
1267
		ofd->RestoreDirectory = true;
1267
		ofd->RestoreDirectory = true;
1268
		if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
1268
		if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
1269
		{
1269
		{
1270
			m_pPackage->setFilename(_S(ofd->FileName));
1270
			m_pPackage->setFilename(_S(ofd->FileName));
1271
			m_sFilename = ofd->FileName;
1271
			m_sFilename = ofd->FileName;
1272
			m_pTabPage->Text = SystemStringFromCyString(CFileIO(m_pPackage->filename()).GetFilename());
1272
			m_pTabPage->Text = _US(CFileIO(m_pPackage->filename()).filename());
1273
			m_pMenuItem->Text = m_pTabPage->Text;
1273
			m_pMenuItem->Text = m_pTabPage->Text;
1274
			this->Save();
1274
			this->Save();
1275
		}
1275
		}
1276
	}
1276
	}
1277
 
1277
 
Line 1705... Line 1705...
1705
		else if ( String::Compare(IO::FileInfo(file).Extension, ".cat") == 0 )
1705
		else if ( String::Compare(IO::FileInfo(file).Extension, ".cat") == 0 )
1706
		{
1706
		{
1707
			CCatFile cat;
1707
			CCatFile cat;
1708
			if ( cat.open(_S(file), "", CATREAD_CATDECRYPT, false) == CATERR_NONE )
1708
			if ( cat.open(_S(file), "", CATREAD_CATDECRYPT, false) == CATERR_NONE )
1709
			{
1709
			{
1710
				if ( cat.ExtractFile(CyStringFromSystemString("types\\" + type + ".pck"), CPackages::GetTempDirectory() + "tmp.dat") )
1710
				if ( cat.ExtractFile(_S("types\\" + type + ".pck"), CPackages::tempDirectory() + "tmp.dat") )
1711
					return _US(CPackages::tempDirectory() + "tmp.dat");
1711
					return _US(CPackages::tempDirectory() + "tmp.dat");
1712
			}
1712
			}
1713
		}
1713
		}
1714
 
1714
 
1715
		return "";
1715
		return "";