Implemented reading the name of the color scheme

This commit is contained in:
Thorbjørn Lindeijer
2009-07-08 09:45:30 +02:00
parent 947b719e69
commit c6d4663ddb
3 changed files with 48 additions and 11 deletions

View File

@@ -329,10 +329,9 @@ void FontSettingsPage::refreshColorSchemeList()
int count = 0;
foreach (const QString &file, styleDir.entryList()) {
// TODO: Read the name of the style
QListWidgetItem *item = new QListWidgetItem(file);
const QString absFileName = styleDir.absoluteFilePath(file);
item->setData(Qt::UserRole, absFileName );
QListWidgetItem *item = new QListWidgetItem(ColorScheme::readNameOfScheme(absFileName));
item->setData(Qt::UserRole, absFileName);
d_ptr->ui.schemeListWidget->addItem(item);
if (d_ptr->m_value.colorSchemeFileName() == absFileName)
selected = count;