Commit df05eca1 authored by Jan Möbius's avatar Jan Möbius

Some Minor Toolbox Changes, remove old recent files code

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10356 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d9eee77c
......@@ -554,7 +554,6 @@ Core::init() {
// Load global ini files. Use only plugin global options from these files as the
// rest has been loaded at the beginning.
readRecentFiles( optionFiles[i] );
if ( OpenFlipper::Options::gui() )
coreWidget_->updateRecent();
......
......@@ -790,9 +790,6 @@ private slots:
/// Read Options that needs the GUI to be set up completely
void readGUIOptions(INIFile& _ini);
/// Read recent files from ini-file
void readRecentFiles(QString _filename);
/// Get and set Application options from ini file
void readApplicationOptions(INIFile& _ini);
......
......@@ -327,45 +327,6 @@ void Core::readApplicationOptions(INIFile& _ini) {
}
}
void Core::readRecentFiles(QString _filename){
INIFile ini;
if ( ! ini.connect(_filename,false) ) {
emit log(LOGERR,"Failed to connect to ini file" + _filename);
return;
}
OpenFlipper::Options::loadingSettings(true);
// Load maxRecent Setting
int mrecent = 10;
if (ini.get_entry(mrecent,"Options","MaxRecent"))
OpenFlipperSettings().setValue("Core/File/MaxRecent", mrecent);
for ( int j = mrecent-1 ; j >= 0; --j) {
QString file;
QString key = "recent" + QString::number(j);
if ( !ini.get_entry( file , "Options" , key ) )
continue;
key = "type" + QString::number(j);
QString type;
if ( !ini.get_entry( type , "Options" , key ) )
continue;
OpenFlipper::Options::addRecentFile(file, typeId(type) );
}
ini.disconnect();
OpenFlipper::Options::loadingSettings(false);
}
/** Write the standard options to the given Ini File
* @param _ini Inifile to use
*/
......
......@@ -137,10 +137,10 @@ void Core::applyOptions(){
if ( OpenFlipperSettings().value("Core/Gui/glViewer/useMultipleViewers",true).toBool() )
coreWidget_->setViewerLayout( OpenFlipper::Options::defaultViewerLayout() );
// if ( OpenFlipper::Options::gridVisible() )
// gridNode_->show();
// else
// gridNode_->hide();
// toolbox orientation
coreWidget_->setToolBoxOrientationOnTheRight(OpenFlipperSettings().value("Core/Gui/ToolBoxOnTheRight").toBool());
//set defaultBackgroundColor
QColor c = OpenFlipperSettings().value("Core/Gui/glViewer/defaultBackgroundColor").value<QColor>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment