Add support for wxICON_AUTH_NEEDED to wxMessageDialog.
Allow showing the standard "Authentication needed" dialog in the message boxes under MSW. Closes #15121. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -629,6 +629,18 @@ int wxMessageDialog::ShowModal()
|
||||
return ShowMessageBox();
|
||||
}
|
||||
|
||||
long wxMessageDialog::GetEffectiveIcon() const
|
||||
{
|
||||
// only use the auth needed icon if available, otherwise fallback to the default logic
|
||||
if ( (m_dialogStyle & wxICON_AUTH_NEEDED) &&
|
||||
wxMSWMessageDialog::HasNativeTaskDialog() )
|
||||
{
|
||||
return wxICON_AUTH_NEEDED;
|
||||
}
|
||||
|
||||
return wxMessageDialogBase::GetEffectiveIcon();
|
||||
}
|
||||
|
||||
void wxMessageDialog::DoCentre(int dir)
|
||||
{
|
||||
#ifdef wxHAS_MSW_TASKDIALOG
|
||||
@@ -738,6 +750,10 @@ void wxMSWTaskDialogConfig::MSWCommonTaskDialogInit(TASKDIALOGCONFIG &tdc)
|
||||
case wxICON_INFORMATION:
|
||||
tdc.pszMainIcon = TD_INFORMATION_ICON;
|
||||
break;
|
||||
|
||||
case wxICON_AUTH_NEEDED:
|
||||
tdc.pszMainIcon = TD_SHIELD_ICON;
|
||||
break;
|
||||
}
|
||||
|
||||
// custom label button array that can hold all buttons in use
|
||||
|
Reference in New Issue
Block a user