Added missing wxGetFullHostName() and wxNO_DEFAULT for generic msgdialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -905,11 +905,12 @@ typedef enum
|
||||
#define wxCANCEL 0x0004
|
||||
#define wxYES 0x0008
|
||||
#define wxNO 0x0010
|
||||
|
||||
#define wxICON_EXCLAMATION 0x0020
|
||||
#define wxICON_HAND 0x0040
|
||||
#define wxICON_QUESTION 0x0080
|
||||
#define wxICON_INFORMATION 0x0100
|
||||
#define wxNO_DEFAULT 0x0020
|
||||
#define wxYES_DEFAULT 0x0000 // has no effect
|
||||
#define wxICON_EXCLAMATION 0x0040
|
||||
#define wxICON_HAND 0x0080
|
||||
#define wxICON_QUESTION 0x0100
|
||||
#define wxICON_INFORMATION 0x0200
|
||||
|
||||
#define wxICON_STOP wxICON_HAND
|
||||
#define wxICON_ASTERISK wxICON_INFORMATION
|
||||
|
@@ -196,6 +196,7 @@ WXDLLEXPORT wxString wxGetHostName();
|
||||
|
||||
// Get FQDN
|
||||
WXDLLEXPORT wxString wxGetFullHostName();
|
||||
WXDLLEXPORT bool wxGetFullHostName(wxChar *buf, int maxSize);
|
||||
|
||||
// Get user ID e.g. jacs (this is known as login name under Unix)
|
||||
WXDLLEXPORT bool wxGetUserId(wxChar *buf, int maxSize);
|
||||
|
@@ -208,6 +208,7 @@ wxLayoutWindow::Clear(int family,
|
||||
{
|
||||
GetLayoutList()->Clear(family,size,style,weight,underline,fg,bg);
|
||||
SetBackgroundColour(GetLayoutList()->GetDefaultStyleInfo().GetBGColour());
|
||||
wxScrolledWindow::Clear();
|
||||
ResizeScrollbars(true);
|
||||
SetDirty();
|
||||
SetModified(false);
|
||||
|
@@ -901,3 +901,18 @@ wxString wxGetHostName()
|
||||
return buf;
|
||||
}
|
||||
|
||||
wxString wxGetFullHostName()
|
||||
{
|
||||
static const size_t hostnameSize = 257;
|
||||
|
||||
wxString buf;
|
||||
bool ok = wxGetFullHostName(buf.GetWriteBuf(hostnameSize), hostnameSize);
|
||||
|
||||
buf.UngetWriteBuf();
|
||||
|
||||
if ( !ok )
|
||||
buf.Empty();
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@@ -131,8 +131,16 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString
|
||||
}
|
||||
else if (yes)
|
||||
{
|
||||
yes->SetDefault();
|
||||
yes->SetFocus();
|
||||
if(style & wxNO_DEFAULT)
|
||||
{
|
||||
no->SetDefault();
|
||||
no->SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
yes->SetDefault();
|
||||
yes->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
int w = m_buttons.GetCount() * 100;
|
||||
|
Reference in New Issue
Block a user