Skip to content
Snippets Groups Projects
Commit d1e1ac63 authored by Jérémy Quentin's avatar Jérémy Quentin
Browse files

[#1034] The KDE client should start sflphoned if it is not started

parent 3682940c
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ SFLPhone::SFLPhone(QWidget *parent)
: KXmlGuiWindow(parent),
view(new sflphone_kdeView(this))
{
// accept dnd
setAcceptDrops(true);
......
/***************************************************************************
* Copyright (C) 2009 by Savoir-Faire Linux *
* Author : Jérémy Quentin *
* jeremy.quentin@savoirfairelinux.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "callmanager_interface_singleton.h"
......@@ -9,16 +30,9 @@ CallManagerInterface * CallManagerInterfaceSingleton::interface
CallManagerInterface & CallManagerInterfaceSingleton::getInstance(){
if(!interface){
interface = new CallManagerInterface(
"org.sflphone.SFLphone",
"/org/sflphone/SFLphone/CallManager",
QDBusConnection::sessionBus());
}
if(!interface->isValid())
if(!interface->connection().isConnected())
{
throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From call manager interface.";
}
return *interface;
}
/***************************************************************************
* Copyright (C) 2009 by Savoir-Faire Linux *
* Author : Jérémy Quentin *
* jeremy.quentin@savoirfairelinux.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef CALL_MANAGER_INTERFACE_SINGLETON_H
#define CALL_MANAGER_INTERFACE_SINGLETON_H
......@@ -12,7 +33,6 @@ private:
public:
//TODO verifier pointeur ou pas pour singleton en c++
static CallManagerInterface & getInstance();
};
......
#include "configurationmanager_interface_singleton.h"
/***************************************************************************
* Copyright (C) 2009 by Savoir-Faire Linux *
* Author : Jérémy Quentin *
* jeremy.quentin@savoirfairelinux.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "configurationmanager_interface_singleton.h"
ConfigurationManagerInterface * ConfigurationManagerInterfaceSingleton::interface = new ConfigurationManagerInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager", QDBusConnection::sessionBus());
ConfigurationManagerInterface * ConfigurationManagerInterfaceSingleton::interface
= new ConfigurationManagerInterface(
"org.sflphone.SFLphone",
"/org/sflphone/SFLphone/ConfigurationManager",
QDBusConnection::sessionBus());
ConfigurationManagerInterface & ConfigurationManagerInterfaceSingleton::getInstance(){
if(!interface){
interface = new ConfigurationManagerInterface("org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager", QDBusConnection::sessionBus());
}
if(!interface->isValid())
if(!interface->connection().isConnected())
{
throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From configuration manager interface.";
}
return *interface;
}
\ No newline at end of file
/***************************************************************************
* Copyright (C) 2009 by Savoir-Faire Linux *
* Author : Jérémy Quentin *
* jeremy.quentin@savoirfairelinux.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef CONFIGURATION_MANAGER_INTERFACE_SINGLETON_H
#define CONFIGURATION_MANAGER_INTERFACE_SINGLETON_H
......@@ -13,7 +34,6 @@ private:
public:
//TODO verifier pointeur ou pas pour singleton en c++
static ConfigurationManagerInterface & getInstance();
};
......
......@@ -18,6 +18,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "instance_interface_singleton.h"
......@@ -27,15 +28,8 @@ InstanceInterface * InstanceInterfaceSingleton::interface
"/org/sflphone/SFLphone/Instance",
QDBusConnection::sessionBus());
InstanceInterface & InstanceInterfaceSingleton::getInstance(){
if(!interface){
interface = new InstanceInterface(
"org.sflphone.SFLphone",
"/org/sflphone/SFLphone/Instance",
QDBusConnection::sessionBus());
}
if(!interface->isValid())
if(!interface->connection().isConnected())
{
throw "Error : sflphoned not connected. Service " + interface->service() + " not connected. From instance interface.";
......
......@@ -18,6 +18,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef INSTANCE_INTERFACE_SINGLETON_H
#define INSTANCE_INTERFACE_SINGLETON_H
......@@ -36,7 +37,6 @@ private:
public:
//TODO verifier pointeur ou pas pour singleton en c++
static InstanceInterface & getInstance();
};
......
......@@ -4,6 +4,7 @@
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QAction>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
......@@ -39,6 +40,8 @@ int main(int argc, char **argv)
try
{
KLocale::setMainCatalog("sflphone-client-kde");
qDebug() << KLocale::defaultLanguage();
qDebug() << KLocale::defaultCountry();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment