30 #include <nsAutoPtr.h>
32 #include <sbIPropertyArray.h>
33 #include <sbIPropertyManager.h>
34 #include <nsIStringBundle.h>
43 NS_ENSURE_ARG_POINTER(_retval);
44 NS_ENSURE_STATE(!mPropertyID.IsEmpty());
47 nsresult rv = GetFinalDisplayName(displayName);
48 NS_ENSURE_SUCCESS(rv, rv);
50 PRBool hasLabel = PR_FALSE;
52 if (!mLabelKey.IsEmpty()) {
53 rv = GetStringFromName(mBundle, mLabelKey, label);
54 NS_ENSURE_SUCCESS(rv, rv);
58 if (!mLabel.IsEmpty()) {
64 nsRefPtr<sbSimpleButtonPropertyInfo> pi =
74 NS_ENSURE_TRUE(pi, NS_ERROR_OUT_OF_MEMORY);
77 NS_ENSURE_SUCCESS(rv, rv);
79 NS_ADDREF(*_retval = pi);
84 sbSimpleButtonPropertyBuilder::GetLabel(nsAString& aLabel)
90 sbSimpleButtonPropertyBuilder::SetLabel(
const nsAString& aLabel)
97 sbSimpleButtonPropertyBuilder::GetLabelKey(nsAString& aLabelKey)
99 aLabelKey = mLabelKey;
103 sbSimpleButtonPropertyBuilder::SetLabelKey(
const nsAString& aLabelKey)
105 mLabelKey = aLabelKey;
this _contentSandbox label
An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (...