m_x = x + pizza->xoffset;
m_y = y + pizza->yoffset;
}
- if (width != -1) m_width = width;
- if (height != -1) m_height = height;
- if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH)
+ // calculate the best size if we should auto size the window
+ if ( (sizeFlags & wxSIZE_AUTO_WIDTH) ||
+ (sizeFlags & wxSIZE_AUTO_HEIGHT) )
{
- if (width == -1) m_width = 80;
+ const wxSize sizeBest = GetBestSize();
+ if ( sizeFlags & wxSIZE_AUTO_WIDTH )
+ width = sizeBest.x;
+ if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
+ height = sizeBest.y;
}
- if ((sizeFlags & wxSIZE_AUTO_HEIGHT) == wxSIZE_AUTO_HEIGHT)
- {
- if (height == -1) m_height = 26;
- }
+ if (width != -1)
+ m_width = width;
+ if (height != -1)
+ m_height = height;
int minWidth = GetMinWidth(),
minHeight = GetMinHeight(),
void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
{
- gtk_tooltips_set_tip( tips, GetConnectWidget(), wxConvCurrent->cWX2MB(tip), (gchar*) NULL );
+ wxString tmp( tip );
+ gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL );
}
#endif // wxUSE_TOOLTIPS