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
55ad23b9
Commit
55ad23b9
authored
May 16, 2012
by
Tristan Matthews
Browse files
* #10725: gnome: cleanup logging
parent
c0213533
Changes
5
Hide whitespace changes
Inline
Side-by-side
gnome/src/contacts/addrbookfactory.c
View file @
55ad23b9
...
...
@@ -39,7 +39,6 @@
AddrBookHandle
*
addrbook
=
NULL
;
/**
* Callback called after all book have been processed
*/
...
...
@@ -93,7 +92,7 @@ void abook_init()
void
*
handle
=
dlopen
(
PLUGINS_DIR
"/libevladdrbook.so"
,
RTLD_LAZY
);
if
(
handle
==
NULL
)
{
ERROR
(
"Addressbook: Error: Coul
d not load addressbook"
);
DEBUG
(
"Di
d not load addressbook"
);
return
;
}
...
...
@@ -102,7 +101,7 @@ void abook_init()
#define LOAD(func) do { \
addrbook-> func = dlsym(handle, "addressbook_" #func); \
if (addrbook-> func == NULL) \
ERROR("
Addressbook:
Couldn't load " # func); \
ERROR("Couldn't load " # func); \
} while(0)
...
...
gnome/src/contacts/calltree.c
View file @
55ad23b9
...
...
@@ -115,10 +115,8 @@ call_selected_cb(GtkTreeSelection *sel, void* data UNUSED)
GtkTreeModel
*
model
=
gtk_tree_view_get_model
(
gtk_tree_selection_get_tree_view
(
sel
));
GtkTreeIter
iter
;
if
(
!
gtk_tree_selection_get_selected
(
sel
,
&
model
,
&
iter
))
{
DEBUG
(
"gtk_tree_selection_get_selected return non zero!!!!!!!!!!!!!!!!!!!!!!!!! stop selected callback
\n
"
);
if
(
!
gtk_tree_selection_get_selected
(
sel
,
&
model
,
&
iter
))
return
;
}
if
(
active_calltree_tab
==
history_tab
)
DEBUG
(
"Current call tree is history"
);
...
...
gnome/src/dbus/dbus.c
View file @
55ad23b9
...
...
@@ -68,7 +68,7 @@ static GDBusProxy *session_manager_proxy;
static
gboolean
check_error
(
GError
*
error
)
{
if
(
error
)
{
DEBUG
(
"DBUS: Error:
%s"
,
error
->
message
);
ERROR
(
"
%s"
,
error
->
message
);
g_error_free
(
error
);
return
TRUE
;
}
...
...
@@ -236,7 +236,7 @@ process_nonexisting_call_state_change(const gchar *callID, const gchar *state)
g_strcmp0
(
state
,
"CURRENT"
)
==
0
||
g_strcmp0
(
state
,
"RECORD"
))
{
DEBUG
(
"
DBUS:
New ringing call! accountID: %s"
,
callID
);
DEBUG
(
"New ringing call! accountID: %s"
,
callID
);
restore_call
(
callID
);
callable_obj_t
*
new_call
=
calllist_get_call
(
current_calls_tab
,
callID
);
...
...
@@ -256,7 +256,7 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar *callID,
if
(
c
)
process_existing_call_state_change
(
c
,
state
);
else
{
WARN
(
"
DBUS:
Call does not exist in %s"
,
__func__
);
WARN
(
"Call does not exist in %s"
,
__func__
);
process_nonexisting_call_state_change
(
callID
,
state
);
}
}
...
...
@@ -276,12 +276,12 @@ static void
conference_changed_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
confID
,
const
gchar
*
state
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Conference state changed: %s
\n
"
,
state
);
DEBUG
(
"Conference state changed: %s
\n
"
,
state
);
conference_obj_t
*
changed_conf
=
conferencelist_get
(
current_calls_tab
,
confID
);
if
(
changed_conf
==
NULL
)
{
ERROR
(
"
DBUS:
Conference is NULL in conference state changed"
);
ERROR
(
"Conference is NULL in conference state changed"
);
return
;
}
...
...
@@ -319,7 +319,7 @@ conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar *confID,
static
void
conference_created_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
confID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Conference %s added"
,
confID
);
DEBUG
(
"Conference %s added"
,
confID
);
conference_obj_t
*
new_conf
=
create_new_conference
(
CONFERENCE_STATE_ACTIVE_ATTACHED
,
confID
);
...
...
@@ -353,7 +353,7 @@ static void
conference_removed_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
confID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Conference removed %s"
,
confID
);
DEBUG
(
"Conference removed %s"
,
confID
);
conference_obj_t
*
c
=
conferencelist_get
(
current_calls_tab
,
confID
);
calltree_remove_conference
(
current_calls_tab
,
c
);
...
...
@@ -375,17 +375,17 @@ static void
record_playback_filepath_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
id
,
const
gchar
*
filepath
)
{
DEBUG
(
"
DBUS:
Filepath for %s: %s"
,
id
,
filepath
);
DEBUG
(
"Filepath for %s: %s"
,
id
,
filepath
);
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
id
);
conference_obj_t
*
conf
=
conferencelist_get
(
current_calls_tab
,
id
);
if
(
call
&&
conf
)
{
ERROR
(
"
DBUS:
Two objects for this callid"
);
ERROR
(
"Two objects for this callid"
);
return
;
}
if
(
!
call
&&
!
conf
)
{
ERROR
(
"
DBUS:
Could not get object"
);
ERROR
(
"Could not get object"
);
return
;
}
...
...
@@ -398,14 +398,14 @@ record_playback_filepath_cb(DBusGProxy *proxy UNUSED, const gchar *id,
static
void
record_playback_stopped_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
filepath
)
{
DEBUG
(
"
DBUS:
Playback stopped for %s"
,
filepath
);
DEBUG
(
"Playback stopped for %s"
,
filepath
);
const
gint
calllist_size
=
calllist_get_size
(
history_tab
);
for
(
gint
i
=
0
;
i
<
calllist_size
;
i
++
)
{
callable_obj_t
*
call
=
calllist_get_nth
(
history_tab
,
i
);
if
(
call
==
NULL
)
{
ERROR
(
"
DBUS: ERROR:
Could not find %dth call"
,
i
);
ERROR
(
"Could not find %dth call"
,
i
);
break
;
}
if
(
g_strcmp0
(
call
->
_recordfile
,
filepath
)
==
0
)
...
...
@@ -471,7 +471,7 @@ transfer_failed_cb(DBusGProxy *proxy UNUSED, void *foo UNUSED)
static
void
secure_sdes_on_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
SRTP using SDES is on"
);
DEBUG
(
"SRTP using SDES is on"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
{
...
...
@@ -483,7 +483,7 @@ secure_sdes_on_cb(DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSE
static
void
secure_sdes_off_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
SRTP using SDES is off"
);
DEBUG
(
"SRTP using SDES is off"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
{
...
...
@@ -496,7 +496,7 @@ static void
secure_zrtp_on_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
const
gchar
*
cipher
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
SRTP using ZRTP is ON secure_on_cb"
);
DEBUG
(
"SRTP using ZRTP is ON secure_on_cb"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
{
...
...
@@ -509,7 +509,7 @@ secure_zrtp_on_cb(DBusGProxy *proxy UNUSED, const gchar *callID,
static
void
secure_zrtp_off_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
SRTP using ZRTP is OFF"
);
DEBUG
(
"SRTP using ZRTP is OFF"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
{
...
...
@@ -522,7 +522,7 @@ static void
show_zrtp_sas_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
const
gchar
*
sas
,
gboolean
verified
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Showing SAS"
);
DEBUG
(
"Showing SAS"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
...
...
@@ -532,7 +532,7 @@ show_zrtp_sas_cb(DBusGProxy *proxy UNUSED, const gchar *callID, const gchar *sas
static
void
confirm_go_clear_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Confirm Go Clear request"
);
DEBUG
(
"Confirm Go Clear request"
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
...
...
@@ -555,7 +555,7 @@ static void
sip_call_state_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
const
gchar
*
description
,
guint
code
,
void
*
foo
UNUSED
)
{
DEBUG
(
"
DBUS:
Sip call state changed %s"
,
callID
);
DEBUG
(
"Sip call state changed %s"
,
callID
);
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
...
...
@@ -597,11 +597,11 @@ error_alert(DBusGProxy *proxy UNUSED, int err, void *foo UNUSED)
static
void
screensaver_dbus_proxy_new_cb
(
GObject
*
source
UNUSED
,
GAsyncResult
*
result
,
gpointer
user_data
UNUSED
)
{
DEBUG
(
"
DBUS:
Session manager connection callback"
);
DEBUG
(
"Session manager connection callback"
);
session_manager_proxy
=
g_dbus_proxy_new_for_bus_finish
(
result
,
NULL
);
if
(
session_manager_proxy
==
NULL
)
ERROR
(
"
DBUS: Error,
could not initialize gnome session manager"
);
ERROR
(
"could not initialize gnome session manager"
);
}
#define GS_SERVICE "org.gnome.SessionManager"
...
...
@@ -612,7 +612,7 @@ gboolean dbus_connect_session_manager(DBusGConnection *connection)
{
if
(
connection
==
NULL
)
{
ERROR
(
"
DBUS: Error
connection is NULL"
);
ERROR
(
"connection is NULL"
);
return
FALSE
;
}
/*
...
...
@@ -621,7 +621,7 @@ gboolean dbus_connect_session_manager(DBusGConnection *connection)
"org.gnome.SessionManager.Inhibitor");
if(session_manager_proxy == NULL) {
ERROR("
DBUS:
Error, could not create session manager proxy");
ERROR("Error, could not create session manager proxy");
return FALSE;
}
*/
...
...
@@ -631,7 +631,7 @@ gboolean dbus_connect_session_manager(DBusGConnection *connection)
NULL
,
GS_SERVICE
,
GS_PATH
,
GS_INTERFACE
,
NULL
,
screensaver_dbus_proxy_new_cb
,
NULL
);
DEBUG
(
"
DBUS:
Connected to gnome session manager"
);
DEBUG
(
"Connected to gnome session manager"
);
return
TRUE
;
}
...
...
@@ -650,7 +650,7 @@ gboolean dbus_connect(GError **error)
DBusGConnection
*
connection
=
dbus_g_bus_get
(
DBUS_BUS_SESSION
,
error
);
if
(
connection
==
NULL
)
{
ERROR
(
"
DBUS: Error,
could not establish connection with session bus"
);
ERROR
(
"could not establish connection with session bus"
);
return
FALSE
;
}
...
...
@@ -870,7 +870,7 @@ gboolean dbus_connect(GError **error)
gboolean
status
=
dbus_connect_session_manager
(
connection
);
if
(
status
==
FALSE
)
{
ERROR
(
"
DBUS: Error,
could not connect to gnome session manager"
);
ERROR
(
"could not connect to gnome session manager"
);
return
FALSE
;
}
...
...
@@ -1482,7 +1482,7 @@ dbus_create_conf_from_participant_list(const gchar **list)
void
dbus_add_participant
(
const
gchar
*
callID
,
const
gchar
*
confID
)
{
DEBUG
(
"
DBUS:
Add participant %s to %s
\n
"
,
callID
,
confID
);
DEBUG
(
"Add participant %s to %s
\n
"
,
callID
,
confID
);
GError
*
error
=
NULL
;
org_sflphone_SFLphone_CallManager_add_participant
(
call_proxy
,
callID
,
confID
,
&
error
);
check_error
(
error
);
...
...
@@ -1713,7 +1713,7 @@ dbus_get_participant_list(const gchar *confID)
GError
*
error
=
NULL
;
gchar
**
list
=
NULL
;
DEBUG
(
"
DBUS:
Get conference %s participant list"
,
confID
);
DEBUG
(
"Get conference %s participant list"
,
confID
);
org_sflphone_SFLphone_CallManager_get_participant_list
(
call_proxy
,
confID
,
&
list
,
&
error
);
check_error
(
error
);
...
...
@@ -1835,7 +1835,7 @@ dbus_get_all_ip_interface(void)
if
(
error
->
domain
==
DBUS_GERROR
&&
error
->
code
==
DBUS_GERROR_REMOTE_EXCEPTION
)
ERROR
(
"Caught remote method (get_all_ip_interface) exception %s: %s"
,
dbus_g_error_get_name
(
error
),
error
->
message
);
else
ERROR
(
"
Error while calling get_all_ip_interface:
%s"
,
error
->
message
);
ERROR
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
}
else
...
...
@@ -1855,7 +1855,7 @@ dbus_get_all_ip_interface_by_name(void)
ERROR
(
"Caught remote method (get_all_ip_interface) exception %s: %s"
,
dbus_g_error_get_name
(
error
),
error
->
message
);
else
ERROR
(
"
Error while calling get_all_ip_interface:
%s"
,
error
->
message
);
ERROR
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
}
...
...
@@ -1874,7 +1874,7 @@ dbus_get_shortcuts(void)
ERROR
(
"Caught remote method (get_shortcuts) exception %s: %s"
,
dbus_g_error_get_name
(
error
),
error
->
message
);
else
ERROR
(
"
Error while calling get_shortcuts:
%s"
,
error
->
message
);
ERROR
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
}
...
...
@@ -1908,7 +1908,7 @@ static void screensaver_inhibit_cb(GObject * source_object, GAsyncResult * res,
GError
*
error
=
NULL
;
GVariant
*
value
=
g_dbus_proxy_call_finish
(
proxy
,
res
,
&
error
);
if
(
!
value
)
{
ERROR
(
"
Screensaver: Error: inhibiting the screensaver:
%s"
,
error
->
message
);
ERROR
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
;
}
...
...
@@ -1931,7 +1931,7 @@ static void screensaver_uninhibit_cb(GObject * source_object,
GVariant
*
value
=
g_dbus_proxy_call_finish
(
proxy
,
res
,
&
error
);
if
(
!
value
)
{
ERROR
(
"
Screensaver: Error uninhibiting the screensaver:
%s"
,
ERROR
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
;
...
...
@@ -1946,7 +1946,7 @@ void dbus_screensaver_inhibit(void)
{
const
gchar
*
appname
=
g_get_application_name
();
if
(
appname
==
NULL
)
{
ERROR
(
"
Screensaver: C
ould not retrieve application name"
);
ERROR
(
"
c
ould not retrieve application name"
);
return
;
}
...
...
@@ -1955,7 +1955,7 @@ void dbus_screensaver_inhibit(void)
"Phone call ongoing"
,
GNOME_SESSION_NO_IDLE_FLAG
);
if
(
parameters
==
NULL
)
{
ERROR
(
"
Screensaver:
Could not create session manager inhibit parameters"
);
ERROR
(
"Could not create session manager inhibit parameters"
);
return
;
}
...
...
@@ -1969,11 +1969,11 @@ dbus_screensaver_uninhibit(void)
{
if
(
cookie
==
0
)
return
;
DEBUG
(
"
Screensaver:
uninhibit"
);
DEBUG
(
"uninhibit"
);
GVariant
*
parameters
=
g_variant_new
(
"(u)"
,
cookie
);
if
(
parameters
==
NULL
)
{
ERROR
(
"
Screensaver:
Could not create session manager uninhibit "
ERROR
(
"Could not create session manager uninhibit "
"parameters"
);
return
;
}
...
...
gnome/src/sliders.c
View file @
55ad23b9
...
...
@@ -124,14 +124,14 @@ void set_slider_value(const gchar *device, gdouble newval)
if
(
g_strcmp0
(
device
,
"speaker"
)
==
0
)
{
dev
=
DEVICE_SPEAKER
;
DEBUG
(
"
Slider:
Set value for speaker: %f
\n
"
,
newval
);
DEBUG
(
"Set value for speaker: %f
\n
"
,
newval
);
}
else
if
(
g_strcmp0
(
device
,
"mic"
)
==
0
)
{
dev
=
DEVICE_MIC
;
DEBUG
(
"
Slider:
Set value for mic: %f
\n
"
,
newval
);
DEBUG
(
"Set value for mic: %f
\n
"
,
newval
);
}
else
{
ERROR
(
"
Slider:
Unknown device: %s"
,
device
);
ERROR
(
"Unknown device: %s"
,
device
);
return
;
}
...
...
@@ -148,14 +148,14 @@ void set_slider_no_update (const gchar * device, gdouble newval)
if
(
g_strcmp0
(
device
,
"speaker"
)
==
0
)
{
dev
=
DEVICE_SPEAKER
;
DEBUG
(
"
Slider:
Set value no update for speaker: %f
\n
"
,
newval
);
DEBUG
(
"Set value no update for speaker: %f
\n
"
,
newval
);
}
else
if
(
g_strcmp0
(
device
,
"mic"
)
==
0
)
{
dev
=
DEVICE_MIC
;
DEBUG
(
"
Slider:
Set value no update for mic: %f
\n
"
,
newval
);
DEBUG
(
"Set value no update for mic: %f
\n
"
,
newval
);
}
else
{
ERROR
(
"
Slider:
Unknown device: %s"
,
device
);
ERROR
(
"Unknown device: %s"
,
device
);
return
;
}
...
...
@@ -172,8 +172,6 @@ void set_slider_no_update (const gchar * device, gdouble newval)
void
toggle_slider_mute_microphone
(
void
)
{
DEBUG
(
"Slider: Mute/Unmute toggle"
);
switch
(
device_state
)
{
case
DEVICE_STATE_ACTIVE
:
value
[
DEVICE_MIC
]
=
gtk_range_get_value
(
GTK_RANGE
(
slider
[
DEVICE_MIC
]));
...
...
@@ -185,7 +183,7 @@ void toggle_slider_mute_microphone(void)
device_state
=
DEVICE_STATE_ACTIVE
;
break
;
default:
ERROR
(
"
Slider:
Unknown state"
);
ERROR
(
"Unknown state"
);
break
;
}
}
...
...
gnome/src/uimanager.c
View file @
55ad23b9
...
...
@@ -134,7 +134,7 @@ static void add_to_toolbar(GtkWidget *toolbar, GtkWidget *item, int pos)
static
void
call_mute
(
void
)
{
DEBUG
(
"
UIManager:
Mute call button pressed"
);
DEBUG
(
"Mute call button pressed"
);
sflphone_mute_call
();
}
...
...
@@ -143,7 +143,7 @@ static void
update_toolbar_for_call
(
callable_obj_t
*
selectedCall
,
gboolean
instant_messaging_enabled
)
{
int
pos
=
0
;
DEBUG
(
"
UIManager:
Update actions for call %s"
,
selectedCall
->
_callID
);
DEBUG
(
"Update actions for call %s"
,
selectedCall
->
_callID
);
if
(
selectedCall
==
NULL
)
{
ERROR
(
"Selected call is NULL while updating toolbar"
);
...
...
@@ -158,7 +158,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
switch
(
selectedCall
->
_state
)
{
case
CALL_STATE_INCOMING
:
{
DEBUG
(
"
UIManager:
Call State Incoming"
);
DEBUG
(
"Call State Incoming"
);
// Make the button toolbar clickable
gtk_action_set_sensitive
(
pickUpAction_
,
TRUE
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
...
...
@@ -174,7 +174,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
}
case
CALL_STATE_HOLD
:
{
DEBUG
(
"
UIManager:
Call State Hold"
);
DEBUG
(
"Call State Hold"
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
gtk_widget_set_sensitive
(
holdMenu_
,
TRUE
);
gtk_widget_set_sensitive
(
offHoldToolbar_
,
TRUE
);
...
...
@@ -194,7 +194,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
}
case
CALL_STATE_RINGING
:
{
DEBUG
(
"
UIManager:
Call State Ringing"
);
DEBUG
(
"Call State Ringing"
);
gtk_action_set_sensitive
(
pickUpAction_
,
TRUE
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
pos
=
1
;
...
...
@@ -204,7 +204,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
}
case
CALL_STATE_DIALING
:
{
DEBUG
(
"
UIManager:
Call State Dialing"
);
DEBUG
(
"Call State Dialing"
);
gtk_action_set_sensitive
(
pickUpAction_
,
TRUE
);
if
(
active_calltree_tab
==
current_calls_tab
)
...
...
@@ -229,7 +229,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
}
case
CALL_STATE_CURRENT
:
{
DEBUG
(
"
UIManager:
Call State Current"
);
DEBUG
(
"Call State Current"
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
gtk_action_set_sensitive
(
recordAction_
,
TRUE
);
gtk_action_set_sensitive
(
muteAction_
,
TRUE
);
...
...
@@ -260,7 +260,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
case
CALL_STATE_RECORD
:
{
DEBUG
(
"
UIManager:
Call State Record"
);
DEBUG
(
"Call State Record"
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
gtk_action_set_sensitive
(
recordAction_
,
TRUE
);
gtk_action_set_sensitive
(
muteAction_
,
TRUE
);
...
...
@@ -292,7 +292,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
case
CALL_STATE_FAILURE
:
{
pos
=
1
;
DEBUG
(
"
UIManager:
Call State Busy/Failure"
);
DEBUG
(
"Call State Busy/Failure"
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
add_to_toolbar
(
toolbar_
,
hangUpWidget_
,
pos
++
);
break
;
...
...
@@ -317,7 +317,7 @@ update_toolbar_for_call(callable_obj_t *selectedCall, gboolean instant_messaging
break
;
}
default:
ERROR
(
"
UIMAnager: Error:
Unknown state in action update!"
);
ERROR
(
"Unknown state in action update!"
);
break
;
}
}
...
...
@@ -327,7 +327,7 @@ static void
update_toolbar_for_conference
(
conference_obj_t
*
selectedConf
,
gboolean
instant_messaging_enabled
)
{
int
pos
=
0
;
DEBUG
(
"
UIManager:
Update actions for conference"
);
DEBUG
(
"Update actions for conference"
);
// update icon in systray
show_status_hangup_icon
();
...
...
@@ -336,7 +336,7 @@ update_toolbar_for_conference(conference_obj_t * selectedConf, gboolean instant_
case
CONFERENCE_STATE_ACTIVE_ATTACHED
:
case
CONFERENCE_STATE_ACTIVE_DETACHED
:
DEBUG
(
"
UIManager:
Conference State Active"
);
DEBUG
(
"Conference State Active"
);
if
(
active_calltree_tab
==
current_calls_tab
)
{
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
...
...
@@ -365,7 +365,7 @@ update_toolbar_for_conference(conference_obj_t * selectedConf, gboolean instant_
case
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
:
case
CONFERENCE_STATE_ACTIVE_DETACHED_RECORD
:
{
pos
=
1
;
DEBUG
(
"
UIManager:
Conference State Record"
);
DEBUG
(
"Conference State Record"
);
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
gtk_widget_set_sensitive
(
holdToolbar_
,
TRUE
);
gtk_action_set_sensitive
(
recordAction_
,
TRUE
);
...
...
@@ -382,7 +382,7 @@ update_toolbar_for_conference(conference_obj_t * selectedConf, gboolean instant_
}
case
CONFERENCE_STATE_HOLD
:
case
CONFERENCE_STATE_HOLD_RECORD
:
{
DEBUG
(
"
UIManager:
Conference State Hold"
);
DEBUG
(
"Conference State Hold"
);
pos
=
1
;
gtk_action_set_sensitive
(
hangUpAction_
,
TRUE
);
gtk_widget_set_sensitive
(
offHoldToolbar_
,
TRUE
);
...
...
@@ -399,7 +399,7 @@ update_toolbar_for_conference(conference_obj_t * selectedConf, gboolean instant_
break
;
}
default:
WARN
(
"
UIManager: Error:
Should not happen in action update!"
);
WARN
(
"Should not happen in action update!"
);
break
;
}
...
...
@@ -603,7 +603,7 @@ help_about(void * foo UNUSED)
static
void
call_new_call
(
void
*
foo
UNUSED
)
{
DEBUG
(
"
UIManager:
New call button pressed"
);
DEBUG
(
"New call button pressed"
);
sflphone_new_call
();
}
...
...
@@ -638,7 +638,7 @@ call_hold(void* foo UNUSED)
callable_obj_t
*
selectedCall
=
calltab_get_selected_call
(
current_calls_tab
);
conference_obj_t
*
selectedConf
=
calltab_get_selected_conf
(
current_calls_tab
);
DEBUG
(
"
UIManager:
Hold button pressed"
);
DEBUG
(
"Hold button pressed"
);
if
(
selectedCall
)
{
if
(
selectedCall
->
_state
==
CALL_STATE_HOLD
)
...
...
@@ -698,10 +698,10 @@ conference_hold(void* foo UNUSED)
{
conference_obj_t
*
selectedConf
=
calltab_get_selected_conf
(
current_calls_tab
);
DEBUG
(
"
UIManager:
Hold button pressed for conference"
);
DEBUG
(
"Hold button pressed for conference"
);
if
(
selectedConf
==
NULL
)
{
ERROR
(
"
UIManager:
No conference selected"
);
ERROR
(
"No conference selected"
);
return
;
}
...
...
@@ -731,7 +731,7 @@ conference_hold(void* foo UNUSED)
static
void
call_pick_up
(
void
*
foo
UNUSED
)
{
DEBUG
(
"
UIManager:
Pick up"
);
DEBUG
(
"Pick up"
);
if
(
calllist_get_size
(
current_calls_tab
)
>
0
)
{
sflphone_pick_up
();
...
...
@@ -758,7 +758,7 @@ call_pick_up(void * foo UNUSED)
static
void
call_hang_up
(
void
)
{
DEBUG
(
"
UIManager:
Hang up button pressed(call)"
);
DEBUG
(
"Hang up button pressed(call)"
);
/*
* [#3020] Restore the record toggle button
* We set it to FALSE, as when we hang up a call, the recording is stopped.
...
...
@@ -770,7 +770,7 @@ call_hang_up(void)
static
void
conference_hang_up
(
void
)
{
DEBUG
(
"
UIManager:
Hang up button pressed(conference)"
);
DEBUG
(
"Hang up button pressed(conference)"
);
conference_obj_t
*
selectedConf
=
calltab_get_selected_conf
(
current_calls_tab
);
if
(
selectedConf
)
...
...
@@ -780,23 +780,23 @@ conference_hang_up(void)
static
void
call_record
(
void
)
{
DEBUG
(
"
UIManager:
Record button pressed"
);
DEBUG
(
"Record button pressed"
);
sflphone_rec_call
();
}
static
void
start_playback_record_cb
(
void
)
{
DEBUG
(
"
UIManager:
Start playback button pressed"
);
DEBUG
(
"Start playback button pressed"
);
callable_obj_t
*
selectedCall
=
calltab_get_selected_call
(
history_tab
);
if
(
selectedCall
==
NULL
)
{
ERROR
(
"
UIManager: Error:
No selected object in playback record callback"
);
ERROR
(
"No selected object in playback record callback"
);
return
;
}
DEBUG
(
"
UIManager:
Start selected call file playback %s"
,
selectedCall
->
_recordfile
);
DEBUG
(
"Start selected call file playback %s"
,
selectedCall
->
_recordfile
);
selectedCall
->
_record_is_playing
=
dbus_start_recorded_file_playback
(
selectedCall
->
_recordfile
);
update_actions
();
...
...
@@ -805,23 +805,23 @@ start_playback_record_cb(void)
static
void
stop_playback_record_cb
(
void
)
{
DEBUG
(
"
UIManager:
Stop playback button pressed"
);
DEBUG
(
"Stop playback button pressed"
);
callable_obj_t
*
selectedCall
=
calltab_get_selected_call
(
history_tab
);
if
(
selectedCall
==
NULL
)
{
ERROR
(
"
UIManager: Error:
No selected object in history treeview"
);
ERROR
(
"No selected object in history treeview"
);
return
;
}
if
(
selectedCall
)
{
if
(
selectedCall
->
_recordfile
==
NULL
)
{
ERROR
(
"
UIManager: Error:
Record file is NULL"
);
ERROR
(
"Record file is NULL"
);
return
;
}
dbus_stop_recorded_file_playback
(
selectedCall
->
_recordfile
);
DEBUG
(
"
UIManager:
Stop selected call file playback %s"
,
selectedCall
->
_recordfile
);
DEBUG
(
"Stop selected call file playback %s"
,
selectedCall
->
_recordfile
);
selectedCall
->
_record_is_playing
=
FALSE
;
}
...
...
@@ -839,10 +839,10 @@ remove_from_history(void * foo UNUSED)
{
callable_obj_t
*
call
=
calltab_get_selected_call
(
history_tab
);
DEBUG
(
"
UIManager:
Remove the call from the history"
);
DEBUG
(
"Remove the call from the history"
);
if
(
call
==
NULL
)
{
ERROR
(
"
UIManager: Error:
Call is NULL"
);
ERROR
(
"Call is NULL"
);
return
;