wxIconBundle implementation.
wxTLW::SetIcons() properly implemented for wxMotif, wxGTK, wxMSW, wxX11, wxUniversal Placeholders that just call SetIcon for wxOS2 and wxMac. Regenerated makefiles. Added hardwired wxSYS_ICON_X/Y = 32 for wxGTK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
|
||||
#include "wx/unix/utilsx11.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// idle system
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -814,13 +816,9 @@ void wxTopLevelWindowGTK::SetTitle( const wxString &title )
|
||||
gtk_window_set_title( GTK_WINDOW(m_widget), title.mbc_str() );
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::SetIcon( const wxIcon &icon )
|
||||
void wxTopLevelWindowGTK::DoSetIcon( const wxIcon &icon )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
|
||||
wxTopLevelWindowBase::SetIcon(icon);
|
||||
|
||||
if ( !m_icon.Ok() )
|
||||
if ( !icon.Ok() )
|
||||
return;
|
||||
|
||||
if (!m_widget->window)
|
||||
@@ -833,6 +831,24 @@ void wxTopLevelWindowGTK::SetIcon( const wxIcon &icon )
|
||||
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::SetIcon( const wxIcon &icon )
|
||||
{
|
||||
SetIcons( wxIconBundle( icon ) );
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
GdkWindow* window = m_widget->window;
|
||||
wxCHECK_RET( window, _T("window not created yet - can't set icon") );
|
||||
|
||||
wxTopLevelWindowBase::SetIcons( icons );
|
||||
|
||||
DoSetIcon( icons.GetIcon( -1 ) );
|
||||
wxSetIconsX11( (WXDisplay*)GDK_WINDOW_XDISPLAY( window ),
|
||||
(WXWindow)GDK_WINDOW_XWINDOW( window ), icons );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// frame state: maximized/iconized/normal
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user