Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / apps / konqueror / src / konqapplication.cpp
blob8565d961a16fc33919d28a84e666237cfc048dc3
1 /* This file is part of the KDE project
2 Copyright (C) 2006 David Faure <faure@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #include "konqapplication.h"
21 #include "konqsettings.h"
22 #include <QtDBus/QtDBus>
23 #include "konqmainwindow.h"
24 #include "KonquerorAdaptor.h"
25 #include "konqviewmanager.h"
27 KonquerorApplication::KonquerorApplication()
28 : KApplication(),
29 closed_by_sm( false )
31 new KonquerorAdaptor; // not really an adaptor
32 const QString dbusInterface = "org.kde.Konqueror.Main";
33 QDBusConnection dbus = QDBusConnection::sessionBus();
34 dbus.connect(QString(), KONQ_MAIN_PATH, dbusInterface, "reparseConfiguration", this, SLOT(slotReparseConfiguration()));
35 dbus.connect(QString(), KONQ_MAIN_PATH, dbusInterface, "updateAllProfileList", this, SLOT(slotUpdateProfileList()));
36 dbus.connect(QString(), KONQ_MAIN_PATH, dbusInterface, "addToCombo", this,
37 SLOT(slotAddToCombo(const QString&, const QDBusMessage&)));
38 dbus.connect(QString(), KONQ_MAIN_PATH, dbusInterface, "removeFromCombo", this,
39 SLOT(slotRemoveFromCombo(const QString&, const QDBusMessage&)));
40 dbus.connect(QString(), KONQ_MAIN_PATH, dbusInterface, "comboCleared", this, SLOT(slotComboCleared(const QDBusMessage&)));
43 void KonquerorApplication::slotReparseConfiguration()
45 KGlobal::config()->reparseConfiguration();
46 KonqFMSettings::reparseConfiguration();
48 QList<KonqMainWindow*> *mainWindows = KonqMainWindow::mainWindowList();
49 if ( mainWindows )
51 foreach ( KonqMainWindow* window, *mainWindows )
52 window->reparseConfiguration();
56 void KonquerorApplication::slotUpdateProfileList()
58 QList<KonqMainWindow*> *mainWindows = KonqMainWindow::mainWindowList();
59 if ( !mainWindows )
60 return;
62 foreach ( KonqMainWindow* window, *mainWindows )
63 window->viewManager()->profileListDirty( false );
66 void KonquerorApplication::slotAddToCombo( const QString& url, const QDBusMessage& msg )
68 KonqMainWindow::comboAction( KonqMainWindow::ComboAdd, url, msg.service() );
71 void KonquerorApplication::slotRemoveFromCombo( const QString& url, const QDBusMessage& msg )
73 KonqMainWindow::comboAction( KonqMainWindow::ComboRemove, url, msg.service() );
76 void KonquerorApplication::slotComboCleared( const QDBusMessage& msg )
78 KonqMainWindow::comboAction( KonqMainWindow::ComboClear, QString(), msg.service() );
81 #include "konqapplication.moc"