Subversion Repositories spk

Rev

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

Rev 170 Rev 180
Line 70... Line 70...
70
 
70
 
71
		return type;
71
		return type;
72
	}
72
	}
73
 
73
 
74
	//TODO: check for special types
74
	//TODO: check for special types
75
	void AssignAutomaticFiletypes(CyStringList *list)
75
	void AssignAutomaticFiletypes(const Utils::CStringList &list)	
76
	{
76
	{
77
		for ( SStringList *str = list->Head(); str; str = str->;next )
77
		for(auto itr = list.begin(); itr != list.end(); itr++)
78
		{
78
		{
79
			Utils::String extradir;
79
			Utils::String extradir;
80
			s_int type = SPK::GetAutomaticFiletype(str->str.ToString(), &extradir, false);
80
			s_int type = SPK::GetAutomaticFiletype((*itr)->str, &extradir, false);
81
 
81
 
82
			if ( type == FILETYPE_EXTRA && !extradir.empty() )
82
			if ( type == FILETYPE_EXTRA && !extradir.empty() )
83
				str->data = CyString::Number(type) + " " + extradir;
83
				(*itr)->data = Utils::String::Number(type) + " " + extradir;
84
			else
84
			else
85
				str->data = CyString::Number(type);
85
				(*itr)->data = Utils::String::Number(type);
86
		}
86
		}
87
	}
87
	}
88
 
88
 
89
	Utils::String GetSizeString ( unsigned long lSize)
89
	Utils::String GetSizeString ( unsigned long lSize)
90
	{
90
	{
Line 201... Line 201...
201
 
201
 
202
		CFileIO File(dest + "/x2script.xsl");
202
		CFileIO File(dest + "/x2script.xsl");
203
		return File.writeFile(&list);
203
		return File.writeFile(&list);
204
	}
204
	}
205
 
205
 
206
	CyString ConvertTimeString(time_t time)
206
	Utils::String ConvertTimeString(time_t time)
207
	{
207
	{
208
		struct tm   *currDate;
208
		struct tm   *currDate;
209
		char    dateString[100];
209
		char    dateString[100];
210
 
210
 
211
		time_t n = time;
211
		time_t n = time;
212
		currDate = localtime(&n);
212
		currDate = localtime(&n);
213
		strftime(dateString, sizeof dateString, "(%d/%m/%Y) %H:%M", currDate);
213
		strftime(dateString, sizeof dateString, "(%d/%m/%Y) %H:%M", currDate);
214
 
214
 
215
		return CyString(dateString);
215
		return Utils::String(dateString);
216
	}
216
	}
217
 
217
 
218
	Utils::String FormatTextName(int id, int lang, bool newstyle)
218
	Utils::String FormatTextName(int id, int lang, bool newstyle)
219
	{
219
	{
220
		if ( newstyle )
220
		if ( newstyle )