Chameleon Applications

Chameleon Applications Commit Details

Date:2010-02-19 21:16:36 (14 years 2 months ago)
Author:DieBuche
Commit:121
Parents: 120
Message:Fixing softraid probs
Changes:
M/trunk/ChameleonPrefPane/Resources/cham.png
M/trunk/ChameleonPrefPane/Sources/ShellProcess.cpp
M/trunk/ChameleonPrefPane/Sources/string_util.h

File differences

trunk/ChameleonPrefPane/Sources/ShellProcess.cpp
151151
152152
153153
154
155
156
154157
155158
156159
157160
158
159161
160
162
163
161164
162165
163166
part = line[skipwhite]-'0';
partInfo.disk(disk);
partInfo.partition(part);
std::string diskLabel(trim_label(label));
strcpy(label, diskLabel.c_str());
partInfo.label(checkForRename(label, partInfo.toHdStr().c_str()));
std::replace(fsType, fsType+strlen(fsType), '_', ' ' );
partInfo.fsType(fsType);
std::string diskLabel(trim(label));
if (diskLabel=="" && partInfo.fsType()!="EFI" && partInfo.fsType()!="Apple partition map") {
if (diskLabel=="" && partInfo.fsType()!="EFI" && partInfo.fsType()!="Apple partition map" && partInfo.fsType()!="FDisk partition scheme" && partInfo.fsType()!="GUID partition scheme") {
diskLabel="Untitled";
}
bool found=false;
trunk/ChameleonPrefPane/Sources/string_util.h
2626
2727
2828
29
2930
3031
3132
33
34
35
36
37
38
39
40
3241
3342
3443
inline std::string trim_right(const std::string &source , const std::string& substr = " ")
{
std::string str = source;
return str.erase( str.find_last_not_of(substr) + 1);
}
inline std::string trim_label(const std::string &source )
{
std::string str = source;
std::string str2 = str.erase( str.find_last_not_of("*") + 1);
return str2.erase( str2.find_last_not_of(" ") + 1);
}
/**
* trim the space chars (or any substring) on the left of a string
*/

Archive Download the corresponding diff file

Revision: 121