add a new stock reset/revert button

Change-Id: Ie854c063856eb8ed7401162ed60114d7cc904d26
This commit is contained in:
Caolán McNamara 2012-09-18 10:35:46 +01:00
parent dc4522d249
commit fca9bc70c0
5 changed files with 17 additions and 3 deletions

View File

@ -311,7 +311,8 @@ typedef sal_uInt16 StandardButtonType;
#define BUTTON_IGNORE ((StandardButtonType)8)
#define BUTTON_ABORT ((StandardButtonType)9)
#define BUTTON_LESS ((StandardButtonType)10)
#define BUTTON_COUNT 11
#define BUTTON_RESET ((StandardButtonType)11)
#define BUTTON_COUNT 12
// prominent place for ListBox window types

View File

@ -147,6 +147,7 @@
#define SV_BUTTONTEXT_IGNORE 10108
#define SV_BUTTONTEXT_ABORT 10109
#define SV_BUTTONTEXT_LESS 10110
#define SV_BUTTONTEXT_RESET 10111
#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE
#define SV_STDTEXT_SERVICENOTAVAILABLE 10200

View File

@ -139,7 +139,8 @@ XubString Button::GetStandardText( StandardButtonType eButton )
{ SV_BUTTONTEXT_MORE, "~More" },
{ SV_BUTTONTEXT_IGNORE, "~Ignore" },
{ SV_BUTTONTEXT_ABORT, "~Abort" },
{ SV_BUTTONTEXT_LESS, "~Less" }
{ SV_BUTTONTEXT_LESS, "~Less" },
{ SV_BUTTONTEXT_RESET, "R~eset" }
};
String aText;

View File

@ -76,3 +76,8 @@ String SV_BUTTONTEXT_ABORT
{
Text [ en-US ] = "~Abort";
};
String SV_BUTTONTEXT_RESET
{
Text [ en-US ] = "R~eset";
};

View File

@ -262,6 +262,12 @@ namespace
pBtn->SetText(VclResId(SV_BUTTONTEXT_CLOSE).toString());
pWindow = pBtn;
}
else if (sType.equalsL(RTL_CONSTASCII_STRINGPARAM("gtk-revert-to-saved")))
{
PushButton *pBtn = new PushButton(pParent, nBits);
pBtn->SetText(VclResId(SV_BUTTONTEXT_RESET).toString());
pWindow = pBtn;
}
else
fprintf(stderr, "unknown stock type %s\n", sType.getStr());
}