mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
BookmarksManager: Don't allow to create bookmark without parent
BUG: 406433 FIXED-IN: 3.1.1
This commit is contained in:
parent
8e4328b03c
commit
514097ef4c
|
@ -107,9 +107,9 @@ void BookmarksManager::createContextMenu(const QPoint &pos)
|
||||||
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
QAction* actNewPrivateWindow = menu.addAction(IconProvider::privateBrowsingIcon(), tr("Open in new private window"));
|
||||||
|
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
menu.addAction(tr("New Bookmark"), this, SLOT(addBookmark()));
|
QAction *actNewBookmark = menu.addAction(tr("New Bookmark"), this, SLOT(addBookmark()));
|
||||||
menu.addAction(tr("New Folder"), this, &BookmarksManager::addFolder);
|
QAction *actNewFolder = menu.addAction(tr("New Folder"), this, &BookmarksManager::addFolder);
|
||||||
menu.addAction(tr("New Separator"), this, &BookmarksManager::addSeparator);
|
QAction *actNewSeparator = menu.addAction(tr("New Separator"), this, &BookmarksManager::addSeparator);
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"));
|
QAction* actDelete = menu.addAction(QIcon::fromTheme(QSL("edit-delete")), tr("Delete"));
|
||||||
|
|
||||||
|
@ -138,6 +138,12 @@ void BookmarksManager::createContextMenu(const QPoint &pos)
|
||||||
actNewPrivateWindow->setDisabled(true);
|
actNewPrivateWindow->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_selectedBookmark) {
|
||||||
|
actNewBookmark->setDisabled(true);
|
||||||
|
actNewFolder->setDisabled(true);
|
||||||
|
actNewSeparator->setDisabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
menu.exec(pos);
|
menu.exec(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user