~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to LiteEditor/manager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-04-30 02:46:27 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090430024627-7xp71gerfvw00xtt
Tags: 1.0.2822+dfsg-0ubuntu1
* New upstream release (LP: #369466)
* debian/copyright:
  + Added Files section for sdk/wxpropgrid
  + Made license text RFC compliant (add . for empty lines)
* debian/control:
  + Bump Standards-Version to 3.8.1
* debian/patches/02_fix-desktop.patch,
  + Refreshed to patch cleanly
* debian/*.install,
  debian/codelite.dirs,
  debian/codelite.links,
  debian/patches/03_fix-sh.patch,
  debian/patches/04_change-installpath.patch,
  + Updated for new upstream directory structure
  + Patches dropped, no longer needed.
* debian/patches/03_cstdio-include.patch,
  + Include cstdio for C++ and stdio.h for C, since it seems to be missing
* debian/codelite.menu,
  debian/*.1,
  debian/codelite.manpages:
  + Updated to reflect change in command names
    - CodeLite    => codelite
    - le_exec     => codelite_exec
    - le_dos2unix => codelite_fix_files
    - le_killproc => codelite_kill_children
* debian/README.source,
  debian/rules,
  debian/copyright:
  + Remove sdk/curl from the list of excluded files, since it doesn't exist
    any more

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
{
219
219
        m_workspceClosing = true;
220
220
 
 
221
        DbgClearWatches();
221
222
        DbgStop();
222
223
 
223
224
        //save the current session before closing
901
902
        proj->SetSettings ( settings );
902
903
}
903
904
 
 
905
void Manager::SetProjectGlobalSettings ( const wxString &projectName, BuildConfigCommonPtr settings )
 
906
{
 
907
        wxString errMsg;
 
908
        ProjectPtr proj = WorkspaceST::Get()->FindProjectByName ( projectName, errMsg );
 
909
        if ( !proj ) {
 
910
                wxLogMessage ( errMsg );
 
911
                return;
 
912
        }
 
913
 
 
914
        proj->SetGlobalSettings ( settings );
 
915
}
 
916
 
904
917
wxString Manager::GetProjectExecutionCommand ( const wxString& projectName, wxString &wd, bool considerPauseWhenExecuting )
905
918
{
906
919
        BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjBuildConf ( projectName, wxEmptyString );
948
961
                if ( bldConf->GetPauseWhenExecEnds() ) {
949
962
                        wxString ld_lib_path;
950
963
                        wxFileName exePath ( wxStandardPaths::Get().GetExecutablePath() );
951
 
                        wxFileName exeWrapper ( exePath.GetPath(), wxT ( "le_exec.sh" ) );
 
964
                        wxFileName exeWrapper ( exePath.GetPath(), wxT ( "codelite_exec" ) );
952
965
 
953
966
                        if ( wxGetEnv ( wxT ( "LD_LIBRARY_PATH" ), &ld_lib_path ) && ld_lib_path.IsEmpty() == false ) {
954
967
                                command << wxT ( "/bin/sh -f " ) << exeWrapper.GetFullPath() << wxT ( " LD_LIBRARY_PATH=" ) << ld_lib_path << wxT ( " " );
1340
1353
 
1341
1354
        // append the content of all '*.accelerators' from the plugins
1342
1355
        // resources table
1343
 
        wxDir::GetAllFiles ( GetInstallDir() + wxT ( "/plugins/resources/" ), &files, wxT ( "*.accelerators" ), wxDIR_FILES );
 
1356
#ifdef __WXGTK__
 
1357
        wxString pluginsDir(PLUGINS_DIR, wxConvUTF8);
 
1358
#else
 
1359
        wxString pluginsDir(ManagerST::Get()->GetInstallDir() + wxT( "/plugins" ));
 
1360
#endif
 
1361
 
 
1362
        wxDir::GetAllFiles ( pluginsDir + wxT ( "/resources/" ), &files, wxT ( "*.accelerators" ), wxDIR_FILES );
1344
1363
        LoadAcceleratorTable ( files, accelMap );
1345
1364
}
1346
1365
 
1360
1379
                //use the default settings
1361
1380
                fileName = GetStarupDirectory() + wxT ( "/config/accelerators.conf.default" );
1362
1381
                files.Add ( fileName );
1363
 
 
 
1382
#ifdef __WXGTK__
 
1383
                wxString pluginsDir(PLUGINS_DIR, wxConvUTF8);
 
1384
#else
 
1385
                wxString pluginsDir(ManagerST::Get()->GetInstallDir() + wxT( "/plugins" ));
 
1386
#endif
1364
1387
                // append the content of all '*.accelerators' from the plugins
1365
1388
                // resources table
1366
 
                wxDir::GetAllFiles ( GetInstallDir() + wxT ( "/plugins/resources/" ), &files, wxT ( "*.accelerators" ), wxDIR_FILES );
 
1389
                wxDir::GetAllFiles (pluginsDir + wxT ( "/resources/" ), &files, wxT ( "*.accelerators" ), wxDIR_FILES );
1367
1390
        } else {
1368
1391
                files.Add ( fileName );
1369
1392
        }
1371
1394
 
1372
1395
void Manager::DumpMenu ( wxMenu *menu, const wxString &label, wxString &content )
1373
1396
{
 
1397
#if 0
1374
1398
        wxMenuItemList items = menu->GetMenuItems();
1375
1399
        wxMenuItemList::iterator iter = items.begin();
1376
1400
        for ( ; iter != items.end(); iter++ ) {
1395
1419
                }
1396
1420
                content << wxT ( "\n" );
1397
1421
        }
 
1422
#endif
1398
1423
}
1399
1424
 
1400
1425
 
1772
1797
                HideDebuggerPane = true;
1773
1798
                ShowDebuggerPane ( true );
1774
1799
        }
 
1800
 
 
1801
        DbgRestoreWatches();
1775
1802
}
1776
1803
 
1777
1804
void Manager::DbgStop()
1787
1814
        // Mark the debugger as non interactive
1788
1815
        m_dbgCanInteract = false;
1789
1816
 
 
1817
        // Keep the current watches for the next debug session
 
1818
        m_dbgWatchExpressions = Frame::Get()->GetDebuggerPane()->GetWatchesTable()->GetExpressions();
 
1819
 
1790
1820
        //clear the debugger pane
1791
1821
        Frame::Get()->GetDebuggerPane()->Clear();
1792
1822
 
2392
2422
                }
2393
2423
        }
2394
2424
}
 
2425
 
 
2426
void Manager::DbgClearWatches()
 
2427
{
 
2428
        m_dbgWatchExpressions.Clear();
 
2429
}
 
2430
 
 
2431
 
 
2432
void Manager::DbgRestoreWatches()
 
2433
{
 
2434
        // restore any saved watch expressions from previous debug sessions
 
2435
        if( m_dbgWatchExpressions.empty() == false ) {
 
2436
                for(size_t i=0; i<m_dbgWatchExpressions.GetCount(); i++){
 
2437
                        DebugMessage(wxT("Restoring watch: ") + m_dbgWatchExpressions.Item(i) + wxT("\n"));
 
2438
                        wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, XRCID("add_watch"));
 
2439
                        e.SetString(m_dbgWatchExpressions.Item(i));
 
2440
                        Frame::Get()->GetDebuggerPane()->GetWatchesTable()->AddPendingEvent( e );
 
2441
                }
 
2442
        }
 
2443
}