- newFileMenu->setPopupFiles(m_baseUrl);
- m_popup->addMenu(newFileMenu->menu());
- m_popup->addSeparator();
-
- // Insert 'New Window' and 'New Tab' entries. Don't use "open_in_new_window" and
- // "open_in_new_tab" here, as the current selection should get ignored.
- m_popup->addAction(m_mainWindow->actionCollection()->action("new_window"));
- m_popup->addAction(m_mainWindow->actionCollection()->action("new_tab"));
- m_popup->addSeparator();
-
- QAction* pasteAction = createPasteAction();
- m_popup->addAction(pasteAction);
- m_popup->addSeparator();
-
- // insert service actions
- const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, m_baseUrl);
- const KFileItemListProperties baseUrlProperties(KFileItemList() << item);
- KFileItemActions fileItemActions;
- fileItemActions.setItemListProperties(baseUrlProperties);
- addServiceActions(fileItemActions);
-
- addVersionControlActions();
-
- // insert 'Add to Places' entry if exactly one item is selected
- QAction* addToPlacesAction = 0;
- if (!placeExists(m_mainWindow->activeViewContainer()->url())) {
- addToPlacesAction = m_popup->addAction(KIcon("bookmark-new"),
- i18nc("@action:inmenu Add current folder to places", "Add to Places"));
- }