Commit bc8b1632 authored by Robert Knight's avatar Robert Knight
Browse files

Add keyboard icon to key bindings list. The current 'keyboard' icon is...

Add keyboard icon to key bindings list.  The current 'keyboard' icon is invisible against a white background, as are the hdd-external- icons.  CCMAIL: kde-artists@kde.org

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=667503
parent d61c8117
......@@ -329,31 +329,35 @@ void EditProfileDialog::updateColorSchemeList()
}
void EditProfileDialog::updateKeyBindingsList()
{
KeyboardTranslatorManager* keyManager = KeyboardTranslatorManager::instance();
delete _ui->keyBindingList->model();
const QString& name = SessionManager::instance()->profile(_profileKey)->property(Profile::KeyBindings)
.value<QString>();
const QString& name = SessionManager::instance()->profile(_profileKey)
->property(Profile::KeyBindings).value<QString>();
const KeyboardTranslator* currentTranslator = KeyboardTranslatorManager::instance()->findTranslator(name);
const KeyboardTranslator* currentTranslator = keyManager->findTranslator(name);
qDebug() << "Current translator = " << currentTranslator << ", name: " << name;
QStandardItemModel* model = new QStandardItemModel(this);
QList<QString> translatorNames = KeyboardTranslatorManager::instance()->allTranslators();
QList<QString> translatorNames = keyManager->allTranslators();
QListIterator<QString> iter(translatorNames);
while (iter.hasNext())
{
const QString& name = iter.next();
const KeyboardTranslator* translator = KeyboardTranslatorManager::instance()->findTranslator(name);
const KeyboardTranslator* translator = keyManager->findTranslator(name);
qDebug() << "Translator:" << translator << ", name = " << translator->name() << "description = " <<
qDebug() << "Translator:" << translator << ", name = " <<
translator->name() << "description = " <<
translator->description();
// TODO Use translator->description() here
QStandardItem* item = new QStandardItem(translator->description());
item->setData(QVariant::fromValue(translator),Qt::UserRole+1);
item->setIcon( KIcon("keyboard") );
item->setFlags( item->flags() | Qt::ItemIsUserCheckable );
if ( translator == currentTranslator )
......
......@@ -495,7 +495,14 @@
</property>
<layout class="QGridLayout" >
<item rowspan="5" row="0" column="0" >
<widget class="QListView" name="keyBindingList" />
<widget class="QListView" name="keyBindingList" >
<property name="iconSize" >
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="newKeyBindingsButton" >
......
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