~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/sdk/projectoptionsdlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3
3
 * http://www.gnu.org/licenses/lgpl-3.0.html
4
4
 *
5
 
 * $Revision: 4909 $
6
 
 * $Id: projectoptionsdlg.cpp 4909 2008-02-27 13:15:26Z mortenmacfly $
7
 
 * $HeadURL: svn://svn.berlios.de/codeblocks/tags/8.02/src/sdk/projectoptionsdlg.cpp $
 
5
 * $Revision: 6104 $
 
6
 * $Id: projectoptionsdlg.cpp 6104 2010-01-23 12:56:12Z mortenmacfly $
 
7
 * $HeadURL: svn+ssh://jenslody@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/sdk/projectoptionsdlg.cpp $
8
8
 */
9
9
 
10
10
#include "sdk_precomp.h"
51
51
#include "filefilters.h"
52
52
#include "virtualbuildtargetsdlg.h"
53
53
 
54
 
BEGIN_EVENT_TABLE(ProjectOptionsDlg, wxDialog)
 
54
BEGIN_EVENT_TABLE(ProjectOptionsDlg, wxScrollingDialog)
55
55
    EVT_UPDATE_UI( -1,                                 ProjectOptionsDlg::OnUpdateUI)
56
56
    EVT_BUTTON(    XRCID("wxID_OK"),                   ProjectOptionsDlg::OnOK)
57
57
    EVT_BUTTON(    XRCID("btnPlatform"),               ProjectOptionsDlg::OnPlatform)
68
68
    EVT_BUTTON(    XRCID("btnBrowseOutputFilename"),   ProjectOptionsDlg::OnBrowseOutputFilenameClick)
69
69
    EVT_BUTTON(    XRCID("btnBrowseWorkingDir"),       ProjectOptionsDlg::OnBrowseDirClick)
70
70
    EVT_BUTTON(    XRCID("btnBrowseObjectDir"),        ProjectOptionsDlg::OnBrowseDirClick)
 
71
    EVT_BUTTON(    XRCID("btnExecutionDir"),           ProjectOptionsDlg::OnBrowseDirClick)
71
72
    EVT_BUTTON(    XRCID("btnVirtualBuildTargets"),    ProjectOptionsDlg::OnVirtualTargets)
72
73
    EVT_BUTTON(    XRCID("btnExternalDeps"),           ProjectOptionsDlg::OnEditDepsClick)
73
74
    EVT_BUTTON(    XRCID("btnExportTarget"),           ProjectOptionsDlg::OnExportTargetClick)
91
92
    m_Current_Sel(-1),
92
93
    m_pCompiler(0L)
93
94
{
94
 
    wxXmlResource::Get()->LoadDialog(this, parent, _T("dlgProjectOptions"));
 
95
    wxXmlResource::Get()->LoadObject(this, parent, _T("dlgProjectOptions"),_T("wxScrollingDialog"));
95
96
 
96
97
    wxCheckListBox* list = XRCCTRL(*this, "lstFiles", wxCheckListBox);
97
98
    int count = m_Project->GetFilesCount();
110
111
    XRCCTRL(*this, "txtPlatformProj", wxTextCtrl)->SetValue(GetStringFromPlatforms(m_Project->GetPlatforms()));
111
112
    XRCCTRL(*this, "txtProjectMakefile", wxTextCtrl)->SetValue(m_Project->GetMakefile());
112
113
    XRCCTRL(*this, "chkCustomMakefile", wxCheckBox)->SetValue(m_Project->IsMakefileCustom());
 
114
    XRCCTRL(*this, "txtExecutionDir", wxTextCtrl)->SetValue(m_Project->GetMakefileExecutionDir());
113
115
    XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->SetSelection((int)m_Project->GetModeForPCH());
114
116
 
115
117
    Compiler* compiler = CompilerFactory::GetCompiler(project->GetCompilerID());
687
689
        targettext = XRCCTRL(*this, "txtWorkingDir", wxTextCtrl);
688
690
    else if (event.GetId() == XRCID("btnBrowseObjectDir"))
689
691
        targettext = XRCCTRL(*this, "txtObjectDir", wxTextCtrl);
 
692
    else if (event.GetId() == XRCID("btnExecutionDir"))
 
693
        targettext = XRCCTRL(*this, "txtExecutionDir", wxTextCtrl);
690
694
    else
691
695
        return;
692
696
 
716
720
                    fname.GetPath(),
717
721
                    fname.GetFullName(),
718
722
                    FileFilters::GetFilterAll(),
719
 
                    wxSAVE | wxOVERWRITE_PROMPT);
 
723
                    wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
720
724
 
721
725
    PlaceWindow(&dlg);
722
726
    if (dlg.ShowModal() != wxID_OK)
880
884
        fname.Assign(paths[i]);
881
885
        fname.MakeRelativeTo(m_Project->GetBasePath());
882
886
        ctrl->Append(fname.GetFullPath());
883
 
        ctrl->SetSelection(ctrl->GetCount());
 
887
        ctrl->SetSelection(ctrl->GetCount()-1);
884
888
 
885
889
        wxTreeCtrl* tc = XRCCTRL(*this, "tcOverview", wxTreeCtrl);
886
890
        wxTreeItemId sel = tc->GetSelection();
1021
1025
    XRCCTRL(*this, "btnToggleCheckmarks", wxButton)->Enable(!customMake && en);
1022
1026
    list->Enable(!customMake);
1023
1027
 
 
1028
    // enable some stuff if using a custom makefile
 
1029
    XRCCTRL(*this, "txtExecutionDir", wxTextCtrl)->Enable(customMake);
 
1030
    XRCCTRL(*this, "btnExecutionDir", wxButton)->Enable(customMake);
 
1031
 
1024
1032
    // scripts page
1025
1033
    wxTreeCtrl* tc = XRCCTRL(*this, "tcOverview", wxTreeCtrl);
1026
1034
    tc->Enable(!customMake);
1055
1063
        m_Project->RenameInTree(m_Project->GetTitle());
1056
1064
        m_Project->SetMakefile(XRCCTRL(*this, "txtProjectMakefile", wxTextCtrl)->GetValue());
1057
1065
        m_Project->SetMakefileCustom(XRCCTRL(*this, "chkCustomMakefile", wxCheckBox)->GetValue());
 
1066
        m_Project->SetMakefileExecutionDir(XRCCTRL(*this, "txtExecutionDir", wxTextCtrl)->GetValue());
1058
1067
        m_Project->SetTargetType(TargetType(XRCCTRL(*this, "cmbProjectType", wxComboBox)->GetSelection()));
1059
1068
        m_Project->SetModeForPCH((PCHMode)XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->GetSelection());
1060
1069
        m_Project->SetExtendedObjectNamesGeneration(XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox)->GetValue());
1083
1092
        }
1084
1093
    }
1085
1094
 
1086
 
    wxDialog::EndModal(retCode);
 
1095
    wxScrollingDialog::EndModal(retCode);
1087
1096
}
1088
1097