Use the icon for the device, in the file item actions
This way, we have visual information of what type of file we're sending it to.
This commit is contained in:
parent
b7420146eb
commit
9459001fbe
1 changed files with 1 additions and 2 deletions
|
@ -54,7 +54,7 @@ QList<QAction*> SendFileItemAction::actions(const KFileItemListProperties& fileI
|
||||||
QModelIndex idx = m.index(i);
|
QModelIndex idx = m.index(i);
|
||||||
DeviceDbusInterface* dev = m.getDevice(idx);
|
DeviceDbusInterface* dev = m.getDevice(idx);
|
||||||
if(dev->isReachable() && dev->isPaired()) {
|
if(dev->isReachable() && dev->isPaired()) {
|
||||||
QAction* action = new QAction(dev->name(), parentWidget);
|
QAction* action = new QAction(QIcon::fromTheme(dev->iconName()), dev->name(), parentWidget);
|
||||||
action->setProperty("id", idx.data(DevicesModel::IdModelRole));
|
action->setProperty("id", idx.data(DevicesModel::IdModelRole));
|
||||||
action->setProperty("urls", QVariant::fromValue(fileItemInfos.urlList()));
|
action->setProperty("urls", QVariant::fromValue(fileItemInfos.urlList()));
|
||||||
action->setProperty("parentWidget", QVariant::fromValue(parentWidget));
|
action->setProperty("parentWidget", QVariant::fromValue(parentWidget));
|
||||||
|
@ -71,7 +71,6 @@ QList<QAction*> SendFileItemAction::actions(const KFileItemListProperties& fileI
|
||||||
} else {
|
} else {
|
||||||
if(actions.count() == 1) {
|
if(actions.count() == 1) {
|
||||||
actions.first()->setText(i18n("Send to '%1' via KDE Connect", actions.first()->text()));
|
actions.first()->setText(i18n("Send to '%1' via KDE Connect", actions.first()->text()));
|
||||||
actions.first()->setIcon(QIcon::fromTheme("preferences-system-network"));
|
|
||||||
}
|
}
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue