-1->wxID_ANY, TRUE->true, FALSE->false, wxDefaultPosition & wxDefaultSize replacements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -252,7 +252,7 @@ void DoodleSegment::Draw(wxDC *dc)
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg):
 | 
			
		||||
wxCommand(TRUE, name)
 | 
			
		||||
wxCommand(true, name)
 | 
			
		||||
{
 | 
			
		||||
    doc = ddoc;
 | 
			
		||||
    segment = seg;
 | 
			
		||||
@@ -281,7 +281,7 @@ bool DrawingCommand::Do(void)
 | 
			
		||||
                segment = (DoodleSegment *)node->GetData();
 | 
			
		||||
                doc->GetDoodleSegments().Erase(node);
 | 
			
		||||
                
 | 
			
		||||
                doc->Modify(TRUE);
 | 
			
		||||
                doc->Modify(true);
 | 
			
		||||
                doc->UpdateAllViews();
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
@@ -289,12 +289,12 @@ bool DrawingCommand::Do(void)
 | 
			
		||||
    case DOODLE_ADD:
 | 
			
		||||
        {
 | 
			
		||||
            doc->GetDoodleSegments().Append(new DoodleSegment(*segment));
 | 
			
		||||
            doc->Modify(TRUE);
 | 
			
		||||
            doc->Modify(true);
 | 
			
		||||
            doc->UpdateAllViews();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return TRUE;
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool DrawingCommand::Undo(void)
 | 
			
		||||
@@ -307,11 +307,11 @@ bool DrawingCommand::Undo(void)
 | 
			
		||||
            if (segment)
 | 
			
		||||
            {
 | 
			
		||||
                doc->GetDoodleSegments().Append(segment);
 | 
			
		||||
                doc->Modify(TRUE);
 | 
			
		||||
                doc->Modify(true);
 | 
			
		||||
                doc->UpdateAllViews();
 | 
			
		||||
                segment = (DoodleSegment *) NULL;
 | 
			
		||||
            }
 | 
			
		||||
            doc->Modify(TRUE);
 | 
			
		||||
            doc->Modify(true);
 | 
			
		||||
            doc->UpdateAllViews();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -325,12 +325,12 @@ bool DrawingCommand::Undo(void)
 | 
			
		||||
                delete seg;
 | 
			
		||||
                doc->GetDoodleSegments().Erase(node);
 | 
			
		||||
                
 | 
			
		||||
                doc->Modify(TRUE);
 | 
			
		||||
                doc->Modify(true);
 | 
			
		||||
                doc->UpdateAllViews();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return TRUE;
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument)
 | 
			
		||||
@@ -342,25 +342,25 @@ bool TextEditDocument::OnSaveDocument(const wxString& filename)
 | 
			
		||||
    TextEditView *view = (TextEditView *)GetFirstView();
 | 
			
		||||
    
 | 
			
		||||
    if (!view->textsw->SaveFile(filename))
 | 
			
		||||
        return FALSE;
 | 
			
		||||
    Modify(FALSE);
 | 
			
		||||
        return false;
 | 
			
		||||
    Modify(false);
 | 
			
		||||
#ifdef __WXMAC__
 | 
			
		||||
    wxFileName fn(filename) ;
 | 
			
		||||
    fn.MacSetDefaultTypeAndCreator() ;
 | 
			
		||||
#endif
 | 
			
		||||
    return TRUE;
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TextEditDocument::OnOpenDocument(const wxString& filename)
 | 
			
		||||
{
 | 
			
		||||
    TextEditView *view = (TextEditView *)GetFirstView();
 | 
			
		||||
    if (!view->textsw->LoadFile(filename))
 | 
			
		||||
        return FALSE;
 | 
			
		||||
        return false;
 | 
			
		||||
    
 | 
			
		||||
    SetFilename(filename, TRUE);
 | 
			
		||||
    Modify(FALSE);
 | 
			
		||||
    SetFilename(filename, true);
 | 
			
		||||
    Modify(false);
 | 
			
		||||
    UpdateAllViews();
 | 
			
		||||
    return TRUE;
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TextEditDocument::IsModified(void) const
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user