diff options
| author | Holger Freyther <[email protected]> | 2006-11-29 12:31:16 +0000 |
|---|---|---|
| committer | Holger Freyther <[email protected]> | 2006-11-29 12:31:16 +0000 |
| commit | 91c5f52d87c7af2412b5935095df1f90d6eb4a04 (patch) | |
| tree | 832cb07f932b6a7b0d220a96a68041127120f0cc /src | |
| parent | 9a4a17dd4d7f3d195ab4393e057e8eb90b0a3422 (diff) | |
Add a "New Window" option to Dolphin
svn path=/trunk/playground/utils/dolphin/; revision=609048
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 3 | ||||
| -rw-r--r-- | src/dolphinui.rc | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index af9bd0a01..9748c6e24 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -323,6 +323,11 @@ void DolphinMainWindow::slotUndo() UndoManager::instance().undo(this); } +void DolphinMainWindow::slotNewMainWindow() +{ + DolphinApplication::app()->createMainWindow()->show(); +} + void DolphinMainWindow::closeEvent(QCloseEvent* event) { // KDE4-TODO @@ -1216,6 +1221,9 @@ void DolphinMainWindow::loadSettings() 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); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index dbe6ed4e0..d736c8262 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -169,6 +169,9 @@ public slots: /** @see slotUndo() */ void slotUndo(); + /** Open a new mainwindow */ + void slotNewMainWindow(); + protected: /** @see QMainWindow::closeEvent */ virtual void closeEvent(QCloseEvent* event); diff --git a/src/dolphinui.rc b/src/dolphinui.rc index 6e5e27401..49eb67daf 100644 --- a/src/dolphinui.rc +++ b/src/dolphinui.rc @@ -1,7 +1,8 @@ <!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" /> |
