From 68459712b951c96ceed3776c19c34251766a71cf Mon Sep 17 00:00:00 2001 From: yanmorin <yanmorin> Date: Wed, 5 Oct 2005 13:17:29 +0000 Subject: [PATCH] Move skin.h from common directory to qt directory Remove skins/ pixmaps from compilation --- Makefile.am | 2 +- configure.ac | 5 - src/Makefile.am | 4 +- src/audio/tonegenerator.cpp | 1 + src/gui/Makefile.am | 2 +- src/gui/official/Call.cpp | 1 + src/gui/official/PhoneLineManagerImpl.cpp | 3 + src/gui/qt/Makefile.am | 3 +- src/gui/qt/configurationpanel.ui.h | 2 +- src/gui/qt/jpushbutton.cpp | 2 +- src/gui/qt/mydisplay.cpp | 2 +- src/gui/qt/numerickeypad.cpp | 2 +- src/gui/qt/point.cpp | 2 +- src/gui/qt/qtGUImainwindow.cpp | 2 +- src/gui/qt/qtGUImainwindow.h | 2 +- src/gui/qt/volumecontrol.cpp | 2 +- src/gui/server/request.h | 2 +- src/skin.cpp | 74 -------------- src/skin.h | 118 ---------------------- 19 files changed, 20 insertions(+), 211 deletions(-) delete mode 100644 src/skin.cpp delete mode 100644 src/skin.h diff --git a/Makefile.am b/Makefile.am index 3e5d0f7296..92fb4adb8c 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 ee3e3463bb..1bdabe8470 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 9c65566e5a..94f9b42afc 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 2191c69098..7c2a5bc4d9 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 e4e751dc8b..3ce1285f1e 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 2c14645f5a..8055930461 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 3cfe796863..f7189827a4 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 6184e41190..8b2855da5f 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 815be7c96b..920f25f321 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 4259b5acc6..67f1d555a3 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 0fef0bf561..7a89c8a2ea 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 21f4fb5e10..3f95a6ab5a 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 d5be368fc4..1e0a7c4d0d 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 5e7804d484..504faf9f98 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 92826bf25d..25bfe0c0a2 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 f353b9dc63..7d0b99c89a 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 981838bf0d..6e62afbefe 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 b4d9809261..0000000000 --- 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 025a0bcfbd..0000000000 --- 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__ -- GitLab