m_TreeWidget( NULL ),
m_Editor( NULL )
{
- // Prepare plugins interface
+ this->m_Interface.GuessAccesiblePlugins( );
+
+ // Try to load plugins from executable dir
QFileInfo info( argv[ 0 ] );
if( info.exists( ) )
- {
- this->m_Interface.LoadConfiguration( cpPlugins_CONFIG_FILE );
- this->_LoadPluginsFromPath( this->m_PluginsPath );
- this->m_PluginsPath = info.canonicalPath( ).toStdString( );
-
- } // fi
- QDir exec_dir( "." );
- if( exec_dir.exists( ) )
- {
- this->_LoadPluginsFromPath( exec_dir.canonicalPath( ).toStdString( ) );
- this->m_PluginsPath = exec_dir.canonicalPath( ).toStdString( );
-
- } // fi
+ this->_LoadPluginsFromPath( info.canonicalPath( ).toStdString( ) );
// Prepare workspace
this->m_Workspace.SetInterface( &( this->m_Interface ) );
} // fi
this->_UnBlock( );
- this->m_Interface.SaveConfiguration( cpPlugins_CONFIG_FILE );
}
// -------------------------------------------------------------------------
dlg.setDirectory( this->m_PluginsPath.c_str( ) );
std::stringstream name_filter;
- std::string suffix = std::string( cpPlugins_PLUGIN_EXT );
+ std::string suffix = std::string( cpPlugins_LIB_EXT );
name_filter
- << "Plugins file (*." << cpPlugins_PLUGIN_EXT << ");;All files (*)";
+ << "Plugins file (*." << cpPlugins_LIB_EXT << ");;All files (*)";
dlg.setNameFilter( name_filter.str( ).c_str( ) );
dlg.setDefaultSuffix( suffix.c_str( ) );
if( !( dlg.exec( ) ) )