allow removing a mount point by clearing its mount path
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1075868
This commit is contained in:
parent
57f900812a
commit
d975416a53
|
@ -38,13 +38,6 @@ EditMountPointDialog::EditMountPointDialog(QWidget* parent, Partition& p) :
|
||||||
|
|
||||||
void EditMountPointDialog::accept()
|
void EditMountPointDialog::accept()
|
||||||
{
|
{
|
||||||
if (widget().editPath().text().isEmpty())
|
|
||||||
{
|
|
||||||
KMessageBox::sorry(this, i18n("The path can not be empty\n\nPlease fill in a valid path or \"none\" if the file system does not require a path to be set (e.g. swap)."), i18n("Error"));
|
|
||||||
widget().editPath().setFocus(Qt::OtherFocusReason);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (KMessageBox::warningContinueCancel(this,
|
if (KMessageBox::warningContinueCancel(this,
|
||||||
i18nc("@info", "<para>Are you sure you want to save the changes you made to the system table file <filename>/etc/fstab</filename>?</para>"
|
i18nc("@info", "<para>Are you sure you want to save the changes you made to the system table file <filename>/etc/fstab</filename>?</para>"
|
||||||
"<para><warning>This will overwrite the existing file on your hard drive now. This <strong>can not be undone</strong>.</warning></para>"),
|
"<para><warning>This will overwrite the existing file on your hard drive now. This <strong>can not be undone</strong>.</warning></para>"),
|
||||||
|
|
|
@ -254,6 +254,9 @@ static void writeEntry(QFile& output, const MountEntry* entry)
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (entry->path.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
QTextStream s(&output);
|
QTextStream s(&output);
|
||||||
|
|
||||||
s << entry->name << "\t"
|
s << entry->name << "\t"
|
||||||
|
|
Loading…
Reference in New Issue