┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-02-18 17:01:36 +0000
committerPeter Penz <[email protected]>2007-02-18 17:01:36 +0000
commitabf17941f7a052d25788d2f2f3c84e5aae935e29 (patch)
tree4f89cd4d58b0b6033cc91f2eb14c02291f8c3a1c /src/dolphinmainwindow.cpp
parentfd43139134da394e413c5d7d5518275379e67798 (diff)
Dolphin is now a KUniqueApplication. A lot of thanks go to Oscar Blumberg, who submitted this patch.
svn path=/trunk/KDE/kdebase/apps/; revision=634862
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index bd91de09a..a25c61038 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -36,6 +36,7 @@
#include "generalsettings.h"
#include "viewpropertiesdialog.h"
#include "viewproperties.h"
+#include "mainwindowadaptor.h"
#include <kaction.h>
#include <kactioncollection.h>
@@ -70,16 +71,20 @@
#include <QSplitter>
#include <QDockWidget>
-DolphinMainWindow::DolphinMainWindow() :
+DolphinMainWindow::DolphinMainWindow(int id) :
KMainWindow(0),
m_newMenu(0),
m_splitter(0),
- m_activeView(0)
+ m_activeView(0),
+ m_id(id)
{
setObjectName("Dolphin");
m_view[PrimaryIdx] = 0;
m_view[SecondaryIdx] = 0;
+ new MainWindowAdaptor(this);
+ QDBusConnection::sessionBus().registerObject(QString("/dolphin/MainWindow%1").arg(m_id), this);
+
KonqUndoManager::incRef();
KonqUndoManager* undoManager = KonqUndoManager::self();
@@ -231,6 +236,13 @@ void DolphinMainWindow::refreshViews()
emit activeViewChanged();
}
+void DolphinMainWindow::changeUrl(const QString& url)
+{
+ if (activeView() != 0) {
+ activeView()->setUrl(KUrl(url));
+ }
+}
+
void DolphinMainWindow::slotViewModeChanged()
{
updateViewActions();