}
popup->addMenu(createNewMenu);
+ popup->addSeparator();
QAction* pasteAction = dolphin->actionCollection()->action(KStandardAction::stdName(KStandardAction::Paste));
popup->addAction(pasteAction);
- popup->insertSeparator(pasteAction);
// setup 'View Mode' menu
KMenu* viewModeMenu = new KMenu(i18n("View Mode"));
viewModeMenu->addAction(previewsMode);
popup->addMenu(viewModeMenu);
+ popup->addSeparator();
QAction* bookmarkAction = popup->addAction(i18n("Bookmark this folder"));
- popup->insertSeparator(bookmarkAction);
+ popup->addSeparator();
QAction* propertiesAction = popup->addAction(i18n("Properties..."));
- popup->insertSeparator(propertiesAction);
QAction* activatedAction = popup->exec(m_pos);
if (activatedAction == propertiesAction) {
popup->addAction(action);
}
}
+ popup->addSeparator();
// insert 'Rename'
QAction* renameAction = dolphin->actionCollection()->action("rename");
popup->addAction(renameAction);
- popup->insertSeparator(renameAction);
// insert 'Move to Trash' for local Urls, otherwise insert 'Delete'
const KUrl& url = dolphin->activeView()->url();
// Insert 'Actions' sub menu
QVector<KDEDesktopMimeType::Service> actionsVector;
const QList<QAction*> serviceActions = insertActionItems(popup, actionsVector);
+ popup->addSeparator();
// insert 'Properties...' entry
QAction* propertiesAction = dolphin->actionCollection()->action("properties");
popup->addAction(propertiesAction);
- popup->insertSeparator(propertiesAction);
QAction* activatedAction = popup->exec(m_pos);
const KFileItemList list = m_dolphinView->selectedItems();
bool insertOpenWithItems = true;
-
- // TODO: a crash occurs in KFileItem although m_fileInfo seems to be valid. Temporary
- // commented out the following command, otherwise it won't be possible to open a context menu:
- //const QString contextMimeType(m_fileInfo->mimetype());
- const QString contextMimeType;
+ const QString contextMimeType(m_fileInfo->mimetype());
QListIterator<KFileItem*> mimeIt(list);
while (insertOpenWithItems && mimeIt.hasNext()) {
}
QList<QAction*> openWithActions;
-
if (insertOpenWithItems) {
// fill the 'Open with' sub menu with application types
const KMimeType::Ptr mimePtr = KMimeType::findByUrl(m_fileInfo->url());
}
}
+ openWithMenu->addSeparator();
QAction* action = openWithMenu->addAction(i18n("&Other..."));
- openWithMenu->insertSeparator(action);
openWithActions << action;
+ popup->addSeparator();
popup->addMenu(openWithMenu);
}
else {
else {
// At least one of the selected items has a different MIME type. In this case
// just show a disabled "Open With..." entry.
+ popup->addSeparator();
QAction* action = popup->addAction(i18n("Open With..."));
- popup->insertSeparator(action);
action->setEnabled(false);
}