~quadrispro/codelite/trunk

1482 by eranif
- Repository clean up
1
//////////////////////////////////////////////////////////////////////////////
2
//////////////////////////////////////////////////////////////////////////////
3
//
4
// copyright            : (C) 2008 by Eran Ifrah                            
5
// file name            : editcmpfileinfodlg.cpp              
6
//                                                                          
7
// -------------------------------------------------------------------------
8
// A                                                                        
9
//              _____           _      _     _ _                            
10
//             /  __ \         | |    | |   (_) |                           
11
//             | /  \/ ___   __| | ___| |    _| |_ ___                      
12
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )                     
13
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/                     
14
//              \____/\___/ \__,_|\___\_____/_|\__\___|                     
15
//                                                                          
16
//                                                  F i l e                 
17
//                                                                          
18
//    This program is free software; you can redistribute it and/or modify  
19
//    it under the terms of the GNU General Public License as published by  
20
//    the Free Software Foundation; either version 2 of the License, or     
21
//    (at your option) any later version.                                   
22
//                                                                          
23
//////////////////////////////////////////////////////////////////////////////
24
//////////////////////////////////////////////////////////////////////////////
25
1267 by eranif
- Fixed: FR#[ 1969595 ] Dialogs should retain their positions and size
26
#include "windowattrmanager.h"
1160 by eranif
- Improved the build system settings: user can now define the build pattern per file extension, from Settings -> Build Settings -> File Types tab, this is per compiler
27
#include "macrosdlg.h"
28
#include "editcmpfileinfodlg.h"
29
30
EditCmpFileInfo::EditCmpFileInfo( wxWindow* parent)
31
		: EditCmpFileInfoBase( parent )
32
{
1267 by eranif
- Fixed: FR#[ 1969595 ] Dialogs should retain their positions and size
33
	WindowAttrManager::Load(this, wxT("EditCmpFileInfo"), NULL);
1160 by eranif
- Improved the build system settings: user can now define the build pattern per file extension, from Settings -> Build Settings -> File Types tab, this is per compiler
34
}
35
36
void EditCmpFileInfo::OnFileTypeText( wxCommandEvent& event )
37
{
38
	event.Skip();
39
}
40
41
void EditCmpFileInfo::OnCompilationLine( wxCommandEvent& event )
42
{
43
	event.Skip();
44
}
45
46
void EditCmpFileInfo::OnButtonOk( wxCommandEvent& event )
47
{
48
	wxUnusedVar(event);
49
	EndModal(wxID_OK);
50
}
51
52
void EditCmpFileInfo::OnButtonOkUI( wxUpdateUIEvent& event )
53
{
54
	event.Enable(!m_textCtrl2->IsEmpty() && !m_textCtrlFileType->IsEmpty());
55
}
56
57
void EditCmpFileInfo::OnButtonCancel( wxCommandEvent& event )
58
{
59
	wxUnusedVar(event);
60
	EndModal(wxID_CANCEL);
61
}
62
63
void EditCmpFileInfo::SetCompilationLine(const wxString& s)
64
{
65
	m_textCtrl2->SetValue(s);
66
}
67
68
void EditCmpFileInfo::SetExtension(const wxString& s)
69
{
70
	m_textCtrlFileType->SetValue(s);
71
}
72
73
void EditCmpFileInfo::SetKind(const wxString& s)
74
{
75
	int where = m_choiceFileTypeIs->FindString(s);
76
	if (where != wxNOT_FOUND) {
77
		m_choiceFileTypeIs->Select(where);
78
	}
79
}
80
81
void EditCmpFileInfo::OnButtonHelp(wxCommandEvent& event)
82
{
83
	wxUnusedVar(event);
84
	MacrosDlg dlg(this, MacrosDlg::MacrosCompiler);
85
	dlg.ShowModal();
86
}
1267 by eranif
- Fixed: FR#[ 1969595 ] Dialogs should retain their positions and size
87
88
EditCmpFileInfo::~EditCmpFileInfo()
89
{
90
	WindowAttrManager::Save(this, wxT("EditCmpFileInfo"), NULL);
91
}