Skip to content
Snippets Groups Projects
Commit 2e82b778 authored by Pierre-Luc Beaudoin's avatar Pierre-Luc Beaudoin
Browse files

Merge commit 'origin/master'

parents c0ffee7b bf52db50
No related branches found
No related tags found
No related merge requests found
Showing
with 284 additions and 78 deletions
...@@ -4,4 +4,11 @@ ...@@ -4,4 +4,11 @@
About About
===== =====
SFLphone is a mega phone. We like it. SFLphone is meant to be a robust enterprise-class desktop phone. It is design
with a hundred-calls-a-day receptionist in mind. It can work for you, too.
SFLphone is released under the *GNU General Public License* (GPLv2 and up).
SFLphone is being developed by the global community, and maintained by
http://www.savoirfairelinux.com[Savoir-faire Linux], a Montreal,
Quebec, Canada-based Linux consulting company.
...@@ -2,16 +2,30 @@ ...@@ -2,16 +2,30 @@
Build notes Build notes
----------- ===========
sflphoned sflphoned
~~~~~~~~~ ---------
Instructions to build `sflphoned`: Instructions to build `sflphoned`:
dbus-c++-bindings
~~~~~~~~~~~~~~~~~
Go to `libs/dbus` and run:
-------------------------
./autogen.sh
./configure --prefix=/usr
make
sudo make install
-------------------------
NOTE: If you have `colorgcc`, configure will *fail* on `libeXpat`. Issue an `unset CC` and `unset CXX` to build the dbus bindings.
libiax2 libiax2
^^^^^^^ ~~~~~~~
Go to `libs/libiax2` and run: Go to `libs/libiax2` and run:
...@@ -22,11 +36,12 @@ sudo make install ...@@ -22,11 +36,12 @@ sudo make install
------------------------- -------------------------
the daemon the daemon
^^^^^^^^^^ ~~~~~~~~~~
Then, go to the root of the repository, and run: Then, go to the root of the repository, and run:
--------------------------------------------------- ---------------------------------------------------
autoreconf --install
./configure --prefix=/usr (or whatever your prefix) ./configure --prefix=/usr (or whatever your prefix)
make make
sudo make install sudo make install
...@@ -34,13 +49,20 @@ sudo make install ...@@ -34,13 +49,20 @@ sudo make install
sflphone-qt sflphone-qt
~~~~~~~~~~~ -----------
`sflphone-qt` gets built with sflphoned, for now. `sflphone-qt` is *deprecated* and should not be built anymore.
sflphone-gtk sflphone-gtk
~~~~~~~~~~~~ ------------
Merging of `sflphone-gtk` to come. Compile `sflphone-gtk` by running:
-------------------------
cd sflphone-gtk
gnome-autogen.sh
./configure --prefix=/usr
make
sudo make install
-------------------------
...@@ -15,6 +15,20 @@ libosip2 2.2.2 http://www.gnu.org/software/osip/[website] ...@@ -15,6 +15,20 @@ libosip2 2.2.2 http://www.gnu.org/software/osip/[website]
portaudio v19 http://www.portaudio.com/[website] portaudio v19 http://www.portaudio.com/[website]
portaudio C++ binds. http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz[archive] portaudio C++ binds. http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz[archive]
libsamplerate 0.1.2 http://www.mega-nerd.com/SRC/[website] libsamplerate 0.1.2 http://www.mega-nerd.com/SRC/[website]
dbus-c++-1 0.5 See Build notes.
libexpat1 1.95.8 Packaged with your favorite distribution
-------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------
Dependencies to compile SFLphone-GTK
------------------------------------
`--------------------`----------`-----------------------------------------------------
Program Version Notes
--------------------------------------------------------------------------------------
libgtk2.0 2.2
dbus-glib 0.35
--------------------------------------------------------------------------------------
// AsciiDoc
Downloads
=========
Latest release:
[grid="all"]
`--------------------`----------`---------------------------
Package Type Link
------------------------------------------------------------
*SFLphone 0.7.2* Sources http://www.sflphone.org/releases/sflphone-0.7.2.tar.gz[Download] sflfile:Build.txt[Build notes]
FC6-RPM http://www.sflphone.org/releases/packages/rpm-fc6/sflphone-0.7.2-1.i386.rpm[Download]
RC6-SRPM http://www.sflphone.org/releases/packages/rpm-fc6/devel/sflphone-0.7.2-1.src.rpm[Download]
*SFLphone 0.7.0* Source http://www.sflphone.org/releases/sflphone-0.7.0.tar.gz[Download]
FC4-RPM http://www.sflphone.org/releases/packages/rpm-fc4/sflphone-0.7.0-1.i386.rpm[Download]
FC4-SRPM http://www.sflphone.org/releases/packages/rpm-fc4/devel/sflphone-0.7.0-1.src.rpm[Download]
------------------------------------------------------------
Latest source code
------------------
See the sflfile:Git_Access.txt[repository access] page for the latest source
code.
...@@ -5,16 +5,14 @@ Git anonymous access ...@@ -5,16 +5,14 @@ Git anonymous access
-------------------- --------------------
To grab source code form SFLphone's git repository:
To access SFLphone's git repository (read-only):
--------------------------------------------- ---------------------------------------------
git clone git://sflphone.org/git/sflphone.git git clone git://sflphone.org/git/sflphone.git
cd sflphone cd sflphone
autoreconf --install
--------------------------------------------- ---------------------------------------------
View sflsite:build[build notes] for more details.
......
//AsciiDoc file
Goals
-----
[insert goals]
// AsciiDoc file
IRC
===
Server:: `irc.freenode.org`
Channel:: `#sflphone`
// AsciiDoc file
Mailing lists
=============
sflphone-user
-------------
http://pouetpouet.list.com[subscribe] http://pouetpouet2.list.com[unsubscribe]
http://pouetpouet6.list.com[archives]
sflphone-devel
--------------
http://pouetpouet3.list.com[subscribe] http://pouetpouet4.list.com[unsubscribe]
http://pouetpouet5.list.com[archives]
...@@ -3,5 +3,7 @@ ...@@ -3,5 +3,7 @@
News News
==== ====
* News 1 September 2007:: A new Gtk+ client is being written, to play with the new D-BUS client/server interface. See sflsite:screenshots[]. Upcoming release 0.8.0.
* News 2
July 2007:: *Pierre-Luc Beaudoin* and *Alexandre Bourget* have taken the lead of maintenance and development of SFLphone.
// AsciiDoc file // AsciiDoc file
Screenshots Screenshots of upcoming releases
----------- --------------------------------
.Screenshot de 2007 This is an upcoming client, to be released with version 0.8.
sflimage::images/SflphonePOuetpoUEt.png[SFLphone qt3]
.Screenshot de SFLphone 0.7 .New SFLphone-GTK client (ver. 0.8)
sflimage::images/sflphone0.7.png[SFLphone 0.7] sflimage::images/screenshots/sflphone_gtk_0.8.png[New SFLphone GTK client]
Historical screenshots
----------------------
.SFLphone 0.6.2 - Brushed metal skin
sflimage::images/screenshots/sflphone_qt3_0.6.2.png[SFLphone 0.6.2]
.SFLphone 0.6 - Alternate skin
sflimage::images/screenshots/sflphone_metal.png[SFLphone 0.6]
...@@ -16,8 +16,11 @@ ...@@ -16,8 +16,11 @@
# #
ifdef::backend-xhtml11[] ifdef::backend-xhtml11[]
[sflink-inlinemacro] [sflfile-inlinemacro]
<a href="index.php?f={target}.txt">{0?{0}}{0!{target}}</a> <a href="index.php?file={target}">{0?{0}}{0!{target}}</a>
[sflsite-inlinemacro]
<a href="index.php?mod={target}">{0?{0}}{0!{target}}</a>
endif::backend-xhtml11[] endif::backend-xhtml11[]
# #
...@@ -28,7 +31,7 @@ endif::backend-xhtml11[] ...@@ -28,7 +31,7 @@ endif::backend-xhtml11[]
<a id="{id}"></a> <a id="{id}"></a>
<div class="content"> <div class="content">
<a class="image" href="{link#}"> <a class="image" href="{link#}">
<img src="index.php?i={target}" alt="{1={target}}"{1? title="{1}"}{width? width="{width}"}{height? height="{height}"}/> <img src="index.php?img={target}" alt="{1={target}}"{1? title="{1}"}{width? width="{width}"}{height? height="{height}"}/>
{link#}</a> {link#}</a>
</div> </div>
<div class="image-title">{title}</div> <div class="image-title">{title}</div>
......
...@@ -450,7 +450,7 @@ WARN_LOGFILE = ...@@ -450,7 +450,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = src src/audio src/zeroconf src/config src/gui/server src/gui INPUT = src src/audio src/zeroconf src/config src/dbus
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
......
doc/images/screenshots/sflphone_gtk_0.8.png

62 KiB

doc/images/screenshots/sflphone_metal.png

98.5 KiB

doc/images/screenshots/sflphone_qt3_0.6.2.png

65.3 KiB

...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
#define ACCOUNT_REGISTER "Account.autoregister" #define ACCOUNT_REGISTER "Account.autoregister"
#define ACCOUNT_SIP_FULL_NAME "SIP.fullName" #define ACCOUNT_SIP_FULL_NAME "SIP.fullName"
#define ACCOUNT_SIP_HOST_PART "SIP.hostPart"
#define ACCOUNT_SIP_USER_PART "SIP.userPart" #define ACCOUNT_SIP_USER_PART "SIP.userPart"
#define ACCOUNT_SIP_AUTH_NAME "SIP.username" #define ACCOUNT_SIP_AUTH_NAME "SIP.username"
#define ACCOUNT_SIP_PASSWORD "SIP.password" #define ACCOUNT_SIP_PASSWORD "SIP.password"
#define ACCOUNT_SIP_HOST_PART "SIP.hostPart"
#define ACCOUNT_SIP_PROXY "SIP.proxy" #define ACCOUNT_SIP_PROXY "SIP.proxy"
#define ACCOUNT_IAX_FULL_NAME "IAX.fullName"
#define ACCOUNT_IAX_HOST "IAX.host" #define ACCOUNT_IAX_HOST "IAX.host"
#define ACCOUNT_IAX_USER "IAX.user" #define ACCOUNT_IAX_USER "IAX.user"
#define ACCOUNT_IAX_PASS "IAX.pass" #define ACCOUNT_IAX_PASS "IAX.pass"
......
...@@ -27,20 +27,6 @@ ...@@ -27,20 +27,6 @@
/** Local variables */ /** Local variables */
account_t * currentAccount; account_t * currentAccount;
/**
* Delete an account
*/
/*static void
delete_account( GtkWidget *widget, gpointer data )
{
sflphone_remove_account(currentAccount);
}*/
void
show_account_window (account_t * a)
{
GtkDialog * dialog; GtkDialog * dialog;
GtkWidget * table; GtkWidget * table;
GtkWidget * label; GtkWidget * label;
...@@ -54,10 +40,77 @@ show_account_window (account_t * a) ...@@ -54,10 +40,77 @@ show_account_window (account_t * a)
GtkWidget * entryHostPart; GtkWidget * entryHostPart;
GtkWidget * entryUsername; GtkWidget * entryUsername;
GtkWidget * entryPassword; GtkWidget * entryPassword;
/**
* Delete an account
*/
/*static void
delete_account( GtkWidget *widget, gpointer data )
{
sflphone_remove_account(currentAccount);
}*/
/* Signal to entryProtocol 'changed' */
void
change_protocol (account_t * currentAccount)
{
gchar* proto = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(entryProtocol));
//g_print("Protocol changed\n");
// toggle sensitivity for: entryUserPart
if (strcmp(proto, "SIP") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), TRUE);
}
else if (strcmp(proto, "IAX") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), FALSE);
}
else {
// Should not get here.
g_print("Unknown protocol: %s\n", proto);
}
}
void
show_account_window (account_t * a)
{
guint response; guint response;
currentAccount = a; currentAccount = a;
// Current settings
gchar * curAccountType = NULL;
gchar * curProtocol = NULL;
gchar * curUserPart = NULL;
gchar * curHostPart = NULL;
gchar * curPassword = NULL;
gchar * curUsername = NULL;
gchar * curFullName = NULL;
/* TODO: add curProxy, and add boxes for Proxy support */
// Load from SIP/IAX/Unknown ?
curAccountType = g_hash_table_lookup(currentAccount->properties, ACCOUNT_TYPE);
if (strcmp(curAccountType, "IAX") == 0) {
curHostPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_HOST);
curPassword = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_PASS);
curUsername = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_USER);
curFullName = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_FULL_NAME);
}
else if (strcmp(curAccountType, "SIP") == 0) {
curHostPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_HOST_PART);
curPassword = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_PASSWORD);
curUsername = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_AUTH_NAME);
curFullName = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_FULL_NAME);
curUserPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_USER_PART);
}
else {
// Default values...
curAccountType = "SIP";
}
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Account settings", dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Account settings",
GTK_WINDOW(get_main_window()), GTK_WINDOW(get_main_window()),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
...@@ -108,25 +161,36 @@ show_account_window (account_t * a) ...@@ -108,25 +161,36 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryProtocol = gtk_combo_box_new_text(); entryProtocol = gtk_combo_box_new_text();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryProtocol); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryProtocol);
gtk_widget_set_sensitive( GTK_WIDGET(entryProtocol), FALSE); /* TODO When IAX is ok */ //gtk_widget_set_sensitive( GTK_WIDGET(entryProtocol), TRUE);
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "SIP"); gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "SIP");
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "IAX"); gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "IAX");
if(strcmp(g_hash_table_lookup(a->properties, ACCOUNT_TYPE), "SIP") == 0) if(strcmp(curAccountType, "SIP") == 0)
{ {
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),0); gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),0);
} }
else else if(strcmp(curAccountType, "IAX") == 0)
{ {
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),1); gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),1);
} }
else
{
/* Should never come here, add debug message. */
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "Unknown");
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),2);
}
gtk_table_attach ( GTK_TABLE( table ), entryProtocol, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryProtocol, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
/* Link signal 'changed' */
g_signal_connect (G_OBJECT (GTK_COMBO_BOX(entryProtocol)), "changed",
G_CALLBACK (change_protocol),
currentAccount);
label = gtk_label_new_with_mnemonic ("_Full Name:"); label = gtk_label_new_with_mnemonic ("_Full Name:");
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryFullName = gtk_entry_new(); entryFullName = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryFullName); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryFullName);
gtk_entry_set_text(GTK_ENTRY(entryFullName), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_FULL_NAME)); gtk_entry_set_text(GTK_ENTRY(entryFullName), curFullName);
gtk_table_attach ( GTK_TABLE( table ), entryFullName, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryFullName, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_User part:"); label = gtk_label_new_with_mnemonic ("_User part:");
...@@ -134,7 +198,7 @@ show_account_window (account_t * a) ...@@ -134,7 +198,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUserPart = gtk_entry_new(); entryUserPart = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUserPart); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUserPart);
gtk_entry_set_text(GTK_ENTRY(entryUserPart), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_USER_PART)); gtk_entry_set_text(GTK_ENTRY(entryUserPart), curUserPart);
gtk_table_attach ( GTK_TABLE( table ), entryUserPart, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryUserPart, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Host part:"); label = gtk_label_new_with_mnemonic ("_Host part:");
...@@ -142,7 +206,7 @@ show_account_window (account_t * a) ...@@ -142,7 +206,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryHostPart = gtk_entry_new(); entryHostPart = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryHostPart); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryHostPart);
gtk_entry_set_text(GTK_ENTRY(entryHostPart), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_HOST_PART)); gtk_entry_set_text(GTK_ENTRY(entryHostPart), curHostPart);
gtk_table_attach ( GTK_TABLE( table ), entryHostPart, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryHostPart, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("U_sername:"); label = gtk_label_new_with_mnemonic ("U_sername:");
...@@ -150,7 +214,7 @@ show_account_window (account_t * a) ...@@ -150,7 +214,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUsername = gtk_entry_new(); entryUsername = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUsername); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUsername);
gtk_entry_set_text(GTK_ENTRY(entryUsername), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_AUTH_NAME)); gtk_entry_set_text(GTK_ENTRY(entryUsername), curUsername);
gtk_table_attach ( GTK_TABLE( table ), entryUsername, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryUsername, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Password:"); label = gtk_label_new_with_mnemonic ("_Password:");
...@@ -159,10 +223,22 @@ show_account_window (account_t * a) ...@@ -159,10 +223,22 @@ show_account_window (account_t * a)
entryPassword = gtk_entry_new(); entryPassword = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(entryPassword), FALSE); gtk_entry_set_visibility(GTK_ENTRY(entryPassword), FALSE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword);
gtk_entry_set_text(GTK_ENTRY(entryPassword), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_PASSWORD)); gtk_entry_set_text(GTK_ENTRY(entryPassword), curPassword);
gtk_table_attach ( GTK_TABLE( table ), entryPassword, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_table_attach ( GTK_TABLE( table ), entryPassword, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
// Toggle enabled/disabled widgets
if (strcmp(curAccountType, "SIP") == 0) {
//gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), TRUE);<
}
else if (strcmp(curAccountType, "IAX") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), FALSE);
}
else {
// Disable everything ! ouch!
// Shouldn't get there.
}
gtk_box_pack_start (GTK_BOX (dialog->vbox), table, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (dialog->vbox), table, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER(table), 10); gtk_container_set_border_width (GTK_CONTAINER(table), 10);
...@@ -172,6 +248,8 @@ show_account_window (account_t * a) ...@@ -172,6 +248,8 @@ show_account_window (account_t * a)
response = gtk_dialog_run (GTK_DIALOG (dialog)); response = gtk_dialog_run (GTK_DIALOG (dialog));
if(response == GTK_RESPONSE_ACCEPT) if(response == GTK_RESPONSE_ACCEPT)
{ {
gchar* proto = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(entryProtocol));
g_hash_table_replace(currentAccount->properties, g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_ENABLED), g_strdup(ACCOUNT_ENABLED),
g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entryEnabled)) ? "TRUE": "FALSE")); g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entryEnabled)) ? "TRUE": "FALSE"));
...@@ -182,6 +260,8 @@ show_account_window (account_t * a) ...@@ -182,6 +260,8 @@ show_account_window (account_t * a)
g_hash_table_replace(currentAccount->properties, g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_ALIAS), g_strdup(ACCOUNT_ALIAS),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryName)))); g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryName))));
if (strcmp(proto, "SIP") == 0) { /* Protocol = SIP */
g_hash_table_replace(currentAccount->properties, g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_FULL_NAME), g_strdup(ACCOUNT_SIP_FULL_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName)))); g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName))));
...@@ -197,6 +277,24 @@ show_account_window (account_t * a) ...@@ -197,6 +277,24 @@ show_account_window (account_t * a)
g_hash_table_replace(currentAccount->properties, g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_PASSWORD), g_strdup(ACCOUNT_SIP_PASSWORD),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword)))); g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
}
else if (strcmp(proto, "IAX") == 0) { /* Protocol = IAX */
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_FULL_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_HOST),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryHostPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_USER),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUsername))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_PASS),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
}
else {
}
dbus_set_account_details(currentAccount); dbus_set_account_details(currentAccount);
} }
......
...@@ -426,13 +426,13 @@ dbus_set_account_details(account_t *a) ...@@ -426,13 +426,13 @@ dbus_set_account_details(account_t *a)
&error); &error);
if (error) if (error)
{ {
g_printerr ("Failed to call get_account_details() on ConfigurationManager: %s\n", g_printerr ("Failed to call set_account_details() on ConfigurationManager: %s\n",
error->message); error->message);
g_error_free (error); g_error_free (error);
} }
else else
{ {
g_print ("DBus called get_account_details() on ConfigurationManager\n"); g_print ("DBus called set_account_details() on ConfigurationManager\n");
} }
} }
......
...@@ -130,12 +130,6 @@ class Account{ ...@@ -130,12 +130,6 @@ class Account{
bool getState() { return _state; } bool getState() { return _state; }
private: private:
/**
* Create a unique VoIPLink() depending on the protocol
* Multiple call to this function do nothing (if the voiplink pointer is 0)
* @return false if an error occurs
*/
virtual bool createVoIPLink() = 0;
protected: protected:
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment