[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/kcontrol/kfontinst
From:       Craig Drummond <craig () kde ! org>
Date:       2009-10-04 19:49:50
Message-ID: 1254685790.565229.16038.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1031365 by craig:

Start dbus service if it is not alreadt registered.


 M  +2 -0      apps/Installer.cpp  
 M  +7 -0      kcmfontinst/JobRunner.cpp  
 M  +2 -0      kcmfontinst/JobRunner.h  
 M  +1 -0      kcmfontinst/KCmFontInst.cpp  
 M  +4 -0      kio/FontInstInterface.cpp  
 M  +3 -0      viewpart/FontViewPart.cpp  


--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/apps/Installer.cpp \
#1031364:1031365 @@ -46,6 +46,8 @@
     bool                      sysInstall(false);
     CJobRunner *jobRunner=new CJobRunner(itsParent);
 
+    CJobRunner::startDbusService();
+
     if(!Misc::root())
     {
         switch(KMessageBox::questionYesNoCancel(itsParent,
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/JobRunner.cpp \
#1031364:1031365 @@ -51,6 +51,7 @@
 #include <sys/resource.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include "config-fontinst.h"
 
 #define CFG_GROUP                  "Runner Dialog"
 #define CFG_DONT_SHOW_FINISHED_MSG "DontShowFinishedMsg"
@@ -65,6 +66,12 @@
     return theInterface;
 }
 
+void CJobRunner::startDbusService()
+{
+    if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName()))
 +        QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"));
+}
+    
 static const int constDownloadFailed=-1;
 static const int constInterfaceCheck=5*1000;
 
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/JobRunner.h \
#1031364:1031365 @@ -85,6 +85,8 @@
     ~CJobRunner();
 
     static FontInstInterface * dbus();
+    static void startDbusService();
+
     static KUrl encode(const QString &family, quint32 style, bool system);
 
     static void     getAssociatedUrls(const KUrl &url, KUrl::List &list, bool \
                afmAndPfm, QWidget *widget);
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp \
#1031364:1031365 @@ -185,6 +185,7 @@
     KGlobal::locale()->insertCatalog(KFI_CATALOGUE);
     KIconLoader::global()->addAppDir(KFI_NAME);
     KIconLoader::global()->reconfigure(KFI_NAME, KGlobal::dirs());
+    CJobRunner::startDbusService();
 
     KAboutData *about = new KAboutData("fontinst", 0, ki18n("KDE Font Installer"), \
                0, KLocalizedString(),
                                        KAboutData::License_GPL, ki18n("(C) Craig \
                Drummond, 2000 - 2009"));
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kio/FontInstInterface.cpp \
#1031364:1031365 @@ -28,6 +28,7 @@
 #include <QtCore/QCoreApplication>
 #include <KDE/KDebug>
 #include <kio/global.h>
+#include "config-fontinst.h"
 
 #define KFI_DBUG kDebug(7000) << '(' << time(NULL) << ')'
 
@@ -52,6 +53,9 @@
     connect(itsInterface, SIGNAL(status(int, int)), SLOT(status(int, int)));
     connect(itsInterface, SIGNAL(fontList(int, const QList<KFI::Families> &)), \
                SLOT(fontList(int, const QList<KFI::Families> &)));
     connect(itsInterface, SIGNAL(fontStat(int, const KFI::Family &)), \
SLOT(fontStat(int, const KFI::Family &))); +    
+    if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName()))
 +        QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"));
 }
 
 FontInstInterface::~FontInstInterface()
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/viewpart/FontViewPart.cpp \
#1031364:1031365 @@ -60,6 +60,7 @@
 #include <KDE/KPluginFactory>
 #include <KDE/KPluginLoader>
 #include <KDE/KStandardAction>
+#include "config-fontinst.h"
 
 // Enable the following to allow printing of non-installed fonts. Does not seem to \
work :-(  //#define KFI_PRINT_APP_FONTS
@@ -488,6 +489,8 @@
 {
     if(itsFontDetails.family.isEmpty())
     {
+        if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName()))
 +            QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"));
  itsInstallButton->setEnabled(false);
         itsInterface->stat(itsPreview->engine()->descriptiveName(), \
FontInst::SYS_MASK|FontInst::USR_MASK, getpid());  }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic