28 #include <nsAutoPtr.h>
30 #include <sbIPropertyArray.h>
31 #include <sbIPropertyManager.h>
32 #include <nsIStringBundle.h>
42 NS_ENSURE_ARG_POINTER(_retval);
43 NS_ENSURE_STATE(!mPropertyID.IsEmpty());
46 nsresult rv = GetFinalDisplayName(displayName);
47 NS_ENSURE_SUCCESS(rv, rv);
50 if (!mLabelKey.IsEmpty()) {
51 rv = GetStringFromName(mBundle, mLabelKey, label);
52 NS_ENSURE_SUCCESS(rv, rv);
58 nsString completedLabel;
59 if (!mCompletedLabelKey.IsEmpty()) {
60 rv = GetStringFromName(mBundle, mCompletedLabelKey, completedLabel);
61 NS_ENSURE_SUCCESS(rv, rv);
64 completedLabel = mCompletedLabel;
68 if (!mFailedLabelKey.IsEmpty()) {
69 rv = GetStringFromName(mBundle, mFailedLabelKey, failedLabel);
70 NS_ENSURE_SUCCESS(rv, rv);
73 failedLabel = mFailedLabel;
76 nsRefPtr<sbStatusPropertyInfo> pi =
87 NS_ENSURE_TRUE(pi, NS_ERROR_OUT_OF_MEMORY);
90 NS_ENSURE_SUCCESS(rv, rv);
92 NS_ADDREF(*_retval = pi);
97 sbStatusPropertyBuilder::GetLabel(nsAString& aLabel)
103 sbStatusPropertyBuilder::SetLabel(
const nsAString& aLabel)
110 sbStatusPropertyBuilder::GetCompletedLabel(nsAString& aCompletedLabel)
112 aCompletedLabel = mCompletedLabel;
116 sbStatusPropertyBuilder::SetCompletedLabel(
const nsAString& aCompletedLabel)
118 mCompletedLabel = aCompletedLabel;
123 sbStatusPropertyBuilder::GetFailedLabel(nsAString& aFailedLabel)
125 aFailedLabel = mFailedLabel;
129 sbStatusPropertyBuilder::SetFailedLabel(
const nsAString& aFailedLabel)
131 mFailedLabel = aFailedLabel;
136 sbStatusPropertyBuilder::GetLabelKey(nsAString& aLabelKey)
138 aLabelKey = mLabelKey;
142 sbStatusPropertyBuilder::SetLabelKey(
const nsAString& aLabelKey)
144 mLabelKey = aLabelKey;
149 sbStatusPropertyBuilder::GetCompletedLabelKey(nsAString& aCompletedLabelKey)
151 aCompletedLabelKey = mCompletedLabelKey;
155 sbStatusPropertyBuilder::SetCompletedLabelKey(
const nsAString& aCompletedLabelKey)
157 mCompletedLabelKey = aCompletedLabelKey;
162 sbStatusPropertyBuilder::GetFailedLabelKey(nsAString& aFailedLabelKey)
164 aFailedLabelKey = mFailedLabelKey;
168 sbStatusPropertyBuilder::SetFailedLabelKey(
const nsAString& aFailedLabelKey)
170 mFailedLabelKey = aFailedLabelKey;
this _contentSandbox label
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...
NS_IMPL_ISUPPORTS_INHERITED2(sbStatusPropertyBuilder, sbAbstractPropertyBuilder, sbISimpleButtonPropertyBuilder, sbIStatusPropertyBuilder) NS_IMETHODIMP sbStatusPropertyBuilder