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

[#1417] The client should start the account creation wizard if started for the...

[#1417] The client should start the account creation wizard if started for the first time (if config file doesn't exist)
+ pod2man in debian build depends
parent 87c67b0a
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES ( ${KDE4_INCLUDES} ${QT_INCLUDES} )
INCLUDE ( ${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake )
INCLUDE( ${QT_USE_FILE} )
ADD_DEFINITIONS(${KDE4_DEFINITIONS} ${QT_DEFINITIONS} -fexceptions -DDATA_INSTALL_DIR="\\\"${DATA_INSTALL_DIR}\\\"")
ADD_DEFINITIONS(${KDE4_DEFINITIONS} ${QT_DEFINITIONS} -fexceptions -DDATA_INSTALL_DIR="\\\"${DATA_INSTALL_DIR}\\\"" )
......@@ -120,13 +120,41 @@ KDE4_ADD_EXECUTABLE(sflphone-client-kde ${sflphone_client_kde_SRCS} ${QtApp_RCC_
SET ( KDE4_KABC_LIBS -lkabc )
TARGET_LINK_LIBRARIES(sflphone-client-kde ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KABC_LIBS})
INSTALL(TARGETS sflphone-client-kde DESTINATION ${BIN_INSTALL_DIR})
# ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_CURRENT_BUILD_DIR}/sflphone.1"
# DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/man/sflphone-client-kde.pod"
# COMMAND /bin/pod2man
# ARGS --section=1 --release=${VERSION} --center "" "${CMAKE_CURRENT_SOURCE_DIR}/man/sflphone-client-kde.pod" > "${CMAKE_CURRENT_BUILD_DIR}/sflphone.1"
# COMMENT "Compiling manpage of sflphone-client-kde with pod2man")
ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_CURRENT_BUILD_DIR}/sflphone-client-kde.1"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/man/sflphone-client-kde.pod"
COMMAND /bin/pod2man
ARGS --section=1 --release=${VERSION} --center "" "${CMAKE_CURRENT_SOURCE_DIR}/man/sflphone-client-kde.pod" > "${CMAKE_CURRENT_BUILD_DIR}/sflphone-client-kde.1"
COMMENT "Compiling manpage of sflphone-client-kde with pod2man")
########### install files ###############
SET ( HANDBOOK_INSTALL_DIR /usr/share/doc/kde/HTML )
SET ( MANPAGES_INSTALL_DIR /usr/share/man )
INSTALL(TARGETS sflphone-client-kde DESTINATION ${BIN_INSTALL_DIR})
INSTALL( FILES sflphone-client-kde.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
# INSTALL( FILES sflphone_kde.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
INSTALL( FILES sflphone-client-kdeui.rc DESTINATION ${DATA_INSTALL_DIR}/sflphone-client-kde )
#INSTALL ( CODE "FILE(MAKE_DIRECTORY ${HTML_INSTALL_DIR}/en/sflphone-client-kde)" )
#INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/ DESTINATION ${HTML_INSTALL_DIR} )
INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/ DESTINATION ${HANDBOOK_INSTALL_DIR} )
#KDE4_CREATE_MANPAGE( ${CMAKE_CURRENT_SOURCE_DIR}/doc/en/sflphone-client-kde/index.docbook INSTALL_DESTINATION ${MAN_INSTALL_DIR} SUBDIR )
#INSTALL ( CODE "FILE(MAKE_DIRECTORY ${HTML_INSTALL_DIR}/en/sflphone-client-kde)" )
#INSTALL( FILES ${CMAKE_CURRENT_BUILD_DIR}/sflphone.1 ${CMAKE_CURRENT_SOURCE_DIR}/man/sflphone-client-kde.1 DESTINATION ${MANPAGES_INSTALL_DIR}/man1 )
INSTALL( FILES ${CMAKE_CURRENT_BUILD_DIR}/sflphone-client-kde.1 DESTINATION ${MANPAGES_INSTALL_DIR}/man1 )
#INSTALL ( CODE "MESSAGE (\"ton pere\")" )
\ No newline at end of file
......@@ -42,14 +42,12 @@ ConfigurationDialog::ConfigurationDialog(sflphone_kdeView *parent) : QDialog(par
//TODO ajouter les items de l'interface audio ici avec les constantes
//configuration dbus
registerCommTypes();
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
connect(&configurationManager, SIGNAL(accountsChanged()),
this, SLOT(on1_accountsChanged()));
// connect(&configurationManager, SIGNAL(accountsChanged()),
// this, SLOT(on1_accountsChanged()));
loadOptions();
......@@ -134,7 +132,7 @@ void ConfigurationDialog::loadOptions()
comboBox1_alsaPlugin->clear();
QStringList pluginList = configurationManager.getOutputAudioPluginList();
comboBox1_alsaPlugin->addItems(pluginList);
comboBox1_alsaPlugin->setCurrentIndex(comboBox1_alsaPlugin->findText(configurationManager.getCurrentAudioOutputPlugin()));
//comboBox1_alsaPlugin->setCurrentIndex(comboBox1_alsaPlugin->findText(configurationManager.getCurrentAudioOutputPlugin()));
QStringList devices = configurationManager.getCurrentAudioDevicesIndex();
......@@ -376,7 +374,10 @@ void ConfigurationDialog::loadAccount(QListWidgetItem * item)
QString protocolsTab[] = ACCOUNT_TYPES_TAB;
QList<QString> * protocolsList = new QList<QString>();
for(int i=0;i<sizeof(protocolsTab)/sizeof(QString);i++) protocolsList->append(protocolsTab[i]);
for(int i = 0 ; i < (int) (sizeof(protocolsTab) / sizeof(QString)) ; i++)
{
protocolsList->append(protocolsTab[i]);
}
QString accountName = account->getAccountDetail(ACCOUNT_TYPE);
int protocolIndex = protocolsList->indexOf(accountName);
delete protocolsList;
......@@ -536,7 +537,8 @@ void ConfigurationDialog::updateCodecListCommands()
void ConfigurationDialog::on_edit1_alias_textChanged(const QString & text)
{
qDebug() << "on_edit1_alias_textChanged";
//listWidget_accountList->currentItem()->setText(text);
Account * account = accountList->getAccountByItem(listWidget_accountList->currentItem());
account->setItemText(text);
}
void ConfigurationDialog::on_spinBox_SIPPort_valueChanged ( int value )
......@@ -609,21 +611,14 @@ void ConfigurationDialog::on_button_accountUp_clicked()
void ConfigurationDialog::on_button_accountDown_clicked()
{
qDebug() << "on_button_accountDown_clicked";
int currentRow = listWidget_accountList->currentRow();
qDebug() << "on_button_accountDown_clicked1";
QListWidgetItem * prevItem = listWidget_accountList->takeItem(currentRow);
qDebug() << "on_button_accountDown_clicked2";
Account * account = accountList->getAccountByItem(prevItem);
QListWidgetItem * item = account->renewItem();
delete prevItem;
qDebug() << "on_button_accountDown_clicked3";
listWidget_accountList->insertItem(currentRow + 1 , item);
qDebug() << "on_button_accountDown_clicked4 : " << account->getAlias() << " " << account->getItemWidget();
listWidget_accountList->setItemWidget(item, account->getItemWidget());
qDebug() << "on_button_accountDown_clicked5";
listWidget_accountList->setCurrentItem(item);
qDebug() << "on_button_accountDown_clicked6";
}
void ConfigurationDialog::on_button_accountAdd_clicked()
......
......@@ -2,7 +2,7 @@ Source: sflphone-client-kde
Maintainer: SavoirFaireLinux Inc <jeremy.quentin@savoirfairelinux.com>
Section: kde
Priority: optional
Build-Depends: debhelper (>= 5), cmake (>=2.6), kdepimlibs5-dev (>=4.1.4), libcommoncpp2-dev (>=1.6.2)
Build-Depends: debhelper (>= 5), cmake (>=2.6), kdepimlibs5-dev (>=4.1.4), libcommoncpp2-dev (>=1.6.2), pod2man
Standards-Version: 3.7.3
Package: sflphone-client-kde
......
......@@ -2,7 +2,7 @@ Source: sflphone-client-kde
Maintainer: SavoirFaireLinux Inc <jeremy.quentin@savoirfairelinux.com>
Section: kde
Priority: optional
Build-Depends: debhelper (>= 5), cmake (>=2.6), kdepimlibs5-dev (>=4.1.4), libcommoncpp2-dev (>=1.6.2)
Build-Depends: debhelper (>= 5), cmake (>=2.6), kdepimlibs5-dev (>=4.1.4), libcommoncpp2-dev (>=1.6.2), pod2man
Standards-Version: 3.7.3
Package: sflphone-client-kde
......
......@@ -14,7 +14,7 @@
#include "instance_interface_singleton.h"
#include "sflphone_const.h"
static const char description[] = I18N_NOOP("A KDE 4 Client for SflPhone");
static const char description[] = I18N_NOOP("A KDE 4 Client for SFLPhone");
static const char version[] = "0.9.5";
......@@ -38,13 +38,11 @@ int main(int argc, char **argv)
try
{
InstanceInterface & instance = InstanceInterfaceSingleton::getInstance();
instance.Register(getpid(), APP_NAME);
KAboutData about(
"sflphone-client-kde",
0,
ki18n("sflphone KDE client"),
ki18n("SFLPhone KDE Client"),
version,
ki18n(description),
KAboutData::License_GPL,
......@@ -60,6 +58,19 @@ int main(int argc, char **argv)
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
//configuration dbus
registerCommTypes();
if(!QFile(QDir::homePath() + CONFIG_FILE_PATH).exists())
{
(new AccountWizard())->show();
}
InstanceInterface & instance = InstanceInterfaceSingleton::getInstance();
instance.Register(getpid(), APP_NAME);
SFLPhone * fenetre = new SFLPhone();
QString locale = QLocale::system().name();
......
......@@ -6,7 +6,7 @@
# Exec=kapp4 %i -caption "%c"
# Icon=kapp4
Type=Application
X-DocPath=sflphone-client-kde/index.docbook
X-DocPath=sflphone-client-kde/index.html
# GenericName=A KDE4 Application
# GenericName[ca]=Una aplicació del KDE4
# GenericName[da]=Et KDE4-program
......
......@@ -47,6 +47,7 @@
#define CONTACT_ITEM_HEIGHT 40
#define CONFIG_FILE_PATH "/.sflphone/sflphonedrc"
#define ACTION_LABEL_CALL tr2i18n("Call")
#define ACTION_LABEL_HANG_UP tr2i18n("Hang up")
......
......@@ -79,6 +79,7 @@ sflphone_kdeView::sflphone_kdeView(QWidget *parent)
loadWindow();
}
sflphone_kdeView::~sflphone_kdeView()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment