Substituted the few remaining uses of long instead of time_t

This commit is contained in:
Lorenzo Marcantonio 2012-09-05 14:13:33 +02:00
parent 61c3339d09
commit 7d154606be
9 changed files with 21 additions and 21 deletions

View File

@ -91,7 +91,6 @@ class CMP_LIBRARY
{
int type; ///< Library type indicator.
wxFileName fileName; ///< Library file name.
// ZZZ why this a wxDateTime where others are time_t?
wxDateTime timeStamp; ///< Library save time and date.
int versionMajor; ///< Library major version number.
int versionMinor; ///< Library minor version number.

View File

@ -102,7 +102,7 @@ public:
double m_Surface; // Bounding box area
time_t m_Link; // Temporary logical link used in edition
long m_LastEdit_Time;
time_t m_LastEdit_Time;
wxString m_Path;
wxString m_Doc; // Module Description (info for users)
@ -223,8 +223,9 @@ public:
m_ModuleStatus &= ~MODULE_is_PLACED;
}
void SetLastEditTime( long aTime ) { m_LastEdit_Time = aTime; }
long GetLastEditTime() const { return m_LastEdit_Time; }
void SetLastEditTime( time_t aTime ) { m_LastEdit_Time = aTime; }
void SetLastEditTime( ) { m_LastEdit_Time = time( NULL ); }
time_t GetLastEditTime() const { return m_LastEdit_Time; }
/**
* Function Read_GPCB_Descr

View File

@ -215,7 +215,7 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
m_parent->OnModify();
if( m_module )
m_module->m_LastEdit_Time = time( NULL );
m_module->SetLastEditTime();
EndModal(1);
}

View File

@ -206,7 +206,7 @@ void DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event )
}
m_parent->SaveCopyInUndoList( m_module, UR_MODEDIT );
m_module->m_LastEdit_Time = time( NULL );
m_module->SetLastEditTime();
wxString msg;

View File

@ -748,7 +748,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
MODULE* module = m_CurrentPad->GetParent();
m_Parent->SaveCopyInUndoList( module, UR_CHANGED );
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
// redraw the area where the pad was, without pad (delete pad on screen)
m_CurrentPad->SetFlags( DO_NOT_DRAW );

View File

@ -184,7 +184,7 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Width( EDGE_MODULE* aEdge )
OnModify();
module->CalculateBoundingBox();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
}
@ -232,7 +232,7 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* aEdge )
OnModify();
module->CalculateBoundingBox();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
}
@ -274,7 +274,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Edge_Module( EDGE_MODULE* aEdge )
// Delete segment.
aEdge->DeleteStructure();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
module->CalculateBoundingBox();
OnModify();
}
@ -399,7 +399,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* aEdge,
aEdge->SetEnd0( aEdge->GetStart0() );
module->CalculateBoundingBox();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
OnModify();
}
}
@ -427,7 +427,7 @@ void FOOTPRINT_EDIT_FRAME::End_Edge_Module( EDGE_MODULE* aEdge )
}
module->CalculateBoundingBox();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
OnModify();
m_canvas->SetMouseCapture( NULL, NULL );
}

View File

@ -124,7 +124,7 @@ void PCB_BASE_FRAME::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
Text->DisplayInfo( this );
if( module )
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
OnModify();
}
@ -147,7 +147,7 @@ void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* Text )
m_canvas->RefreshDrawingRect( Text->GetBoundingBox() );
Text->DeleteStructure();
OnModify();
Module->m_LastEdit_Time = time( NULL );
Module->SetLastEditTime();
}
}
@ -253,7 +253,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
Text->SetPos0( textRelPos );
Text->ClearFlags();
Module->ClearFlags();
Module->m_LastEdit_Time = time( NULL );
Module->SetLastEditTime();
OnModify();
/* Redraw text. */

View File

@ -477,7 +477,7 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName )
// Update parameters: position, timestamp ...
newpos = GetScreen()->GetCrossHairPosition();
Module->SetPosition( newpos );
Module->m_LastEdit_Time = time( NULL );
Module->SetLastEditTime();
// Update its name in lib
Module->m_LibRef = moduleName;

View File

@ -187,7 +187,7 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
if( aDraw )
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
aPad->GetParent()->m_LastEdit_Time = time( NULL );
aPad->GetParent()->SetLastEditTime();
}
@ -199,7 +199,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw )
wxString lastPadName = GetDesignSettings().m_Pad_Master.GetPadName();
m_Pcb->m_Status_Pcb = 0;
aModule->m_LastEdit_Time = time( NULL );
aModule->SetLastEditTime();
D_PAD* pad = new D_PAD( aModule );
@ -260,7 +260,7 @@ void PCB_BASE_FRAME::DeletePad( D_PAD* aPad, bool aQuery )
return;
module = (MODULE*) aPad->GetParent();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
if( aQuery )
{
@ -389,7 +389,7 @@ void PCB_BASE_FRAME::PlacePad( D_PAD* aPad, wxDC* DC )
aPad->Draw( m_canvas, DC, GR_OR );
module->CalculateBoundingBox();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
EraseDragList();
@ -407,7 +407,7 @@ void PCB_BASE_FRAME::RotatePad( D_PAD* aPad, wxDC* DC )
MODULE* module = aPad->GetParent();
module->m_LastEdit_Time = time( NULL );
module->SetLastEditTime();
OnModify();