mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
soliduiserver: use device description in prompt for consistency with Dolphin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ad6f62ddc8
commit
28df75d807
1 changed files with 2 additions and 8 deletions
|
@ -140,13 +140,7 @@ int SolidUiServer::mountDevice(const QString &udi)
|
||||||
if (storagevolume->usage() == Solid::StorageVolume::Encrypted) {
|
if (storagevolume->usage() == Solid::StorageVolume::Encrypted) {
|
||||||
KPasswordDialog passworddialog(0, KPasswordDialog::NoFlags);
|
KPasswordDialog passworddialog(0, KPasswordDialog::NoFlags);
|
||||||
|
|
||||||
QString label = device.vendor();
|
passworddialog.setPrompt(i18n("'%1' needs a password to be accessed. Please enter a password.", device.description()));
|
||||||
if (!label.isEmpty()) {
|
|
||||||
label += ' ';
|
|
||||||
}
|
|
||||||
label += device.product();
|
|
||||||
|
|
||||||
passworddialog.setPrompt(i18n("'%1' needs a password to be accessed. Please enter a password.", label));
|
|
||||||
passworddialog.setPixmap(KIcon(device.icon()).pixmap(64, 64));
|
passworddialog.setPixmap(KIcon(device.icon()).pixmap(64, 64));
|
||||||
if (!passworddialog.exec()) {
|
if (!passworddialog.exec()) {
|
||||||
return int(Solid::ErrorType::UserCanceled);
|
return int(Solid::ErrorType::UserCanceled);
|
||||||
|
@ -179,7 +173,7 @@ int SolidUiServer::mountDevice(const QString &udi)
|
||||||
|
|
||||||
// permission denied on /run/mount so.. using base directory that is writable
|
// permission denied on /run/mount so.. using base directory that is writable
|
||||||
const QString mountbase = KGlobal::dirs()->saveLocation("tmp");
|
const QString mountbase = KGlobal::dirs()->saveLocation("tmp");
|
||||||
QString mountpoint = mountbase + QLatin1Char('/') + deviceuuid;
|
const QString mountpoint = mountbase + QLatin1Char('/') + deviceuuid;
|
||||||
QDir mountdir(mountbase);
|
QDir mountdir(mountbase);
|
||||||
if (!mountdir.exists(deviceuuid) && !mountdir.mkdir(deviceuuid)) {
|
if (!mountdir.exists(deviceuuid) && !mountdir.mkdir(deviceuuid)) {
|
||||||
kWarning() << "could not create" << mountpoint;
|
kWarning() << "could not create" << mountpoint;
|
||||||
|
|
Loading…
Add table
Reference in a new issue