UndoManager::instance().undo(this);
}
+void DolphinMainWindow::slotNewMainWindow()
+{
+ DolphinApplication::app()->createMainWindow()->show();
+}
+
void DolphinMainWindow::closeEvent(QCloseEvent* event)
{
// KDE4-TODO
void DolphinMainWindow::setupActions()
{
// setup 'File' menu
+ KAction *action = new KAction(KIcon("window_new"), i18n( "New &Window" ), actionCollection(), "new_window" );
+ connect(action, SIGNAL(triggered()), this, SLOT(slotNewMainWindow()));
+
KAction* createFolder = new KAction(i18n("Folder..."), actionCollection(), "create_folder");
createFolder->setIcon(KIcon("folder"));
createFolder->setShortcut(Qt::Key_N);
/** @see slotUndo() */
void slotUndo();
+ /** Open a new mainwindow */
+ void slotNewMainWindow();
+
protected:
/** @see QMainWindow::closeEvent */
virtual void closeEvent(QCloseEvent* event);
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="1" name="dolphin" >
+<kpartgui version="2" name="dolphin" >
<MenuBar>
<Menu name="file" >
+ <Action name="new_window" />
<Menu name="create_new" >
<text>Create New</text>
<Action name="create_folder" />