diff --git a/Makefile.am b/Makefile.am index 3e5d0f7296035b5629ce4055fb593b06088944ff..92fb4adb8c24630113ee8171bfe6bd3c21709cc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = utilspp stund src skins rings pixmaps +SUBDIRS = utilspp stund src rings diff --git a/configure.ac b/configure.ac index ee3e3463bbe1730cb486082725b07c3c7554a331..1bdabe8470af4d59def2e9f80626d532109fe92e 100644 --- a/configure.ac +++ b/configure.ac @@ -195,16 +195,11 @@ src/audio/pacpp/source/Makefile \ src/audio/pacpp/source/portaudiocpp/Makefile \ src/config/Makefile \ src/gui/Makefile \ -src/gui/qt/Makefile \ src/gui/server/Makefile \ src/zeroconf/Makefile \ utilspp/Makefile \ utilspp/functor/Makefile \ utilspp/singleton/Makefile \ stund/Makefile \ -pixmaps/Makefile \ -skins/Makefile \ -skins/emetal/Makefile \ -skins/metal/Makefile \ rings/Makefile \ ) diff --git a/src/Makefile.am b/src/Makefile.am index 9c65566e5a076aff6800809cd6f4ba81c1942b4f..94f9b42afc962ab535af8fcc96dfb43f4b8f1e0f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,9 +15,9 @@ ZEROCONFFLAGS = endif sflphone_SOURCES = call.cpp eventthread.cpp error.cpp main.cpp sipvoiplink.cpp voIPLink.cpp \ - sipcall.cpp skin.cpp managerimpl.cpp managerimpl.h manager.h global.h \ + sipcall.cpp managerimpl.cpp managerimpl.h manager.h global.h \ eventthread.h error.h \ - sipvoiplink.h user_cfg.h call.h phonegi-bin.h voIPLink.h sipcall.h skin.h \ + sipvoiplink.h user_cfg.h call.h voIPLink.h sipcall.h \ ${maintener_source} observer.cpp diff --git a/src/audio/tonegenerator.cpp b/src/audio/tonegenerator.cpp index 2191c690987f9b2902cc5660e2d0c2f7ca10a7c9..7c2a5bc4d9ca0bc91bbd832521a7e892d69f866c 100644 --- a/src/audio/tonegenerator.cpp +++ b/src/audio/tonegenerator.cpp @@ -60,6 +60,7 @@ ToneThread::run (void) { unsigned int pause = (size) / SAMPLING_RATE; ManagerImpl& manager = Manager::instance(); + manager.getAudioDriver()->mainSndRingBuffer().flush(); while (!testCancel()) { // Create a new stereo buffer with the volume adjusted diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index e4e751dc8b87ccdc3c541aef14ce286457af596d..3ce1285f1ef1e1ef1c1f9a24f644446f78ed187d 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -10,7 +10,7 @@ serverlib = qt/libsflphoneqt.la endif -SUBDIRS = $(officialdir) $(serverdir) +SUBDIRS = $(serverdir) noinst_LTLIBRARIES = libguiframework.la diff --git a/src/gui/official/Call.cpp b/src/gui/official/Call.cpp index 2c14645f5a8e20e7ddf70b832c3a4d5b8872fe23..8055930461952ce2cab8b70ca22922763d95447d 100644 --- a/src/gui/official/Call.cpp +++ b/src/gui/official/Call.cpp @@ -50,6 +50,7 @@ QString Call::call(const QString &to) { std::list< QString> args; + args.push_back("acc1"); args.push_back(mId); args.push_back(to); return Requester::instance().send(mSessionId, "call", args); diff --git a/src/gui/official/PhoneLineManagerImpl.cpp b/src/gui/official/PhoneLineManagerImpl.cpp index 3cfe7968638694a1d7d952251e5e3bd34d891233..f7189827a410c6cdb843184ea3e7616a9c6645ff 100644 --- a/src/gui/official/PhoneLineManagerImpl.cpp +++ b/src/gui/official/PhoneLineManagerImpl.cpp @@ -17,9 +17,12 @@ PhoneLineManagerImpl::PhoneLineManagerImpl() , mCurrentLine(NULL) , mIsInitialized(false) { + // TODO: 000 EventFactory::instance().registerEvent< CallRelatedEvent >("000"); EventFactory::instance().registerEvent< IncommingEvent >("001"); EventFactory::instance().registerEvent< HangupEvent >("002"); + // TODO: 020 + EventFactory::instance().registerEvent< CallRelatedEvent >("020"); EventFactory::instance().registerEvent< TryingStatus >("110"); EventFactory::instance().registerEvent< RingingStatus >("111"); EventFactory::instance().registerEvent< HoldStatus >("112"); diff --git a/src/gui/qt/Makefile.am b/src/gui/qt/Makefile.am index 6184e4119083770a152a2d8a8ab41d4f22942f21..8b2855da5fddc728fe86f5cbd1d7c5dfc73a7017 100644 --- a/src/gui/qt/Makefile.am +++ b/src/gui/qt/Makefile.am @@ -28,7 +28,8 @@ libsflphoneqt_la_SOURCES = \ transqwidget.cpp \ trayicon_x11.cpp \ vector.cpp \ - volumecontrol.cpp + volumecontrol.cpp \ + skin.cpp skin.h CLEANFILES = \ diff --git a/src/gui/qt/configurationpanel.ui.h b/src/gui/qt/configurationpanel.ui.h index 815be7c96bff622ccad09f77694be6080dad492d..920f25f32109339824a640acd5408ef81460442d 100644 --- a/src/gui/qt/configurationpanel.ui.h +++ b/src/gui/qt/configurationpanel.ui.h @@ -14,7 +14,7 @@ #include "../../global.h" #include "../../manager.h" -#include "../../skin.h" +#include "skin.h" #include "../../user_cfg.h" #include "../../audio/audiolayer.h" #include "qjlistboxpixmap.h" diff --git a/src/gui/qt/jpushbutton.cpp b/src/gui/qt/jpushbutton.cpp index 4259b5acc695e27c99b33794c56b1891ac0a8d18..67f1d555a339c7b5176e835af5830d5b5504ab06 100644 --- a/src/gui/qt/jpushbutton.cpp +++ b/src/gui/qt/jpushbutton.cpp @@ -27,7 +27,7 @@ #include <qevent.h> #include "jpushbutton.h" -#include "../../skin.h" +#include "skin.h" #include "qtGUImainwindow.h" // This is the default constructor, it must be called with pixname being diff --git a/src/gui/qt/mydisplay.cpp b/src/gui/qt/mydisplay.cpp index 0fef0bf561d9f0fee8e534d66aee5c7da3050b2f..7a89c8a2eadbbe2b10c8fbebba2347f29bc064aa 100644 --- a/src/gui/qt/mydisplay.cpp +++ b/src/gui/qt/mydisplay.cpp @@ -25,7 +25,7 @@ #include <stdio.h> #include <math.h> -#include "../../skin.h" +#include "skin.h" #include "mydisplay.h" #include "qtGUImainwindow.h" diff --git a/src/gui/qt/numerickeypad.cpp b/src/gui/qt/numerickeypad.cpp index 21f4fb5e10fba68977add740ed5df72fc1b4976f..3f95a6ab5a3500eeb37dac58640dbe43700aecc7 100644 --- a/src/gui/qt/numerickeypad.cpp +++ b/src/gui/qt/numerickeypad.cpp @@ -23,7 +23,7 @@ #include "jpushbutton.h" #include "numerickeypad.h" #include "qtGUImainwindow.h" -#include "../../skin.h" +#include "skin.h" using namespace std; diff --git a/src/gui/qt/point.cpp b/src/gui/qt/point.cpp index d5be368fc47c457d368c0d126db54eb864e84101..1e0a7c4d0ddb6768bfdc002eb2a2dca4d7b9d6d0 100644 --- a/src/gui/qt/point.cpp +++ b/src/gui/qt/point.cpp @@ -20,7 +20,7 @@ #include "point.h" #include <string> -#include "../../skin.h" +#include "skin.h" #include <iostream> using namespace std; diff --git a/src/gui/qt/qtGUImainwindow.cpp b/src/gui/qt/qtGUImainwindow.cpp index 5e7804d484fab52d4187b138aa4fac53ee340ff5..504faf9f982b77b6f8f14eaec1287c3aeba0c35f 100644 --- a/src/gui/qt/qtGUImainwindow.cpp +++ b/src/gui/qt/qtGUImainwindow.cpp @@ -38,7 +38,7 @@ #include "../../global.h" #include "../../manager.h" #include "../../user_cfg.h" -#include "../../skin.h" +#include "skin.h" #include "configurationpanelui.h" #include "jpushbutton.h" #include "mydisplay.h" diff --git a/src/gui/qt/qtGUImainwindow.h b/src/gui/qt/qtGUImainwindow.h index 92826bf25d458198db79e2367a7409082c48dfed..25bfe0c0a28ddcebc74fb12bdf35511f2601d2e2 100644 --- a/src/gui/qt/qtGUImainwindow.h +++ b/src/gui/qt/qtGUImainwindow.h @@ -25,7 +25,7 @@ #include <qpopupmenu.h> #include <qwidget.h> -#include "../../skin.h" +#include "skin.h" #include "../guiframework.h" #include "configurationpanelui.h" #include "phoneline.h" diff --git a/src/gui/qt/volumecontrol.cpp b/src/gui/qt/volumecontrol.cpp index f353b9dc63b49f06c3e055fbe014a8cf191749d7..7d0b99c89a8b48358501b2542eed7d9be62dade9 100644 --- a/src/gui/qt/volumecontrol.cpp +++ b/src/gui/qt/volumecontrol.cpp @@ -23,7 +23,7 @@ #include "qtGUImainwindow.h" #include "vector.h" #include "volumecontrol.h" -#include "../../skin.h" +#include "skin.h" VolumeControl::VolumeControl (QWidget *parent, const char *name, const char* pixname, Vector *v) : JPushButton(parent, name, pixname) { diff --git a/src/gui/server/request.h b/src/gui/server/request.h index 981838bf0d3c39bf58bb0b9b9b7f9d9edee25fdd..6e62afbefe10e7cda14e08996f737bb634fa014f 100644 --- a/src/gui/server/request.h +++ b/src/gui/server/request.h @@ -69,7 +69,7 @@ public: _account = *iter; _argList.pop_front(); iter = _argList.begin(); - if (iter != _argList.end()) { + if (iter != _argList.end() && iter->length() != 0) { _callId = *iter; iter++; // last arg is the destination diff --git a/src/skin.cpp b/src/skin.cpp deleted file mode 100644 index b4d98092612bd11a6019b3b1423bcc92b142401f..0000000000000000000000000000000000000000 --- a/src/skin.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Laurielle Lea <laurielle.lea@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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include "skin.h" - - -const char* PIXMAP_LINE_NAMES[] = { - PIXMAP_LINE0_OFF, - PIXMAP_LINE0_BUSY, - PIXMAP_LINE1_OFF, - PIXMAP_LINE1_BUSY, - PIXMAP_LINE2_OFF, - PIXMAP_LINE2_BUSY, - PIXMAP_LINE3_OFF, - PIXMAP_LINE3_BUSY, - PIXMAP_LINE4_OFF, - PIXMAP_LINE4_BUSY, - PIXMAP_LINE5_OFF, - PIXMAP_LINE5_BUSY, -}; - -Skin::Skin (void) { -} - -Skin::~Skin (void) { -} - -string -Skin::getPath (const string & prefix, const string & progname, - const string & skindir, const string & skin, - const string & filename) { - return (prefix + "/" + progname + "/" + skindir + "/" + skin + "/" + - filename); -} - -string -Skin::getPath (const string & skindir, const string & skintype, - const string & filename) { - return (string(PROGSHAREDIR) + "/" + skindir + "/" + skintype + "/" + filename); -} - -string -Skin::getPath (const string & dir) { - return (string(PROGSHAREDIR) + "/" + dir); -} - -string -Skin::getPathPixmap (const string & pixdir, const string & filename) { - return (string(PROGSHAREDIR) + "/" + pixdir + "/" + filename); -} - -string -Skin::getPathRing (const string & ringdir, const string & filename) { - return (string(PROGSHAREDIR) + "/" + ringdir + "/" + filename); -} - -// EOF diff --git a/src/skin.h b/src/skin.h deleted file mode 100644 index 025a0bcfbda31dac1756cb253cb542b7d1e5b72e..0000000000000000000000000000000000000000 --- a/src/skin.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Laurielle Lea <laurielle.lea@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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SKIN_H__ -#define __SKIN_H__ - -#include <string> - -#include "global.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define PIXMAP_PHONE "main.png" -#define PIXMAP_KEYPAD "dtmf_main.png" -#define PIXMAP_SCREEN "screen_main.png" -#define PIXMAP_OVERSCREEN "overscreen.png" -#define PIXMAP_VOLUME "volume.png" - -#define PIXMAP_IS_RINGING "ring.png" -#define PIXMAP_NO_RINGING "no_ring.png" -#define PIXMAP_MESSAGE_ON "voicemail_on.png" -#define PIXMAP_MESSAGE_OFF "voicemail_off.png" -#define PIXMAP_LINE0_OFF "l1_off.png" -#define PIXMAP_LINE1_OFF "l2_off.png" -#define PIXMAP_LINE2_OFF "l3_off.png" -#define PIXMAP_LINE3_OFF "l4_off.png" -#define PIXMAP_LINE4_OFF "l5_off.png" -#define PIXMAP_LINE5_OFF "l6_off.png" -#define PIXMAP_LINE0_BUSY "l1_on.png" -#define PIXMAP_LINE1_BUSY "l2_on.png" -#define PIXMAP_LINE2_BUSY "l3_on.png" -#define PIXMAP_LINE3_BUSY "l4_on.png" -#define PIXMAP_LINE4_BUSY "l5_on.png" -#define PIXMAP_LINE5_BUSY "l6_on.png" - -#define LINE1 "l1" -#define LINE2 "l2" -#define LINE3 "l3" -#define LINE4 "l4" -#define LINE5 "l5" -#define LINE6 "l6" - -#define VOICEMAIL "voicemail" -#define DIRECTORY "directory" -#define CONFERENCE "conference" -#define TRANSFER "transfer" -#define CLOSE "close" -#define MINIMIZE "minimize" -#define SETUP "setup" -#define HANGUP "hangup" -#define CONNECT "ok" -#define MUTE "mute" -#define DTMF_SHOW "dtmf" -#define VOLUME "volume" -#define VOL_MIC "vol_mic" -#define VOL_SPKR "vol_spkr" -#define SCREEN "screen" - -#define DTMF_0 "dtmf_0" -#define DTMF_1 "dtmf_1" -#define DTMF_2 "dtmf_2" -#define DTMF_3 "dtmf_3" -#define DTMF_4 "dtmf_4" -#define DTMF_5 "dtmf_5" -#define DTMF_6 "dtmf_6" -#define DTMF_7 "dtmf_7" -#define DTMF_8 "dtmf_8" -#define DTMF_9 "dtmf_9" -#define DTMF_STAR "dtmf_star" -#define DTMF_POUND "dtmf_pound" -#define DTMF_CLOSE "dtmf_close" - - -extern const char* PIXMAP_LINE_NAMES[]; - -#define PIXMAP_LINE(n,t) PIXMAP_LINE_NAMES[2*n+t] -// n = {0..3} and t = {FREE, BUSY, ONHOLD} - -#define FILE_INI "skin.ini" - -#ifdef __cplusplus -} -#endif - -using namespace std; - -class Skin { -public: - Skin (void); - ~Skin (void); - - static string getPath(const string &, const string &, const string &, - const string &, const string &); - static string getPath(const string &,const string &, const string &); - static string getPath(const string &); - static string getPathPixmap (const string &, const string &); - static string getPathRing (const string &, const string &); -}; - -#endif // __SKIN_H__