~ubuntu-branches/ubuntu/karmic/codelite/karmic

« back to all changes in this revision

Viewing changes to LiteEditor/project_settings_dlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-08-15 17:42:43 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090815174243-nlb9ikgigbiybz12
Tags: 1.0.2893+dfsg-0ubuntu1
* debian/rules:
  + Tidy up get-orig-source rule
* debian/control:
  + Bump Standards-Version
  + Change Maintainer email address to @ubuntu.com
  + Drop cdbs build-dependency
* debian/copyright:
  + Update to DEP-5 format
* debian/patches/00_add-fPIC.patch:
  + Dropped, fix upstream
* Closes LP: #413992

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
//////////////////////////////////////////////////////////////////////////////
25
25
 
26
26
#include "dirsaver.h"
 
27
#include "pluginmanager.h"
27
28
#include "windowattrmanager.h"
28
29
#include "envvar_dlg.h"
29
30
#include <wx/dirdlg.h>
118
119
 
119
120
        ConnectEvents();
120
121
        m_notebook->SetSelection(0);
 
122
 
121
123
        //fill the dialog with values
122
124
        InitDialog(m_configName, wxEmptyString);
123
125
 
157
159
        if (!oldConfig.IsEmpty() && oldConfig != GLOBAL_SETTINGS_LABEL) {
158
160
                // save old values before replacing them
159
161
                SaveValues(oldConfig);
 
162
 
 
163
                // Notify the plugins to save their data
 
164
                SendCmdEvent(wxEVT_CMD_PROJ_SETTINGS_SAVED, (void*)&m_projectName, oldConfig);
160
165
        }
161
166
 
 
167
        Freeze();
 
168
 
 
169
        int sel = m_notebook->GetSelection();
 
170
        // Load the new tab for the new configuration
 
171
        PluginManager::Get()->HookProjectSettingsTab(m_notebook, m_projectName, configName);
 
172
 
162
173
        ClearValues();
163
174
        CopyValues(configName);
164
175
        DoUpdatePages(m_checkEnableCustomBuild->IsChecked());
 
176
 
 
177
        if( sel != wxNOT_FOUND ) {
 
178
                m_notebook->SetSelection( sel );
 
179
        }
 
180
 
 
181
        Thaw();
 
182
        Layout();
165
183
}
166
184
 
167
185
void ProjectConfigurationPanel::ClearValues()
480
498
 
481
499
        //save settings
482
500
        ManagerST::Get()->SetProjectSettings(m_projectName, projSettingsPtr);
 
501
 
 
502
        // Notify the plugins to save their data
 
503
        SendCmdEvent(wxEVT_CMD_PROJ_SETTINGS_SAVED, (void*)&m_projectName, confName);
483
504
}
484
505
 
485
506
void ProjectConfigurationPanel::ConnectEvents()
586
607
        GetSizer()->Layout();
587
608
 
588
609
        //Layout(); // JFO : doesn't work, I don't kow why...
589
 
                                // EI  : calling each sizer for layout seems to work. Looks like a bug in WX
 
610
        // EI  : calling each sizer for layout seems to work. Looks like a bug in WX
590
611
        event.Skip();
591
612
}
592
613
 
1256
1277
        }
1257
1278
        event.Skip();
1258
1279
}
 
1280
 
 
1281
ProjectConfigurationPanel::~ProjectConfigurationPanel()
 
1282
{
 
1283
        PluginManager::Get()->UnHookProjectSettingsTab(m_notebook, m_projectName, wxEmptyString /* all tabs */);
 
1284
}