- Generate menu highlight events for popup menus in wxDialog (Sam Partington).
- Return more native shell icons from wxArtProvider (Markus Juergens).
- Fix filter checks in wxDir::FindFirst/Next() (Catalin Raceanu).
+- Add support for wxICON_AUTH_NEEDED to wxMessageDialog (Chris Spencer).
wxOSX/Cocoa:
#define wxMORE 0x00010000
#define wxSETUP 0x00020000
#define wxICON_NONE 0x00040000
+#define wxICON_AUTH_NEEDED 0x00080000
#define wxICON_MASK \
- (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE)
+ (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE|wxICON_AUTH_NEEDED)
/*
* Background styles. See wxWindow::SetBackgroundStyle
{ return m_help.empty() ? GetDefaultHelpLabel() : m_help; }
// based on message dialog style, returns exactly one of: wxICON_NONE,
- // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION
- long GetEffectiveIcon() const
+ // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION,
+ // wxICON_AUTH_NEEDED
+ virtual long GetEffectiveIcon() const
{
if ( m_dialogStyle & wxICON_NONE )
return wxICON_NONE;
virtual int ShowModal();
+ virtual long GetEffectiveIcon() const;
+
// implementation-specific
// return the font used for the text in the message box
Displays an information symbol. This icon is used by default if
@c wxYES_NO is not given so it is usually unnecessary to specify it
explicitly.
+ @style{wxICON_AUTH_NEEDED}
+ Displays an authentication needed symbol. This style is only supported
+ for message dialogs under wxMSW when a task dialog is used to implement
+ them (i.e. when running under Windows Vista or later). In other cases
+ the default icon selection logic will be used. Note this can be
+ combined with other styles to provide a fallback. For instance, using
+ wxICON_AUTH_NEEDED | wxICON_QUESTION will show a shield symbol on
+ Windows Vista or above and a question symbol on other platforms.
+ @since 2.9.5
@style{wxSTAY_ON_TOP}
Makes the message box stay on top of all other windows and not only
just its parent (currently implemented only under MSW and GTK).
"&Information icon",
"&Question icon",
"&Warning icon",
- "&Error icon"
+ "&Error icon",
+ "A&uth needed icon"
};
wxCOMPILE_TIME_ASSERT( WXSIZEOF(icons) == MsgDlgIcon_Max, IconMismatch );
case MsgDlgIcon_Error:
style |= wxICON_ERROR;
break;
+
+ case MsgDlgIcon_AuthNeeded:
+ style |= wxICON_AUTH_NEEDED;
+ break;
}
if ( m_chkCentre->IsChecked() )
MsgDlgIcon_Question,
MsgDlgIcon_Warning,
MsgDlgIcon_Error,
+ MsgDlgIcon_AuthNeeded,
MsgDlgIcon_Max
};
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
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