Fixed two small things in wxListCtrl

Removed SetSizeHint from wxDialog (recompile)
  Removed dialog modal flag
  Code clean up here and there


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-09-05 18:26:06 +00:00
parent 42871d3819
commit e1e955e14c
17 changed files with 408 additions and 380 deletions

View File

@@ -22,7 +22,8 @@
extern wxList wxPendingDelete;
//-----------------------------------------------------------------------------
// delete
// "delete_event"
//-----------------------------------------------------------------------------
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
{
@@ -207,7 +208,7 @@ void wxDialog::Centre( int direction )
bool wxDialog::Show( bool show )
{
if (!show && IsModal() && m_modalShowing)
if (!show && IsModal())
{
EndModal( wxID_CANCEL );
}
@@ -219,19 +220,25 @@ bool wxDialog::Show( bool show )
return TRUE;
}
void wxDialog::SetModal(bool flag)
bool wxDialog::IsModal(void) const
{
return m_modalShowing;
}
void wxDialog::SetModal( bool WXUNUSED(flag) )
{
/*
if (flag)
m_windowStyle |= wxDIALOG_MODAL;
else
if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL;
*/
wxFAIL_MSG( "wxDialog:SetModal obsolete now" );
}
int wxDialog::ShowModal(void)
{
SetModal(TRUE);
if (m_modalShowing)
if (IsModal())
{
wxFAIL_MSG( "wxDialog:ShowModal called twice" );
return GetReturnCode();
@@ -252,7 +259,7 @@ void wxDialog::EndModal( int retCode )
{
SetReturnCode( retCode );
if (!m_modalShowing)
if (!IsModal())
{
wxFAIL_MSG( "wxDialog:EndModal called twice" );
return;
@@ -270,12 +277,6 @@ void wxDialog::InitDialog(void)
wxWindow::InitDialog();
}
void wxDialog::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) )
{
gdk_window_set_hints( m_widget->window, -1, -1,
minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE );
}
void wxDialog::SetIcon( const wxIcon &icon )
{
m_icon = icon;