Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
20b7a67f
Commit
20b7a67f
authored
Feb 05, 2008
by
Emmanuel Milou
Browse files
Merge branch 'master' of
git+ssh://sflphone_org@sflphone.org/git/sflphone
parents
e8321b8b
c30f350b
Changes
5
Hide whitespace changes
Inline
Side-by-side
doc/Goals.txt
View file @
20b7a67f
...
...
@@ -11,10 +11,10 @@ Goals for next release (0.8)
* Functional IAX transport
* Near perfect audio
* Multiple-client (GUI or other) connectivity to server
- New Gtk+ GUI with following function
n
ality (altough the server can do more):
- New Gtk+ GUI with following functionality (alt
h
ough the server can do more):
* User can place a call
* User can answer a call
* User can transfer
t
a call
* User can transfer a call
* User can have an unlimited number of calls
* User can put a call on hold and off hold
* User is informed of waiting voice mail
...
...
@@ -29,7 +29,7 @@ Goals for release 0.8.5
- Server side:
* Perfect audio
* Better error handling of failed account registrations
* Fully working multiple account function
n
ality
* Fully working multiple account functionality
- Gtk+ GUI updates
* User can set up audio parameters
* User can set up STUN and proxy settings for SIP accounts
...
...
@@ -41,7 +41,7 @@ Goals for release 0.8.5
* User can place a call
* User can answer calls
* User can send DTMF
* User can transfer
t
a call
* User can transfer a call
...
...
@@ -55,7 +55,7 @@ Goals for release 0.9
- Gtk+ GUI updates
* User can receive and send SMS messages
* User is informed of call duration
* User can set up spee
l
call buttons
* User can set up spee
d
call buttons
* User can consult/clear call history
* User can set a status
- Python CLI client
...
...
sflphone-gtk/src/codeclist.c
View file @
20b7a67f
...
...
@@ -67,13 +67,11 @@ codec_list_add(codec_t * c)
void
codec_set_active
(
gchar
*
name
)
{
printf
(
"entry point set active"
);
codec_t
*
c
=
codec_list_get
(
name
);
if
(
c
){
printf
(
"
blablabla"
);
printf
(
"
%s set active/n"
,
c
->
name
);
c
->
is_active
=
TRUE
;
}
printf
(
"exit point set active"
);
}
void
...
...
@@ -89,17 +87,7 @@ codec_list_get_size()
{
return
g_queue_get_length
(
codecQueue
);
}
/*
codec_t*
codec_list_get( const gchar * name)
{
GList * c = g_queue_find_custom(codecQueue, name, is_name_codecstruct);
if(c)
return (codec_t *)c->data;
else
return NULL;
}
*/
codec_t
*
codec_list_get
(
const
gchar
*
name
)
{
...
...
@@ -124,3 +112,34 @@ codec_set_prefered_order(guint index)
g_queue_push_head
(
codecQueue
,
prefered
);
}
void
codec_list_move_codec_up
(
guint
index
)
{
if
(
index
!=
0
)
{
gpointer
codec
=
g_queue_pop_nth
(
codecQueue
,
index
);
g_queue_push_nth
(
codecQueue
,
codec
,
index
-
1
);
}
// TEMP
int
i
;
printf
(
"
\n
Codec list
\n
"
);
for
(
i
=
0
;
i
<
codecQueue
->
length
;
i
++
)
printf
(
"%s
\n
"
,
codec_list_get_nth
(
i
)
->
name
);
}
void
codec_list_move_codec_down
(
guint
index
)
{
if
(
index
!=
codecQueue
->
length
)
{
gpointer
codec
=
g_queue_pop_nth
(
codecQueue
,
index
);
g_queue_push_nth
(
codecQueue
,
codec
,
index
+
1
);
}
// TEMP
int
i
;
printf
(
"
\n
Codec list
\n
"
);
for
(
i
=
0
;
i
<
codecQueue
->
length
;
i
++
)
printf
(
"%s
\n
"
,
codec_list_get_nth
(
i
)
->
name
);
}
sflphone-gtk/src/codeclist.h
View file @
20b7a67f
...
...
@@ -37,8 +37,8 @@ typedef struct {
void
codec_list_init
();
void
codec_list_clear
();
void
codec_list_add
(
codec_t
*
c
);
//
void codec_set_active(gchar* name);
//
void codec_set_inactive(gchar* name);
void
codec_set_active
(
gchar
*
name
);
void
codec_set_inactive
(
gchar
*
name
);
guint
codec_list_get_size
();
codec_t
*
codec_list_get
(
const
gchar
*
name
);
//codec_t * codec_list_get(const int payload);
...
...
@@ -52,4 +52,7 @@ void codec_set_prefered_order(guint index);
//gchar * codec_get_name(codec_t * c);
//guint codec_get_rate(gchar * codec_name);
void
codec_list_move_codec_up
(
guint
index
);
void
codec_list_move_codec_down
(
guint
index
);
#endif
sflphone-gtk/src/configwindow.c
View file @
20b7a67f
...
...
@@ -16,7 +16,7 @@
*
* 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.
*
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<accountlist.h>
...
...
@@ -261,30 +261,42 @@ select_codec(GtkTreeSelection *selection, GtkTreeModel *model)
* and in configuration files
*/
static
void
codec_active_toggled
(
GtkCellRendererToggle
*
renderer
,
gchar
*
path
,
gpointer
*
data
)
codec_active_toggled
(
GtkCellRendererToggle
*
renderer
,
gchar
*
path
,
gpointer
data
)
{
GtkTreeIter
iter
;
GtkTreePath
*
treePath
;
GtkTreeModel
*
model
;
gboolean
active
;
char
*
name
;
// Get path of clicked codec active toggle box
treePath
=
gtk_tree_path_new_from_string
(
path
);
printf
(
path
);
model
=
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
data
));
gtk_tree_model_get_iter
(
model
,
&
iter
,
treePath
);
// Get
valu
e at iteration
// Get
active value and nam
e at iteration
gtk_tree_model_get
(
model
,
&
iter
,
COLUMN_CODEC_ACTIVE
,
&
active
,
COLUMN_CODEC_NAME
,
&
name
,
-
1
);
printf
(
"%s
\n
"
,
name
);
// Toggle active value
active
=
!
active
;
// Store value
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
COLUMN_CODEC_ACTIVE
,
!
active
,
COLUMN_CODEC_ACTIVE
,
active
,
-
1
);
gtk_tree_path_free
(
treePath
);
// Modify codec queue to represent change
if
(
active
)
codec_set_active
(
name
);
else
codec_set_inactive
(
name
);
// TODO Perpetuate changes to the deamon
}
...
...
@@ -294,7 +306,7 @@ codec_active_toggled(GtkCellRendererToggle *renderer, gchar *path, gpointer *dat
* update changes in the deamon list and the configuration files
*/
static
void
moveCodec
(
gboolean
moveUp
,
gpointer
data
)
codec_move
(
gboolean
moveUp
,
gpointer
data
)
{
GtkTreeIter
iter
;
GtkTreeIter
*
iter2
;
...
...
@@ -316,7 +328,9 @@ moveCodec(gboolean moveUp, gpointer data)
// Find path of iteration
path
=
gtk_tree_model_get_string_from_iter
(
GTK_TREE_MODEL
(
model
),
&
iter
);
treePath
=
gtk_tree_path_new_from_string
(
path
);
gint
*
indices
=
gtk_tree_path_get_indices
(
treePath
);
gint
indice
=
indices
[
0
];
// Depending on button direction get new path
if
(
moveUp
)
gtk_tree_path_prev
(
treePath
);
...
...
@@ -336,33 +350,33 @@ moveCodec(gboolean moveUp, gpointer data)
gtk_tree_iter_free
(
iter2
);
g_free
(
path
);
// Perpetuate changes in codec queue
if
(
moveUp
)
codec_list_move_codec_up
(
indice
);
else
codec_list_move_codec_down
(
indice
);
// TODO Perpetuate changes to the deamon
/* Update the gconf key
codecs_data = gm_codecs_list_to_gm_conf_list (GTK_WIDGET (data));
gm_conf_set_string_list (AUDIO_CODECS_KEY "list", codecs_data);
g_slist_foreach (codecs_data, (GFunc) g_free, NULL);
g_slist_free (codecs_data);
*/
}
/**
* Called from move up codec button signal
*/
void
moveCodecU
p
(
GtkButton
*
button
,
gpointer
data
)
static
void
codec_move_u
p
(
GtkButton
*
button
,
gpointer
data
)
{
moveCodec
(
TRUE
,
data
);
// Change tree view ordering and get indice changed
codec_move
(
TRUE
,
data
);
}
/**
* Called from move down codec button signal
*/
static
void
moveCodecD
own
(
GtkButton
*
button
,
gpointer
data
)
codec_move_d
own
(
GtkButton
*
button
,
gpointer
data
)
{
moveCodec
(
FALSE
,
data
);
// Change tree view ordering and get indice changed
codec_move
(
FALSE
,
data
);
}
/**
...
...
@@ -375,10 +389,9 @@ bold_if_default_account(GtkTreeViewColumn *col,
GtkTreeIter
*
iter
,
gpointer
data
)
{
GValue
val
;
val
.
g_type
=
G_TYPE_POINTER
;
GValue
val
=
{
0
,
};
gtk_tree_model_get_value
(
tree_model
,
iter
,
3
,
&
val
);
account_t
*
current
=
(
account_t
*
)
g_value_get_pointer
(
&
val
);
account_t
*
current
=
(
account_t
*
)
g_value_get_pointer
(
&
val
);
g_value_unset
(
&
val
);
if
(
g_strcasecmp
(
current
->
accountID
,
account_list_get_default
())
==
0
)
g_object_set
(
G_OBJECT
(
rend
),
"weight"
,
800
,
NULL
);
...
...
@@ -507,12 +520,12 @@ create_codec_table()
moveUpButton
=
gtk_button_new_from_stock
(
GTK_STOCK_GO_UP
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
moveUpButton
),
FALSE
);
gtk_box_pack_start
(
GTK_BOX
(
buttonBox
),
moveUpButton
,
FALSE
,
FALSE
,
0
);
g_signal_connect
(
G_OBJECT
(
moveUpButton
),
"clicked"
,
G_CALLBACK
(
moveCodecU
p
),
codecTreeView
);
g_signal_connect
(
G_OBJECT
(
moveUpButton
),
"clicked"
,
G_CALLBACK
(
codec_move_u
p
),
codecTreeView
);
moveDownButton
=
gtk_button_new_from_stock
(
GTK_STOCK_GO_DOWN
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
moveDownButton
),
FALSE
);
gtk_box_pack_start
(
GTK_BOX
(
buttonBox
),
moveDownButton
,
FALSE
,
FALSE
,
0
);
g_signal_connect
(
G_OBJECT
(
moveDownButton
),
"clicked"
,
G_CALLBACK
(
moveCodecD
own
),
codecTreeView
);
g_signal_connect
(
G_OBJECT
(
moveDownButton
),
"clicked"
,
G_CALLBACK
(
codec_move_d
own
),
codecTreeView
);
config_window_fill_codec_list
();
...
...
sflphone-gtk/src/configwindow.h
View file @
20b7a67f
...
...
@@ -16,16 +16,28 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CONFIGWINDOW_H__
#define __CONFIGWINDOW_H__
#include
<calllist.h>
/** @file configwindow.h
* @brief The Preferences window.
*/
void
show_config_window
(
);
void
config_window_fill_account_list
(
);
/**
* @file configwindow.h
* @brief The Preferences window.
*/
void
config_window_fill_account_list
();
void
config_window_fill_codec_list
();
void
show_config_window
();
void
config_window_fill_audio_manager_list
();
void
config_window_fill_output_audio_device_list
();
void
config_window_fill_input_audio_device_list
();
void
default_account
(
GtkWidget
*
widget
,
gpointer
data
);
void
bold_if_default_account
(
GtkTreeViewColumn
*
col
,
GtkCellRenderer
*
rend
,
GtkTreeModel
*
tree_model
,
GtkTreeIter
*
iter
,
gpointer
data
);
void
default_codecs
(
GtkWidget
*
widget
,
gpointer
data
);
GtkWidget
*
create_codec_table
();
GtkWidget
*
create_accounts_tab
();
GtkWidget
*
create_audio_tab
();
void
show_config_window
();
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment