+ // Edit menu
+
+ m_newFileMenu = new KNewFileMenu(actionCollection(), "new_menu", this);
+ m_newFileMenu->setParentWidget(widget());
+ DolphinNewFileMenuObserver::instance().attach(m_newFileMenu);
+ connect(m_newFileMenu->menu(), SIGNAL(aboutToShow()),
+ this, SLOT(updateNewMenu()));
+
+ KAction *editMimeTypeAction = actionCollection()->addAction( "editMimeType" );
+ editMimeTypeAction->setText( i18nc("@action:inmenu Edit", "&Edit File Type..." ) );
+ connect(editMimeTypeAction, SIGNAL(triggered()), SLOT(slotEditMimeType()));
+
+ KAction* selectItemsMatching = actionCollection()->addAction("select_items_matching");
+ selectItemsMatching->setText(i18nc("@action:inmenu Edit", "Select Items Matching..."));
+ selectItemsMatching->setShortcut(Qt::CTRL | Qt::Key_S);
+ connect(selectItemsMatching, SIGNAL(triggered()), this, SLOT(slotSelectItemsMatchingPattern()));
+
+ KAction* unselectItemsMatching = actionCollection()->addAction("unselect_items_matching");
+ unselectItemsMatching->setText(i18nc("@action:inmenu Edit", "Unselect Items Matching..."));
+ connect(unselectItemsMatching, SIGNAL(triggered()), this, SLOT(slotUnselectItemsMatchingPattern()));
+
+ actionCollection()->addAction(KStandardAction::SelectAll, "select_all", m_view, SLOT(selectAll()));
+
+ KAction* unselectAll = actionCollection()->addAction("unselect_all");
+ unselectAll->setText(i18nc("@action:inmenu Edit", "Unselect All"));
+ connect(unselectAll, SIGNAL(triggered()), m_view, SLOT(clearSelection()));
+
+ KAction* invertSelection = actionCollection()->addAction("invert_selection");
+ invertSelection->setText(i18nc("@action:inmenu Edit", "Invert Selection"));
+ invertSelection->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_A);
+ connect(invertSelection, SIGNAL(triggered()), m_view, SLOT(invertSelection()));
+
+ // View menu: all done by DolphinViewActionHandler
+
+ // Go menu
+
+ QActionGroup* goActionGroup = new QActionGroup(this);
+ connect(goActionGroup, SIGNAL(triggered(QAction*)),
+ this, SLOT(slotGoTriggered(QAction*)));
+
+ createGoAction("go_applications", "start-here-kde",
+ i18nc("@action:inmenu Go", "App&lications"), QString("programs:/"),
+ goActionGroup);
+ createGoAction("go_network_folders", "folder-remote",
+ i18nc("@action:inmenu Go", "&Network Folders"), QString("remote:/"),
+ goActionGroup);
+ createGoAction("go_settings", "preferences-system",
+ i18nc("@action:inmenu Go", "Sett&ings"), QString("settings:/"),
+ goActionGroup);
+ createGoAction("go_trash", "user-trash",
+ i18nc("@action:inmenu Go", "Trash"), QString("trash:/"),
+ goActionGroup);
+ createGoAction("go_autostart", "",
+ i18nc("@action:inmenu Go", "Autostart"), KGlobalSettings::autostartPath(),
+ goActionGroup);
+
+ // Tools menu
+ if (KAuthorized::authorizeKAction("shell_access")) {
+ KAction* action = actionCollection()->addAction("open_terminal");
+ action->setIcon(KIcon("utilities-terminal"));
+ action->setText(i18nc("@action:inmenu Tools", "Open &Terminal"));
+ connect(action, SIGNAL(triggered()), SLOT(slotOpenTerminal()));
+ action->setShortcut(Qt::Key_F4);
+ }