I don't contest death.crafter's solution is a good one, however it definitely has a few disadvantages.
First it introduces new String measures ([mDrive1String], but further such measures will have to be added, probably). It can be done even with no such additional measures.
Secondly I'd recommend to modify the already existing String meter(s), to get them using the drive label when needed and not use them when it's not needed.
Thirdly, death.crafter's solution sets the appropriate form of the returned info only for the first item of the list, the topmost. But there are further elements in this list (totally 7), from which, excluding the first which is properly set, the others still should show the label of the appropriate drive as well. But this is not happening, because:
- The [mDrive2Label], [mDrive3Label] (and so on) measures are not even added to the code, so I suggest you to add them. They should have similar form as the [mDrive1Label] measure.
- The MeasureName2 options are not added to the [Index2Info], [Index3Info] (and so on) meters.
Accordingly to the above, when applying the Text="%1 %2" option set into the [InfoStyle] section of the @Resources\MeterStyles.inc file, you get a %2 element on all lines of the skin, starting from line 2.
And one more: the mPathBool variable, set into the IfMatchAction and IfNotMatchAction options of the [mPath] measure seems useless: it is never used, so I'm not sure why has it been set.
To fix all the above things, I'd start from the original code, would modify the code of the [mPath] measure in the following way and would add the following measures to the
@Resources\FileView.inc file:
Code: Select all
[mPath]
Measure=Plugin
Plugin=FileView
Path=""
Substitute="":"This PC"
Count=7
ShowDotDot=0
ShowHidden=1
SortType=Type
IfMatch="This PC"
IfMatchAction=[!SetOptionGroup Popup Text "%1 %2"][!UpdateMeterGroup "Popup"][!Redraw]
IfNotMatchAction=[!SetOptionGroup Popup Text "%1"][!UpdateMeterGroup "Popup"][!Redraw]
OnChangeAction=[!UpdateMeasure MeasureBackHeight]
FinishAction=[!Update]
[mDrive2Label]
Measure=FreeDiskSpace
Drive=D:
Label=1
[mDrive3Label]
Measure=FreeDiskSpace
Drive=E:
Label=1
DynamicVariables=1
[mDrive4Label]
Measure=FreeDiskSpace
Drive=F:
Label=1
[mDrive5Label]
Measure=FreeDiskSpace
Drive=G:
Label=1
[mDrive6Label]
Measure=FreeDiskSpace
Drive=H:
Label=1
[mDrive7Label]
Measure=FreeDiskSpace
Drive=I:
Label=1
Also add the following options to the [Index2Info] - [Index7Info] meters of the
@Resources\FileMeters.inc file:
Code: Select all
[Index2Info]
...
MeasureName2=mDrive2Label
...
[Index3Info]
...
MeasureName2=mDrive3Label
...
[Index4Info]
...
MeasureName2=mDrive4Label
...
[Index5Info]
...
MeasureName2=mDrive5Label
...
[Index6Info]
...
MeasureName2=mDrive6Label
...
[Index7Info]
...
MeasureName2=mDrive7Label
...