void RecentFiles::removeRecentFile( const QString& file )
{
	QStringList files = loadRecentFiles();
	files.removeAll( file );
	saveRecentFiles( files );

	updateMenu();
}
Example #2
0
MDLViewer::~MDLViewer ()
{
	saveRecentFiles ();
	SaveViewerSettings( g_pStudioModel->GetFileName(), g_pStudioModel );
	SaveViewerRootSettings( );

#ifdef WIN32
	DeleteFile ("hlmv.cfg");
	DeleteFile ("midump.txt");
#endif
}
void MDLViewer::OnDelete()
{
	saveRecentFiles ();
	SaveViewerSettings( g_viewerSettings.modelFile );

#ifdef WIN32
	DeleteFile ("hlmv.cfg");
	DeleteFile ("midump.txt");
#endif

	g_MDLViewer = NULL;
}
void RecentFiles::setCurrentFile( const QString& file )
{
	QStringList files = loadRecentFiles();
	files.removeAll( file );
	files.prepend( file );

	while ( files.size() > m_actions.size() )
		files.removeLast();

	saveRecentFiles( files );

	updateMenu();
}
Example #5
0
void MRU::insert(const std::string& fileName) {

	if (!fileName.empty())
	{
		// Insert the item into the filelist
		_list.insert(fileName);

		// Update the widgets
		updateMenu();

		// Persist MRU to the registry on each change
		saveRecentFiles();
	}
}
Example #6
0
File: App.cpp Project: KDE/kwave
//***************************************************************************
Kwave::App::~App()
{
    saveRecentFiles();
    m_recent_files.clear();
}