Exemplo n.º 1
0
RheiaEnvironementManager::RheiaEnvironementManager():
        wxEvtHandler()
{
    m_envars = RheiaManager::Get()->GetConfigurationManager( wxT("environement_manger") )->ReadStringStringMap( wxT("/variables") );
    m_libpaths = RheiaManager::Get()->GetConfigurationManager( wxT("environement_manger") )->ReadArrayString( wxT("/libs") );

    RheiaStringStringMap::iterator it = m_envars.begin();

    for ( ; it != m_envars.end() ; ++it )
        wxSetEnv( it->first , it->second );

    for ( unsigned int i = 0; i < m_libpaths.GetCount() ; ++i )
    {
        wxString env;
#if defined( WIN32 )
        wxGetEnv( wxT("PATH") , &env );
        env += wxT(";") + m_libpaths[i];
        wxSetEnv( wxT("PATH") , env );
#elif defined( LINUX )
        wxGetEnv( wxT("LD_LIBRARY_PATH") , &env );
        env += m_libpaths[i] + wxT(":");
        wxSetEnv( wxT("LD_LIBRARY_PATH") , env );
#elif defined( MACOSX )
        wxGetEnv( wxT("DYLD_LIBRARY_PATH") , &env );
        env += m_libpaths[i] + wxT(":");
        wxSetEnv( wxT("DYLD_LIBRARY_PATH") , env );
#endif
    }

    RheiaEventsManager* pm = RheiaEventsManager::Get();
    pm->RegisterEventMethod(RheiaEVT_FRAME_CLOSING, new RheiaEventFunctor<RheiaEnvironementManager>(this, RheiaFrameEventHandler(RheiaEnvironementManager::OnCloseFrame)));
}
Exemplo n.º 2
0
void RheiaPackageManagementDialog::RegiserEvents()
{
    RheiaEventsManager* pm = RheiaEventsManager::Get();

    pm->RegisterEventMethod(RheiaEVT_PACKAGE_INSTALLED, new RheiaEventFunctor<RheiaPackageManagementDialog>(this, RheiaEventHandler(RheiaPackageManagementDialog::OnPackageInstalled)));
    pm->RegisterEventMethod(RheiaEVT_PACKAGE_REMOVED, new RheiaEventFunctor<RheiaPackageManagementDialog>(this, RheiaEventHandler(RheiaPackageManagementDialog::OnPackageRemoved)));
}
Exemplo n.º 3
0
void RheiaTextLogger::RegisterEvents()
{
    /* Register events for plugin installation and uninstallation */
    RheiaEventsManager* pm = RheiaEventsManager::Get();
    pm->RegisterEventMethod(RheiaEVT_TXT_LOGGER_SETTINGS, new RheiaEventFunctor<RheiaTextLogger>(this, wxCommandEventHandler(RheiaTextLogger::OnTextLoggerSettings)));
}
Exemplo n.º 4
0
void RheiaLoggerManager::RegisterEvents()
{
    /* Register events for plugin installation and uninstallation */
    RheiaEventsManager* pm = RheiaEventsManager::Get();
    pm->RegisterEventMethod(RheiaEVT_LOGGER_REMOVED, new RheiaEventFunctor<RheiaLoggerManager>(this, wxCommandEventHandler(RheiaLoggerManager::OnUnregisterLogger)));
}
Exemplo n.º 5
0
RheiaPackageManagementDialog::~RheiaPackageManagementDialog()
{
    RheiaEventsManager* pm = RheiaEventsManager::Get();
    pm->RemoveAllEventMethodsFor( this );
}