Clean up ugly error message

pull/2/head
Timothy Pearson 12 years ago
parent f70bd6c7c0
commit e13c01e686

@ -1272,7 +1272,7 @@ static TQString mount_priv(const char *udi, const char *mount_point, const char
if ( !strcmp(error.name, "org.freedesktop.Hal.Device.Volume.UnknownFilesystemType"))
qerror = i18n("Invalid filesystem type");
else if ( !strcmp(error.name, "org.freedesktop.Hal.Device.Volume.PermissionDenied"))
qerror = i18n("Permissions denied<p>Please ensure that:<br>1. You have permission to access this device.<br>2. This device node is not listed in /etc/fstab.</p>");
qerror = i18n("Permission denied<p>Please ensure that:<br>1. You have permission to access this device.<br>2. This device node is not listed in /etc/fstab.</p>");
else if ( !strcmp(error.name, "org.freedesktop.Hal.Device.PermissionDeniedByPolicy"))
qerror = privilegedMount(udi, mount_point, poptions, noptions);
else if ( !strcmp(error.name, "org.freedesktop.Hal.Device.Volume.AlreadyMounted"))

@ -208,7 +208,7 @@ void MountHelper::ejectFinished(KProcess* proc)
else
m_errorStr = i18n("The device was successfully unmounted, but could not be ejected");
}
//X Comment this because the error is useless as long as the unmount is successfull.
//X Comment this because the error is useless as long as the unmount is successful.
//X TQTimer::singleShot(0, this, TQT_SLOT(error()));
::exit(0);
}
@ -216,7 +216,13 @@ void MountHelper::ejectFinished(KProcess* proc)
void MountHelper::error()
{
KMessageBox::error(0, m_errorStr);
TQString prettyErrorString = m_errorStr;
if (m_errorStr.contains("<") && m_errorStr.contains(">")) {
if (!m_errorStr.contains("<qt>")) {
prettyErrorString = TQString("<qt>%1</qt>").arg(m_errorStr);
}
}
KMessageBox::error(0, prettyErrorString);
::exit(1);
}

Loading…
Cancel
Save