27 #ifndef __SBDOWNLOADBUTTONPROPERTYINFO_H__
28 #define __SBDOWNLOADBUTTONPROPERTYINFO_H__
32 #include <sbIPropertyManager.h>
33 #include <sbITreeViewPropertyInfo.h>
34 #include <sbIClickablePropertyInfo.h>
39 #include <nsStringGlue.h>
49 NS_DECL_ISUPPORTS_INHERITED
50 NS_DECL_SBICLICKABLEPROPERTYINFO
51 NS_DECL_SBITREEVIEWPROPERTYINFO
54 const nsAString& aDisplayName,
55 const nsAString& aLocalizationKey,
56 const nsAString& aLabel,
57 const nsAString& aRetryLabel,
58 const PRBool aRemoteReadable,
59 const PRBool aRemoteWritable,
60 const PRBool aUserViewable,
61 const PRBool aUserEditable);
64 NS_IMETHOD
Format(
const nsAString&
aValue, nsAString& _retval);
72 PRBool mSuppressSelect;
94 mIsTotalSet(PR_FALSE),
95 mIsCurrentSet(PR_FALSE)
97 mFirstPipe = aValue.FindChar(
'|');
98 mSecondPipe = aValue.FindChar(
'|', mFirstPipe + 1);
100 if (mFirstPipe >= 1 && mSecondPipe >= 2) {
104 mValue.SetIsVoid(PR_TRUE);
105 mIsModeSet = PR_TRUE;
106 mIsTotalSet = PR_TRUE;
107 mIsCurrentSet = PR_TRUE;
115 PRInt32 mode = Substring(mValue, 0, mFirstPipe).ToInteger(&rv);
116 if (NS_SUCCEEDED(rv) && mode >=
eNone && mode <=
eFailed) {
119 mIsModeSet = PR_TRUE;
128 mIsModeSet = PR_TRUE;
136 Substring(mValue, mFirstPipe + 1, mSecondPipe - mFirstPipe).ToInteger(&rv);
137 if (NS_SUCCEEDED(rv) && total >= 0) {
140 mIsTotalSet = PR_TRUE;
148 mIsTotalSet = PR_TRUE;
154 if (!mIsCurrentSet) {
156 PRInt32 current = Substring(mValue, mSecondPipe + 1).ToInteger(&rv);
157 if (NS_SUCCEEDED(rv) && current >= 0) {
160 mIsCurrentSet = PR_TRUE;
168 mIsCurrentSet = PR_TRUE;
177 aValue.AppendLiteral(
"|");
179 aValue.AppendLiteral(
"|");
196 PRPackedBool mIsDirty;
197 PRPackedBool mIsModeSet;
198 PRPackedBool mIsTotalSet;
199 PRPackedBool mIsCurrentSet;
The property information specific to clickable properties.