Fix disable/enable "comment/url/name"

-> don't allow to add a url/comment when it's a separator
-> don't allow to add a name/url/comment when item doesn't have a parent
(Perhaps backport for 3.2)

svn path=/trunk/kdebase/konqueror/keditbookmarks/; revision=281807
This commit is contained in:
Laurent Montel 2004-01-22 16:44:43 +00:00
parent 4ed1249395
commit cb76018d9a

View file

@ -90,14 +90,13 @@ void BookmarkInfoWidget::showBookmark(const KBookmark &bk) {
}
// read/write fields
m_title_le->setReadOnly(false);
m_title_le->setReadOnly( (bk.isSeparator()|| !bk.hasParent() )? true : false);
m_title_le->setText(bk.fullText());
m_url_le->setReadOnly(bk.isGroup());
m_url_le->setReadOnly(bk.isGroup() || bk.isSeparator());
m_url_le->setText(bk.isGroup() ? QString::null : bk.url().url());
m_comment_le->setReadOnly(false);
m_comment_le->setReadOnly((bk.isSeparator()|| !bk.hasParent()) ? true : false );
m_comment_le->setText(
NodeEditCommand::getNodeText(bk, QStringList() << "desc"));