Merge remote-tracking branch 'public/master' into belle-sip
|
|
@ -46,10 +46,6 @@ LOCAL_SRC_FILES := \
|
|||
ec-calibrator.c \
|
||||
linphone_tunnel.cc
|
||||
|
||||
ifndef MY_LOG_DOMAIN
|
||||
MY_LOG_DOMAIN = \"Linphone\"
|
||||
endif
|
||||
|
||||
ifndef LINPHONE_VERSION
|
||||
LINPHONE_VERSION = "Devel"
|
||||
endif
|
||||
|
|
@ -64,7 +60,6 @@ LOCAL_CFLAGS += \
|
|||
-DENABLE_TRACE \
|
||||
-DLINPHONE_VERSION=\"$(LINPHONE_VERSION)\" \
|
||||
-DLINPHONE_PLUGINS_DIR=\"\\tmp\" \
|
||||
-DLOG_DOMAIN=$(MY_LOG_DOMAIN) \
|
||||
-DHAVE_EXOSIP_TRYLOCK=1 \
|
||||
-DHAVE_EXOSIP_TLS_VERIFY_CERTIFICATE=1
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ fi
|
|||
|
||||
dnl Add the languages which your application supports here.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN nb_NO zh_TW"
|
||||
ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN nb_NO zh_TW he"
|
||||
AC_SUBST(ALL_LINGUAS)
|
||||
AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])
|
||||
|
||||
|
|
|
|||
|
|
@ -355,7 +355,8 @@ void TunnelManager::sOnIterate(TunnelManager *zis){
|
|||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
static void linphone_android_log_handler(int lev, const char *fmt, va_list args){
|
||||
extern void linphone_android_log_handler(int prio, const char *fmt, va_list args);
|
||||
static void linphone_android_tunnel_log_handler(int lev, const char *fmt, va_list args) {
|
||||
int prio;
|
||||
switch(lev){
|
||||
case TUNNEL_DEBUG: prio = ANDROID_LOG_DEBUG; break;
|
||||
|
|
@ -363,9 +364,9 @@ static void linphone_android_log_handler(int lev, const char *fmt, va_list args)
|
|||
case TUNNEL_NOTICE: prio = ANDROID_LOG_INFO; break;
|
||||
case TUNNEL_WARN: prio = ANDROID_LOG_WARN; break;
|
||||
case TUNNEL_ERROR: prio = ANDROID_LOG_ERROR; break;
|
||||
default: prio = ANDROID_LOG_DEFAULT; break;
|
||||
default: prio = ANDROID_LOG_DEFAULT; break;
|
||||
}
|
||||
__android_log_vprint(prio, LOG_DOMAIN, fmt, args);
|
||||
linphone_android_log_handler(prio, fmt, args);
|
||||
}
|
||||
#endif /*ANDROID*/
|
||||
|
||||
|
|
@ -376,7 +377,7 @@ void TunnelManager::enableLogs(bool value) {
|
|||
void TunnelManager::enableLogs(bool isEnabled,LogHandler logHandler) {
|
||||
if (logHandler != NULL) SetLogHandler(logHandler);
|
||||
#ifdef ANDROID
|
||||
else SetLogHandler(linphone_android_log_handler);
|
||||
else SetLogHandler(linphone_android_tunnel_log_handler);
|
||||
#else
|
||||
else SetLogHandler(default_log_handler);
|
||||
#endif
|
||||
|
|
@ -399,6 +400,7 @@ void TunnelManager::processUdpMirrorEvent(const Event &ev){
|
|||
enable(false);
|
||||
mAutoDetectStarted = false;
|
||||
} else {
|
||||
mCurrentUdpMirrorClient++;
|
||||
if (mCurrentUdpMirrorClient !=mUdpMirrorClients.end()) {
|
||||
// enable tunnel but also try backup server
|
||||
LOGI("Tunnel is required, enabling; Trying backup udp mirror");
|
||||
|
|
|
|||
|
|
@ -59,14 +59,14 @@ void linphone_core_update_streams_destinations(LinphoneCore *lc, LinphoneCall *c
|
|||
rtp_addr = (new_audiodesc->rtp_addr[0] != '\0') ? new_audiodesc->rtp_addr : new_md->addr;
|
||||
rtcp_addr = (new_audiodesc->rtcp_addr[0] != '\0') ? new_audiodesc->rtcp_addr : new_md->addr;
|
||||
ms_message("Change audio stream destination: RTP=%s:%d RTCP=%s:%d", rtp_addr, new_audiodesc->rtp_port, rtcp_addr, new_audiodesc->rtcp_port);
|
||||
rtp_session_set_remote_addr_full(call->audiostream->session, rtp_addr, new_audiodesc->rtp_port, rtcp_addr, new_audiodesc->rtcp_port);
|
||||
rtp_session_set_remote_addr_full(call->audiostream->ms.session, rtp_addr, new_audiodesc->rtp_port, rtcp_addr, new_audiodesc->rtcp_port);
|
||||
}
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream && new_videodesc) {
|
||||
rtp_addr = (new_videodesc->rtp_addr[0] != '\0') ? new_videodesc->rtp_addr : new_md->addr;
|
||||
rtcp_addr = (new_videodesc->rtcp_addr[0] != '\0') ? new_videodesc->rtcp_addr : new_md->addr;
|
||||
ms_message("Change video stream destination: RTP=%s:%d RTCP=%s:%d", rtp_addr, new_videodesc->rtp_port, rtcp_addr, new_videodesc->rtcp_port);
|
||||
rtp_session_set_remote_addr_full(call->videostream->session, rtp_addr, new_videodesc->rtp_port, rtcp_addr, new_videodesc->rtcp_port);
|
||||
rtp_session_set_remote_addr_full(call->videostream->ms.session, rtp_addr, new_videodesc->rtp_port, rtcp_addr, new_videodesc->rtcp_port);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -100,35 +100,44 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia
|
|||
call->media_pending=TRUE;
|
||||
}
|
||||
call->resultdesc=new_md;
|
||||
if ((call->audiostream && call->audiostream->ticker) || (call->videostream && call->videostream->ticker)){
|
||||
if ((call->audiostream && call->audiostream->ms.ticker) || (call->videostream && call->videostream->ms.ticker)){
|
||||
/* we already started media: check if we really need to restart it*/
|
||||
if (oldmd){
|
||||
int md_changed = media_parameters_changed(call, oldmd, new_md);
|
||||
if ((md_changed == SAL_MEDIA_DESCRIPTION_UNCHANGED) && !call->playing_ringbacktone) {
|
||||
/*as nothing has changed, keep the oldmd */
|
||||
call->resultdesc=oldmd;
|
||||
sal_media_description_unref(new_md);
|
||||
if (call->all_muted){
|
||||
ms_message("Early media finished, unmuting inputs...");
|
||||
/*we were in early media, now we want to enable real media */
|
||||
linphone_call_enable_camera (call,linphone_call_camera_enabled (call));
|
||||
if (call->audiostream)
|
||||
linphone_core_mute_mic (lc, linphone_core_is_mic_muted(lc));
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream && call->camera_active)
|
||||
video_stream_change_camera(call->videostream,lc->video_conf.device );
|
||||
#endif
|
||||
}
|
||||
ms_message("No need to restart streams, SDP is unchanged.");
|
||||
return;
|
||||
} else if ((md_changed == SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED) && !call->playing_ringbacktone) {
|
||||
call->resultdesc = oldmd;
|
||||
ms_message("Network parameters have changed, update them.");
|
||||
linphone_core_update_streams_destinations(lc, call, oldmd, new_md);
|
||||
sal_media_description_unref(new_md);
|
||||
return;
|
||||
}else{
|
||||
if ((md_changed & SAL_MEDIA_DESCRIPTION_CODEC_CHANGED) || call->playing_ringbacktone) {
|
||||
ms_message("Media descriptions are different, need to restart the streams.");
|
||||
} else {
|
||||
if (md_changed == SAL_MEDIA_DESCRIPTION_UNCHANGED) {
|
||||
/*as nothing has changed, keep the oldmd */
|
||||
call->resultdesc=oldmd;
|
||||
sal_media_description_unref(new_md);
|
||||
if (call->all_muted){
|
||||
ms_message("Early media finished, unmuting inputs...");
|
||||
/*we were in early media, now we want to enable real media */
|
||||
linphone_call_enable_camera (call,linphone_call_camera_enabled (call));
|
||||
if (call->audiostream)
|
||||
linphone_core_mute_mic (lc, linphone_core_is_mic_muted(lc));
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream && call->camera_active)
|
||||
video_stream_change_camera(call->videostream,lc->video_conf.device );
|
||||
#endif
|
||||
}
|
||||
ms_message("No need to restart streams, SDP is unchanged.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (md_changed & SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED) {
|
||||
ms_message("Network parameters have changed, update them.");
|
||||
linphone_core_update_streams_destinations(lc, call, oldmd, new_md);
|
||||
}
|
||||
if (md_changed & SAL_MEDIA_DESCRIPTION_CRYPTO_CHANGED) {
|
||||
ms_message("Crypto parameters have changed, update them.");
|
||||
linphone_call_update_crypto_parameters(call, oldmd, new_md);
|
||||
}
|
||||
call->resultdesc = oldmd;
|
||||
sal_media_description_unref(new_md);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
linphone_call_stop_media_streams (call);
|
||||
|
|
|
|||
|
|
@ -242,4 +242,4 @@ LinphoneChatMessage* linphone_chat_message_clone(const LinphoneChatMessage* msg)
|
|||
new_message->cb=msg->cb;
|
||||
if (msg->from) new_message->from=linphone_address_clone(msg->from);
|
||||
return new_message;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,13 +161,13 @@ void linphone_call_set_authentication_token_verified(LinphoneCall *call, bool_t
|
|||
if (call->audiostream==NULL){
|
||||
ms_error("linphone_call_set_authentication_token_verified(): No audio stream");
|
||||
}
|
||||
if (call->audiostream->ortpZrtpContext==NULL){
|
||||
if (call->audiostream->ms.zrtp_context==NULL){
|
||||
ms_error("linphone_call_set_authentication_token_verified(): No zrtp context.");
|
||||
}
|
||||
if (!call->auth_token_verified && verified){
|
||||
ortp_zrtp_sas_verified(call->audiostream->ortpZrtpContext);
|
||||
ortp_zrtp_sas_verified(call->audiostream->ms.zrtp_context);
|
||||
}else if (call->auth_token_verified && !verified){
|
||||
ortp_zrtp_sas_reset_verified(call->audiostream->ortpZrtpContext);
|
||||
ortp_zrtp_sas_reset_verified(call->audiostream->ms.zrtp_context);
|
||||
}
|
||||
call->auth_token_verified=verified;
|
||||
propagate_encryption_changed(call);
|
||||
|
|
@ -244,7 +244,7 @@ void linphone_call_make_local_media_description(LinphoneCore *lc, LinphoneCall *
|
|||
else
|
||||
md->streams[0].ptime=linphone_core_get_download_ptime(lc);
|
||||
l=make_codec_list(lc,lc->codecs_conf.audio_codecs,call->params.audio_bw,&md->streams[0].max_rate);
|
||||
pt=payload_type_clone(rtp_profile_get_payload_from_mime(&av_profile,"telephone-event"));
|
||||
pt=payload_type_clone(rtp_profile_get_payload_from_mime(lc->default_profile,"telephone-event"));
|
||||
l=ms_list_append(l,pt);
|
||||
md->streams[0].payloads=l;
|
||||
|
||||
|
|
@ -886,7 +886,7 @@ LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call){
|
|||
**/
|
||||
void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream!=NULL && call->videostream->ticker!=NULL){
|
||||
if (call->videostream!=NULL && call->videostream->ms.ticker!=NULL){
|
||||
LinphoneCore *lc=call->core;
|
||||
MSWebCam *nowebcam=get_nowebcam_device();
|
||||
if (call->camera_active!=enable && lc->video_conf.device!=nowebcam){
|
||||
|
|
@ -1065,7 +1065,7 @@ void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, Lin
|
|||
call->nextVideoFrameDecoded._func = cb;
|
||||
call->nextVideoFrameDecoded._user_data = user_data;
|
||||
#ifdef VIDEO_ENABLED
|
||||
ms_filter_call_method_noarg(call->videostream->decoder, MS_VIDEO_DECODER_RESET_FIRST_IMAGE_NOTIFICATION);
|
||||
ms_filter_call_method_noarg(call->videostream->ms.decoder, MS_VIDEO_DECODER_RESET_FIRST_IMAGE_NOTIFICATION);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1109,20 +1109,20 @@ void linphone_call_init_audio_stream(LinphoneCall *call){
|
|||
if (lc->rtptf){
|
||||
RtpTransport *artp=lc->rtptf->audio_rtp_func(lc->rtptf->audio_rtp_func_data, call->audio_port);
|
||||
RtpTransport *artcp=lc->rtptf->audio_rtcp_func(lc->rtptf->audio_rtcp_func_data, call->audio_port+1);
|
||||
rtp_session_set_transports(audiostream->session,artp,artcp);
|
||||
rtp_session_set_transports(audiostream->ms.session,artp,artcp);
|
||||
}
|
||||
if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce) && (call->ice_session != NULL)){
|
||||
rtp_session_set_pktinfo(audiostream->session, TRUE);
|
||||
rtp_session_set_symmetric_rtp(audiostream->session, FALSE);
|
||||
rtp_session_set_pktinfo(audiostream->ms.session, TRUE);
|
||||
rtp_session_set_symmetric_rtp(audiostream->ms.session, FALSE);
|
||||
if (ice_session_check_list(call->ice_session, 0) == NULL) {
|
||||
ice_session_add_check_list(call->ice_session, ice_check_list_new());
|
||||
}
|
||||
audiostream->ice_check_list = ice_session_check_list(call->ice_session, 0);
|
||||
ice_check_list_set_rtp_session(audiostream->ice_check_list, audiostream->session);
|
||||
audiostream->ms.ice_check_list = ice_session_check_list(call->ice_session, 0);
|
||||
ice_check_list_set_rtp_session(audiostream->ms.ice_check_list, audiostream->ms.session);
|
||||
}
|
||||
|
||||
call->audiostream_app_evq = ortp_ev_queue_new();
|
||||
rtp_session_register_event_queue(audiostream->session,call->audiostream_app_evq);
|
||||
rtp_session_register_event_queue(audiostream->ms.session,call->audiostream_app_evq);
|
||||
}
|
||||
|
||||
void linphone_call_init_video_stream(LinphoneCall *call){
|
||||
|
|
@ -1142,7 +1142,7 @@ void linphone_call_init_video_stream(LinphoneCall *call){
|
|||
if (dscp!=-1)
|
||||
video_stream_set_dscp(call->videostream,dscp);
|
||||
video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0));
|
||||
if (video_recv_buf_size>0) rtp_session_set_recv_buf_size(call->videostream->session,video_recv_buf_size);
|
||||
if (video_recv_buf_size>0) rtp_session_set_recv_buf_size(call->videostream->ms.session,video_recv_buf_size);
|
||||
|
||||
if( lc->video_conf.displaytype != NULL)
|
||||
video_stream_set_display_filter_name(call->videostream,lc->video_conf.displaytype);
|
||||
|
|
@ -1150,19 +1150,19 @@ void linphone_call_init_video_stream(LinphoneCall *call){
|
|||
if (lc->rtptf){
|
||||
RtpTransport *vrtp=lc->rtptf->video_rtp_func(lc->rtptf->video_rtp_func_data, call->video_port);
|
||||
RtpTransport *vrtcp=lc->rtptf->video_rtcp_func(lc->rtptf->video_rtcp_func_data, call->video_port+1);
|
||||
rtp_session_set_transports(call->videostream->session,vrtp,vrtcp);
|
||||
rtp_session_set_transports(call->videostream->ms.session,vrtp,vrtcp);
|
||||
}
|
||||
if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce) && (call->ice_session != NULL)){
|
||||
rtp_session_set_pktinfo(call->videostream->session, TRUE);
|
||||
rtp_session_set_symmetric_rtp(call->videostream->session, FALSE);
|
||||
rtp_session_set_pktinfo(call->videostream->ms.session, TRUE);
|
||||
rtp_session_set_symmetric_rtp(call->videostream->ms.session, FALSE);
|
||||
if (ice_session_check_list(call->ice_session, 1) == NULL) {
|
||||
ice_session_add_check_list(call->ice_session, ice_check_list_new());
|
||||
}
|
||||
call->videostream->ice_check_list = ice_session_check_list(call->ice_session, 1);
|
||||
ice_check_list_set_rtp_session(call->videostream->ice_check_list, call->videostream->session);
|
||||
call->videostream->ms.ice_check_list = ice_session_check_list(call->ice_session, 1);
|
||||
ice_check_list_set_rtp_session(call->videostream->ms.ice_check_list, call->videostream->ms.session);
|
||||
}
|
||||
call->videostream_app_evq = ortp_ev_queue_new();
|
||||
rtp_session_register_event_queue(call->videostream->session,call->videostream_app_evq);
|
||||
rtp_session_register_event_queue(call->videostream->ms.session,call->videostream_app_evq);
|
||||
#ifdef TEST_EXT_RENDERER
|
||||
video_stream_set_render_callback(call->videostream,rendercb,NULL);
|
||||
#endif
|
||||
|
|
@ -1458,7 +1458,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
int crypto_idx = find_crypto_index_from_tag(local_st_desc->crypto, stream->crypto_local_tag);
|
||||
|
||||
if (crypto_idx >= 0) {
|
||||
audio_stream_enable_strp(
|
||||
audio_stream_enable_srtp(
|
||||
call->audiostream,
|
||||
stream->crypto[0].algo,
|
||||
local_st_desc->crypto[crypto_idx].master_key,
|
||||
|
|
@ -1658,12 +1658,58 @@ void linphone_call_stop_media_streams_for_ice_gathering(LinphoneCall *call){
|
|||
#endif
|
||||
}
|
||||
|
||||
void linphone_call_update_crypto_parameters(LinphoneCall *call, SalMediaDescription *old_md, SalMediaDescription *new_md) {
|
||||
SalStreamDescription *old_stream;
|
||||
SalStreamDescription *new_stream;
|
||||
int i;
|
||||
|
||||
old_stream = sal_media_description_find_stream(old_md, SalProtoRtpSavp, SalAudio);
|
||||
new_stream = sal_media_description_find_stream(new_md, SalProtoRtpSavp, SalAudio);
|
||||
if (old_stream && new_stream) {
|
||||
const SalStreamDescription *local_st_desc = sal_media_description_find_stream(call->localdesc, SalProtoRtpSavp, SalAudio);
|
||||
int crypto_idx = find_crypto_index_from_tag(local_st_desc->crypto, new_stream->crypto_local_tag);
|
||||
if (crypto_idx >= 0) {
|
||||
audio_stream_enable_srtp(call->audiostream, new_stream->crypto[0].algo, local_st_desc->crypto[crypto_idx].master_key, new_stream->crypto[0].master_key);
|
||||
call->audiostream_encrypted = TRUE;
|
||||
} else {
|
||||
ms_warning("Failed to find local crypto algo with tag: %d", new_stream->crypto_local_tag);
|
||||
call->audiostream_encrypted = FALSE;
|
||||
}
|
||||
for (i = 0; i < SAL_CRYPTO_ALGO_MAX; i++) {
|
||||
old_stream->crypto[i].tag = new_stream->crypto[i].tag;
|
||||
old_stream->crypto[i].algo = new_stream->crypto[i].algo;
|
||||
strncpy(old_stream->crypto[i].master_key, new_stream->crypto[i].master_key, sizeof(old_stream->crypto[i].master_key) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VIDEO_ENABLED
|
||||
old_stream = sal_media_description_find_stream(old_md, SalProtoRtpSavp, SalVideo);
|
||||
new_stream = sal_media_description_find_stream(new_md, SalProtoRtpSavp, SalVideo);
|
||||
if (old_stream && new_stream) {
|
||||
const SalStreamDescription *local_st_desc = sal_media_description_find_stream(call->localdesc, SalProtoRtpSavp, SalVideo);
|
||||
int crypto_idx = find_crypto_index_from_tag(local_st_desc->crypto, new_stream->crypto_local_tag);
|
||||
if (crypto_idx >= 0) {
|
||||
video_stream_enable_strp(call->videostream, new_stream->crypto[0].algo, local_st_desc->crypto[crypto_idx].master_key, new_stream->crypto[0].master_key);
|
||||
call->videostream_encrypted = TRUE;
|
||||
} else {
|
||||
ms_warning("Failed to find local crypto algo with tag: %d", new_stream->crypto_local_tag);
|
||||
call->videostream_encrypted = FALSE;
|
||||
}
|
||||
for (i = 0; i < SAL_CRYPTO_ALGO_MAX; i++) {
|
||||
old_stream->crypto[i].tag = new_stream->crypto[i].tag;
|
||||
old_stream->crypto[i].algo = new_stream->crypto[i].algo;
|
||||
strncpy(old_stream->crypto[i].master_key, new_stream->crypto[i].master_key, sizeof(old_stream->crypto[i].master_key) - 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void linphone_call_delete_ice_session(LinphoneCall *call){
|
||||
if (call->ice_session != NULL) {
|
||||
ice_session_destroy(call->ice_session);
|
||||
call->ice_session = NULL;
|
||||
if (call->audiostream != NULL) call->audiostream->ice_check_list = NULL;
|
||||
if (call->videostream != NULL) call->videostream->ice_check_list = NULL;
|
||||
if (call->audiostream != NULL) call->audiostream->ms.ice_check_list = NULL;
|
||||
if (call->videostream != NULL) call->videostream->ms.ice_check_list = NULL;
|
||||
call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateNotActivated;
|
||||
call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateNotActivated;
|
||||
}
|
||||
|
|
@ -1676,7 +1722,7 @@ static void linphone_call_log_fill_stats(LinphoneCallLog *log, AudioStream *st){
|
|||
|
||||
void linphone_call_stop_audio_stream(LinphoneCall *call) {
|
||||
if (call->audiostream!=NULL) {
|
||||
rtp_session_unregister_event_queue(call->audiostream->session,call->audiostream_app_evq);
|
||||
rtp_session_unregister_event_queue(call->audiostream->ms.session,call->audiostream_app_evq);
|
||||
ortp_ev_queue_flush(call->audiostream_app_evq);
|
||||
ortp_ev_queue_destroy(call->audiostream_app_evq);
|
||||
call->audiostream_app_evq=NULL;
|
||||
|
|
@ -1701,7 +1747,7 @@ void linphone_call_stop_audio_stream(LinphoneCall *call) {
|
|||
void linphone_call_stop_video_stream(LinphoneCall *call) {
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream!=NULL){
|
||||
rtp_session_unregister_event_queue(call->videostream->session,call->videostream_app_evq);
|
||||
rtp_session_unregister_event_queue(call->videostream->ms.session,call->videostream_app_evq);
|
||||
ortp_ev_queue_flush(call->videostream_app_evq);
|
||||
ortp_ev_queue_destroy(call->videostream_app_evq);
|
||||
call->videostream_app_evq=NULL;
|
||||
|
|
@ -1967,14 +2013,14 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
RtpSession *as=NULL,*vs=NULL;
|
||||
float audio_load=0, video_load=0;
|
||||
if (call->audiostream!=NULL){
|
||||
as=call->audiostream->session;
|
||||
if (call->audiostream->ticker)
|
||||
audio_load=ms_ticker_get_average_load(call->audiostream->ticker);
|
||||
as=call->audiostream->ms.session;
|
||||
if (call->audiostream->ms.ticker)
|
||||
audio_load=ms_ticker_get_average_load(call->audiostream->ms.ticker);
|
||||
}
|
||||
if (call->videostream!=NULL){
|
||||
if (call->videostream->ticker)
|
||||
video_load=ms_ticker_get_average_load(call->videostream->ticker);
|
||||
vs=call->videostream->session;
|
||||
if (call->videostream->ms.ticker)
|
||||
video_load=ms_ticker_get_average_load(call->videostream->ms.ticker);
|
||||
vs=call->videostream->ms.session;
|
||||
}
|
||||
report_bandwidth(call,as,vs);
|
||||
ms_message("Thread processing load: audio=%f\tvideo=%f",audio_load,video_load);
|
||||
|
|
@ -1984,7 +2030,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
OrtpEvent *ev;
|
||||
|
||||
/* Ensure there is no dangling ICE check list. */
|
||||
if (call->ice_session == NULL) call->videostream->ice_check_list = NULL;
|
||||
if (call->ice_session == NULL) call->videostream->ms.ice_check_list = NULL;
|
||||
|
||||
// Beware that the application queue should not depend on treatments fron the
|
||||
// mediastreamer queue.
|
||||
|
|
@ -1996,7 +2042,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
if (evt == ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED){
|
||||
linphone_call_videostream_encryption_changed(call, evd->info.zrtp_stream_encrypted);
|
||||
} else if (evt == ORTP_EVENT_RTCP_PACKET_RECEIVED) {
|
||||
call->stats[LINPHONE_CALL_STATS_VIDEO].round_trip_delay = rtp_session_get_round_trip_propagation(call->videostream->session);
|
||||
call->stats[LINPHONE_CALL_STATS_VIDEO].round_trip_delay = rtp_session_get_round_trip_propagation(call->videostream->ms.session);
|
||||
if(call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp != NULL)
|
||||
freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp);
|
||||
call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp = evd->packet;
|
||||
|
|
@ -2004,7 +2050,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
if (lc->vtable.call_stats_updated)
|
||||
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
|
||||
} else if (evt == ORTP_EVENT_RTCP_PACKET_EMITTED) {
|
||||
memcpy(&call->stats[LINPHONE_CALL_STATS_VIDEO].jitter_stats, rtp_session_get_jitter_stats(call->videostream->session), sizeof(jitter_stats_t));
|
||||
memcpy(&call->stats[LINPHONE_CALL_STATS_VIDEO].jitter_stats, rtp_session_get_jitter_stats(call->videostream->ms.session), sizeof(jitter_stats_t));
|
||||
if(call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp != NULL)
|
||||
freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp);
|
||||
call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp = evd->packet;
|
||||
|
|
@ -2023,7 +2069,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
OrtpEvent *ev;
|
||||
|
||||
/* Ensure there is no dangling ICE check list. */
|
||||
if (call->ice_session == NULL) call->audiostream->ice_check_list = NULL;
|
||||
if (call->ice_session == NULL) call->audiostream->ms.ice_check_list = NULL;
|
||||
|
||||
// Beware that the application queue should not depend on treatments fron the
|
||||
// mediastreamer queue.
|
||||
|
|
@ -2037,7 +2083,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
} else if (evt == ORTP_EVENT_ZRTP_SAS_READY) {
|
||||
linphone_call_audiostream_auth_token_ready(call, evd->info.zrtp_sas.sas, evd->info.zrtp_sas.verified);
|
||||
} else if (evt == ORTP_EVENT_RTCP_PACKET_RECEIVED) {
|
||||
call->stats[LINPHONE_CALL_STATS_AUDIO].round_trip_delay = rtp_session_get_round_trip_propagation(call->audiostream->session);
|
||||
call->stats[LINPHONE_CALL_STATS_AUDIO].round_trip_delay = rtp_session_get_round_trip_propagation(call->audiostream->ms.session);
|
||||
if(call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp != NULL)
|
||||
freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp);
|
||||
call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp = evd->packet;
|
||||
|
|
@ -2045,7 +2091,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
if (lc->vtable.call_stats_updated)
|
||||
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
|
||||
} else if (evt == ORTP_EVENT_RTCP_PACKET_EMITTED) {
|
||||
memcpy(&call->stats[LINPHONE_CALL_STATS_AUDIO].jitter_stats, rtp_session_get_jitter_stats(call->audiostream->session), sizeof(jitter_stats_t));
|
||||
memcpy(&call->stats[LINPHONE_CALL_STATS_AUDIO].jitter_stats, rtp_session_get_jitter_stats(call->audiostream->ms.session), sizeof(jitter_stats_t));
|
||||
if(call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp != NULL)
|
||||
freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp);
|
||||
call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp = evd->packet;
|
||||
|
|
|
|||
|
|
@ -710,11 +710,12 @@ static PayloadType * find_payload(RtpProfile *prof, const char *mime_type, int c
|
|||
return candidate;
|
||||
}
|
||||
|
||||
static bool_t get_codec(LpConfig *config, const char* type, int index, PayloadType **ret){
|
||||
static bool_t get_codec(LinphoneCore *lc, const char* type, int index, PayloadType **ret){
|
||||
char codeckey[50];
|
||||
const char *mime,*fmtp;
|
||||
int rate,channels,enabled;
|
||||
PayloadType *pt;
|
||||
LpConfig *config=lc->config;
|
||||
|
||||
*ret=NULL;
|
||||
snprintf(codeckey,50,"%s_%i",type,index);
|
||||
|
|
@ -725,7 +726,7 @@ static bool_t get_codec(LpConfig *config, const char* type, int index, PayloadTy
|
|||
fmtp=lp_config_get_string(config,codeckey,"recv_fmtp",NULL);
|
||||
channels=lp_config_get_int(config,codeckey,"channels",0);
|
||||
enabled=lp_config_get_int(config,codeckey,"enabled",1);
|
||||
pt=find_payload(&av_profile,mime,rate,channels,fmtp);
|
||||
pt=find_payload(lc->default_profile,mime,rate,channels,fmtp);
|
||||
if (pt && enabled ) pt->flags|=PAYLOAD_TYPE_ENABLED;
|
||||
//ms_message("Found codec %s/%i",pt->mime_type,pt->clock_rate);
|
||||
if (pt==NULL) ms_warning("Ignoring codec config %s/%i with fmtp=%s because unsupported",
|
||||
|
|
@ -771,10 +772,10 @@ static int codec_compare(const PayloadType *a, const PayloadType *b){
|
|||
return 0;
|
||||
}
|
||||
|
||||
static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
|
||||
static MSList *add_missing_codecs(LinphoneCore *lc, SalStreamType mtype, MSList *l){
|
||||
int i;
|
||||
for(i=0;i<RTP_PROFILE_MAX_PAYLOADS;++i){
|
||||
PayloadType *pt=rtp_profile_get_payload(&av_profile,i);
|
||||
PayloadType *pt=rtp_profile_get_payload(lc->default_profile,i);
|
||||
if (pt){
|
||||
if (mtype==SalVideo && pt->type!=PAYLOAD_VIDEO)
|
||||
pt=NULL;
|
||||
|
|
@ -815,22 +816,22 @@ static void codecs_config_read(LinphoneCore *lc)
|
|||
PayloadType *pt;
|
||||
MSList *audio_codecs=NULL;
|
||||
MSList *video_codecs=NULL;
|
||||
for (i=0;get_codec(lc->config,"audio_codec",i,&pt);i++){
|
||||
for (i=0;get_codec(lc,"audio_codec",i,&pt);i++){
|
||||
if (pt){
|
||||
if (!ms_filter_codec_supported(pt->mime_type)){
|
||||
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
|
||||
}else audio_codecs=codec_append_if_new(audio_codecs,pt);
|
||||
}
|
||||
}
|
||||
audio_codecs=add_missing_codecs(SalAudio,audio_codecs);
|
||||
for (i=0;get_codec(lc->config,"video_codec",i,&pt);i++){
|
||||
audio_codecs=add_missing_codecs(lc,SalAudio,audio_codecs);
|
||||
for (i=0;get_codec(lc,"video_codec",i,&pt);i++){
|
||||
if (pt){
|
||||
if (!ms_filter_codec_supported(pt->mime_type)){
|
||||
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
|
||||
}else video_codecs=codec_append_if_new(video_codecs,(void *)pt);
|
||||
}
|
||||
}
|
||||
video_codecs=add_missing_codecs(SalVideo,video_codecs);
|
||||
video_codecs=add_missing_codecs(lc,SalVideo,video_codecs);
|
||||
linphone_core_set_audio_codecs(lc,audio_codecs);
|
||||
linphone_core_set_video_codecs(lc,video_codecs);
|
||||
linphone_core_update_allocated_audio_bandwidth(lc);
|
||||
|
|
@ -1077,7 +1078,7 @@ static void linphone_core_assign_payload_type(LinphoneCore *lc, PayloadType *con
|
|||
ms_message("assigning %s/%i payload type number %i",pt->mime_type,pt->clock_rate,number);
|
||||
payload_type_set_number(pt,number);
|
||||
if (recv_fmtp!=NULL) payload_type_set_recv_fmtp(pt,recv_fmtp);
|
||||
rtp_profile_set_payload(&av_profile,number,pt);
|
||||
rtp_profile_set_payload(lc->default_profile,number,pt);
|
||||
lc->payload_types=ms_list_append(lc->payload_types,pt);
|
||||
}
|
||||
|
||||
|
|
@ -1095,6 +1096,8 @@ static void linphone_core_handle_static_payloads(LinphoneCore *lc){
|
|||
}
|
||||
|
||||
static void linphone_core_free_payload_types(LinphoneCore *lc){
|
||||
rtp_profile_clear_all(lc->default_profile);
|
||||
rtp_profile_destroy(lc->default_profile);
|
||||
ms_list_for_each(lc->payload_types,(void (*)(void*))payload_type_destroy);
|
||||
ms_list_free(lc->payload_types);
|
||||
lc->payload_types=NULL;
|
||||
|
|
@ -1128,6 +1131,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
|
|||
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
|
||||
ortp_init();
|
||||
lc->dyn_pt=96;
|
||||
lc->default_profile=rtp_profile_new("default profile");
|
||||
linphone_core_assign_payload_type(lc,&payload_type_pcmu8000,0,NULL);
|
||||
linphone_core_assign_payload_type(lc,&payload_type_gsm,3,NULL);
|
||||
linphone_core_assign_payload_type(lc,&payload_type_pcma8000,8,NULL);
|
||||
|
|
@ -2662,8 +2666,8 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
|
|||
#ifdef VIDEO_ENABLED
|
||||
bool_t has_video = call->params.has_video;
|
||||
if ((call->ice_session != NULL) && (call->videostream != NULL) && !params->has_video) {
|
||||
ice_session_remove_check_list(call->ice_session, call->videostream->ice_check_list);
|
||||
call->videostream->ice_check_list = NULL;
|
||||
ice_session_remove_check_list(call->ice_session, call->videostream->ms.ice_check_list);
|
||||
call->videostream->ms.ice_check_list = NULL;
|
||||
}
|
||||
call->params = *params;
|
||||
linphone_call_make_local_media_description(lc, call);
|
||||
|
|
@ -2902,7 +2906,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
|
|||
|
||||
if (call->audiostream==NULL)
|
||||
linphone_call_init_media_streams(call);
|
||||
if (!was_ringing && call->audiostream->ticker==NULL){
|
||||
if (!was_ringing && call->audiostream->ms.ticker==NULL){
|
||||
audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard);
|
||||
}
|
||||
|
||||
|
|
@ -4497,7 +4501,7 @@ void linphone_core_set_play_file(LinphoneCore *lc, const char *file){
|
|||
}
|
||||
if (file!=NULL) {
|
||||
lc->play_file=ms_strdup(file);
|
||||
if (call && call->audiostream && call->audiostream->ticker)
|
||||
if (call && call->audiostream && call->audiostream->ms.ticker)
|
||||
audio_stream_play(call->audiostream,file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,13 +52,31 @@ extern "C" void libmsbcg729_init();
|
|||
#endif /*ANDROID*/
|
||||
|
||||
static JavaVM *jvm=0;
|
||||
static const char* LogDomain = "Linphone";
|
||||
|
||||
#ifdef ANDROID
|
||||
static void linphone_android_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
|
||||
int prio;
|
||||
char str[4096];
|
||||
void linphone_android_log_handler(int prio, const char *fmt, va_list args) {
|
||||
char str[4096];
|
||||
char *current;
|
||||
char *next;
|
||||
|
||||
vsnprintf(str, sizeof(str) - 1, fmt, args);
|
||||
str[sizeof(str) - 1] = '\0';
|
||||
if (strlen(str) < 512) {
|
||||
__android_log_write(prio, LogDomain, str);
|
||||
} else {
|
||||
current = str;
|
||||
while ((next = strchr(current, '\n')) != NULL) {
|
||||
*next = '\0';
|
||||
__android_log_write(prio, LogDomain, current);
|
||||
current = next + 1;
|
||||
}
|
||||
__android_log_write(prio, LogDomain, current);
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_android_ortp_log_handler(OrtpLogLevel lev, const char *fmt, va_list args) {
|
||||
int prio;
|
||||
switch(lev){
|
||||
case ORTP_DEBUG: prio = ANDROID_LOG_DEBUG; break;
|
||||
case ORTP_MESSAGE: prio = ANDROID_LOG_INFO; break;
|
||||
|
|
@ -67,19 +85,7 @@ static void linphone_android_log_handler(OrtpLogLevel lev, const char *fmt, va_l
|
|||
case ORTP_FATAL: prio = ANDROID_LOG_FATAL; break;
|
||||
default: prio = ANDROID_LOG_DEFAULT; break;
|
||||
}
|
||||
vsnprintf(str, sizeof(str) - 1, fmt, args);
|
||||
str[sizeof(str) - 1] = '\0';
|
||||
if (strlen(str) < 512) {
|
||||
__android_log_write(prio, LOG_DOMAIN, str);
|
||||
} else {
|
||||
current = str;
|
||||
while ((next = strchr(current, '\n')) != NULL) {
|
||||
*next = '\0';
|
||||
__android_log_write(prio, LOG_DOMAIN, current);
|
||||
current = next + 1;
|
||||
}
|
||||
__android_log_write(prio, LOG_DOMAIN, current);
|
||||
}
|
||||
linphone_android_log_handler(prio, fmt, args);
|
||||
}
|
||||
|
||||
int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() {
|
||||
|
|
@ -100,9 +106,11 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved)
|
|||
//LinphoneFactory
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreFactoryImpl_setDebugMode(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jboolean isDebug) {
|
||||
,jboolean isDebug
|
||||
,jstring jdebugTag) {
|
||||
if (isDebug) {
|
||||
linphone_core_enable_logs_with_cb(linphone_android_log_handler);
|
||||
LogDomain = env->GetStringUTFChars(jdebugTag, NULL);
|
||||
linphone_core_enable_logs_with_cb(linphone_android_ortp_log_handler);
|
||||
} else {
|
||||
linphone_core_disable_logs();
|
||||
}
|
||||
|
|
@ -1124,6 +1132,12 @@ extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_lookupCCCFromIso(
|
|||
env->ReleaseStringUTFChars(jiso, iso);
|
||||
return (jint) prefix;
|
||||
}
|
||||
extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_lookupCCCFromE164(JNIEnv* env, jobject thiz, jlong proxyCfg, jstring je164) {
|
||||
const char* e164 = env->GetStringUTFChars(je164, NULL);
|
||||
int prefix = linphone_dial_plan_lookup_ccc_from_e164(e164);
|
||||
env->ReleaseStringUTFChars(je164, e164);
|
||||
return (jint) prefix;
|
||||
}
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getDomain(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong proxyCfg) {
|
||||
|
|
@ -2165,6 +2179,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoPolicy(JNIEnv *e
|
|||
linphone_core_set_video_policy((LinphoneCore *)lc, &vpol);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setStaticPicture(JNIEnv *env, jobject thiz, jlong lc, jstring path) {
|
||||
const char *cpath = env->GetStringUTFChars(path, NULL);
|
||||
linphone_core_set_static_picture((LinphoneCore *)lc, cpath);
|
||||
env->ReleaseStringUTFChars(path, cpath);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setCpuCountNative(JNIEnv *env, jobject thiz, jint count) {
|
||||
ms_set_cpu_count(count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -881,10 +881,10 @@ void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call,
|
|||
ice_session_add_check_list(call->ice_session, cl);
|
||||
switch (stream->type) {
|
||||
case SalAudio:
|
||||
if (call->audiostream != NULL) call->audiostream->ice_check_list = cl;
|
||||
if (call->audiostream != NULL) call->audiostream->ms.ice_check_list = cl;
|
||||
break;
|
||||
case SalVideo:
|
||||
if (call->videostream != NULL) call->videostream->ice_check_list = cl;
|
||||
if (call->videostream != NULL) call->videostream->ms.ice_check_list = cl;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ void linphone_call_stop_video_stream(LinphoneCall *call);
|
|||
void linphone_call_stop_media_streams(LinphoneCall *call);
|
||||
void linphone_call_delete_ice_session(LinphoneCall *call);
|
||||
void linphone_call_stop_media_streams_for_ice_gathering(LinphoneCall *call);
|
||||
void linphone_call_update_crypto_parameters(LinphoneCall *call, SalMediaDescription *old_md, SalMediaDescription *new_md);
|
||||
|
||||
const char * linphone_core_get_identity(LinphoneCore *lc);
|
||||
const char * linphone_core_get_route(LinphoneCore *lc);
|
||||
|
|
@ -502,6 +503,7 @@ struct _LinphoneCore
|
|||
Sal *sal;
|
||||
LinphoneGlobalState state;
|
||||
struct _LpConfig *config;
|
||||
RtpProfile *default_profile;
|
||||
net_config_t net_conf;
|
||||
sip_config_t sip_conf;
|
||||
rtp_config_t rtp_conf;
|
||||
|
|
|
|||
|
|
@ -629,7 +629,7 @@ int linphone_dial_plan_lookup_ccc_from_e164(const char* e164) {
|
|||
found++;
|
||||
}
|
||||
}
|
||||
} while (found>1 || found==0);
|
||||
} while ((found>1 || found==0) && i < sizeof(dial_plan->ccc));
|
||||
if (found==1) {
|
||||
return atoi(elected_dial_plan->ccc);
|
||||
} else {
|
||||
|
|
@ -985,7 +985,7 @@ void linphone_proxy_config_write_to_config_file(LpConfig *config, LinphoneProxyC
|
|||
lp_config_set_string(config,key,"reg_identity",obj->reg_identity);
|
||||
}
|
||||
if (obj->contact_params!=NULL){
|
||||
lp_config_set_string(config,key,"contact_params",obj->contact_params);
|
||||
lp_config_set_string(config,key,"contact_parameters",obj->contact_params);
|
||||
}
|
||||
lp_config_set_int(config,key,"reg_expires",obj->expires);
|
||||
lp_config_set_int(config,key,"reg_sendregister",obj->reg_sendregister);
|
||||
|
|
|
|||
|
|
@ -190,10 +190,18 @@ static bool_t payload_list_equals(const MSList *l1, const MSList *l2){
|
|||
|
||||
int sal_stream_description_equals(const SalStreamDescription *sd1, const SalStreamDescription *sd2) {
|
||||
int result = SAL_MEDIA_DESCRIPTION_UNCHANGED;
|
||||
int i;
|
||||
|
||||
/* A different proto should result in SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED but the encryption change
|
||||
needs a stream restart for now, so use SAL_MEDIA_DESCRIPTION_CODEC_CHANGED */
|
||||
if (sd1->proto != sd2->proto) result |= SAL_MEDIA_DESCRIPTION_CODEC_CHANGED;
|
||||
for (i = 0; i < SAL_CRYPTO_ALGO_MAX; i++) {
|
||||
if ((sd1->crypto[i].tag != sd2->crypto[i].tag)
|
||||
|| (sd1->crypto[i].algo != sd2->crypto[i].algo)
|
||||
|| (strncmp(sd1->crypto[i].master_key, sd2->crypto[i].master_key, sizeof(sd1->crypto[i].master_key) - 1))) {
|
||||
result |= SAL_MEDIA_DESCRIPTION_CRYPTO_CHANGED;
|
||||
}
|
||||
}
|
||||
|
||||
if (sd1->type != sd2->type) result |= SAL_MEDIA_DESCRIPTION_CODEC_CHANGED;
|
||||
if (strcmp(sd1->rtp_addr, sd2->rtp_addr) != 0) result |= SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ typedef enum {
|
|||
#define SAL_MEDIA_DESCRIPTION_UNCHANGED 0x00
|
||||
#define SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED 0x01
|
||||
#define SAL_MEDIA_DESCRIPTION_CODEC_CHANGED 0x02
|
||||
#define SAL_MEDIA_DESCRIPTION_CHANGED (SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED | SAL_MEDIA_DESCRIPTION_CODEC_CHANGED)
|
||||
#define SAL_MEDIA_DESCRIPTION_CRYPTO_CHANGED 0x04
|
||||
#define SAL_MEDIA_DESCRIPTION_CHANGED (SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED | SAL_MEDIA_DESCRIPTION_CODEC_CHANGED | SAL_MEDIA_DESCRIPTION_CRYPTO_CHANGED)
|
||||
|
||||
const char* sal_transport_to_string(SalTransport transport);
|
||||
SalTransport sal_transport_parse(const char*);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ UI_FILES= about.ui \
|
|||
contact.ui \
|
||||
parameters.ui \
|
||||
sip_account.ui \
|
||||
chatroom.ui \
|
||||
call_logs.ui \
|
||||
log.ui \
|
||||
buddylookup.ui \
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Search contacts in directory</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal handler="gtk_widget_destroy" name="response"/>
|
||||
|
|
|
|||
341
gtk/chat.c
|
|
@ -19,33 +19,251 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "linphone.h"
|
||||
|
||||
|
||||
#ifdef HAVE_GTK_OSX
|
||||
#include <gtkosxapplication.h>
|
||||
#endif
|
||||
|
||||
GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){
|
||||
GtkWidget *w;
|
||||
GtkTextBuffer *b;
|
||||
gchar *tmp;
|
||||
w=linphone_gtk_create_window("chatroom");
|
||||
tmp=g_strdup_printf(_("Chat with %s"),with);
|
||||
gtk_window_set_title(GTK_WINDOW(w),tmp);
|
||||
g_free(tmp);
|
||||
g_object_set_data(G_OBJECT(w),"cr",cr);
|
||||
gtk_widget_show(w);
|
||||
linphone_chat_room_set_user_data(cr,w);
|
||||
b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")));
|
||||
gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
|
||||
gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
|
||||
void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window ();
|
||||
GtkWidget *nb=linphone_gtk_get_widget(main_window,"viewswitch");
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
|
||||
GtkWidget *w=g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
int idx = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"idx"));
|
||||
g_return_if_fail(w!=NULL);
|
||||
gtk_notebook_remove_page (GTK_NOTEBOOK(nb),idx);
|
||||
linphone_gtk_update_chat_picture(FALSE);
|
||||
g_object_set_data(G_OBJECT(friendlist),"chatview",NULL);
|
||||
gtk_widget_destroy(w);
|
||||
}
|
||||
|
||||
GtkWidget *create_tab_chat_header(LinphoneChatRoom *cr,const LinphoneAddress *uri){
|
||||
GtkWidget *w=gtk_hbox_new (FALSE,0);
|
||||
GtkWidget *i=create_pixmap ("chat.png");
|
||||
GtkWidget *l;
|
||||
GtkWidget *b=gtk_button_new_with_label("x");
|
||||
|
||||
gtk_widget_set_size_request(b,20,20);
|
||||
g_signal_connect_swapped(G_OBJECT(b),"clicked",G_CALLBACK(linphone_gtk_quit_chatroom),cr);
|
||||
gchar *text=g_strdup_printf("Chat ");
|
||||
l=gtk_label_new (text);
|
||||
gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
|
||||
gtk_box_pack_start (GTK_BOX(w),l,FALSE,FALSE,0);
|
||||
gtk_box_pack_end(GTK_BOX(w),b,TRUE,TRUE,0);
|
||||
gtk_widget_show_all(w);
|
||||
return w;
|
||||
}
|
||||
|
||||
void linphone_gtk_create_chatroom(const char *with){
|
||||
void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from, const char *message, gboolean me,LinphoneChatRoom *cr){
|
||||
GtkTextView *text=GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textview"));
|
||||
GtkTextBuffer *buffer=gtk_text_view_get_buffer(text);
|
||||
GtkTextIter iter,begin;
|
||||
GList *l = g_object_get_data(G_OBJECT(w),"list");
|
||||
gtk_text_buffer_get_start_iter(buffer,&begin);
|
||||
int off;
|
||||
gtk_text_buffer_get_end_iter(buffer,&iter);
|
||||
off=gtk_text_iter_get_offset(&iter);
|
||||
|
||||
if(g_strcmp0((char *)g_object_get_data(G_OBJECT(w),"from_message"),linphone_address_as_string(from))!=0){
|
||||
gtk_text_buffer_get_iter_at_offset(buffer,&iter,off);
|
||||
const char *display=linphone_address_get_display_name(from);
|
||||
if (display==NULL || display[0]=='\0') {
|
||||
display=linphone_address_get_username(from);
|
||||
}
|
||||
gtk_text_buffer_insert(buffer,&iter,display,-1);
|
||||
//gtk_text_buffer_apply_tag_by_name(b,"bold",&begin,&iter);
|
||||
gtk_text_buffer_get_end_iter(buffer,&iter);
|
||||
gtk_text_buffer_insert(buffer,&iter,":",-1);
|
||||
gtk_text_buffer_get_end_iter(buffer,&iter);
|
||||
gtk_text_buffer_insert(buffer,&iter,"\n",-1);
|
||||
g_object_set_data(G_OBJECT(w),"from_message",linphone_address_as_string(from));
|
||||
}
|
||||
|
||||
//gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
|
||||
gtk_text_buffer_get_end_iter(buffer,&iter);
|
||||
gtk_text_buffer_get_iter_at_offset(buffer,&begin,off);
|
||||
if(me){
|
||||
l=g_list_append(l,GINT_TO_POINTER(gtk_text_iter_get_offset(&iter)));
|
||||
g_object_set_data(G_OBJECT(w),"list",l);
|
||||
}
|
||||
gtk_text_buffer_insert(buffer,&iter,"\t",-1);
|
||||
gtk_text_buffer_insert(buffer,&iter,message,-1);
|
||||
gtk_text_buffer_get_end_iter(buffer,&iter);
|
||||
gtk_text_buffer_insert(buffer,&iter,"\n",-1);
|
||||
|
||||
GtkTextMark *mark=gtk_text_buffer_create_mark(buffer,NULL,&iter,FALSE);
|
||||
gtk_text_view_scroll_mark_onscreen(text,mark);
|
||||
//gtk_text_buffer_get_end_iter(b,&iter);
|
||||
//gtk_text_iter_forward_to_line_end(&iter);
|
||||
//gtk_text_view_scroll_to_iter(v,&iter,0,TRUE,1.0,1.0);
|
||||
gtk_text_buffer_get_bounds (buffer, &begin, &iter);
|
||||
|
||||
GHashTable *hash=(GHashTable *)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"history");
|
||||
if(me){
|
||||
g_hash_table_insert(hash,linphone_address_as_string_uri_only(linphone_chat_room_get_peer_address(cr)),
|
||||
(gpointer)gtk_text_buffer_get_text(buffer,&begin,&iter,FALSE));
|
||||
} else {
|
||||
|
||||
g_hash_table_insert(hash,linphone_address_as_string_uri_only(from),
|
||||
(gpointer)gtk_text_buffer_get_text(buffer,&begin,&iter,FALSE));
|
||||
}
|
||||
g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"history",hash);
|
||||
}
|
||||
|
||||
const LinphoneAddress* linphone_gtk_get_used_identity(){
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
LinphoneProxyConfig *cfg;
|
||||
linphone_core_get_default_proxy(lc,&cfg);
|
||||
if (cfg) return linphone_address_new(linphone_proxy_config_get_identity(cfg));
|
||||
else return linphone_core_get_primary_contact_parsed(lc);
|
||||
}
|
||||
|
||||
|
||||
/* function in dev for displaying ack*/
|
||||
void update_chat_state_message(LinphoneChatMessageState state){
|
||||
/*GdkPixbuf *pixbuf;
|
||||
|
||||
switch (state) {
|
||||
case LinphoneChatMessageStateInProgress:
|
||||
pixbuf=create_pixbuf("chat_message_in_progress.png");
|
||||
break;
|
||||
case LinphoneChatMessageStateDelivered:
|
||||
pixbuf=create_pixbuf("chat_message_delivered.png");
|
||||
break;
|
||||
case LinphoneChatMessageStateNotDelivered:
|
||||
pixbuf=create_pixbuf("chat_message_not_delivered.png");
|
||||
break;
|
||||
default : pixbuf=NULL;
|
||||
}
|
||||
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
|
||||
GtkWidget *page=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
if(page!=NULL){
|
||||
GtkTextView *text=GTK_TEXT_VIEW(linphone_gtk_get_widget(page,"textview"));
|
||||
GtkTextBuffer *b=gtk_text_view_get_buffer(text);
|
||||
GtkTextIter iter;
|
||||
GList *l = g_object_get_data(G_OBJECT(page),"list");
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
gtk_text_buffer_get_iter_at_offset(b,&iter,GPOINTER_TO_INT(g_list_nth_data(l,0)));
|
||||
fprintf(stdout,"offset check %i \n",GPOINTER_TO_INT(g_list_nth_data(l,0)));
|
||||
l=g_list_remove(l,g_list_nth_data(l,0));
|
||||
gtk_text_buffer_insert_pixbuf(b,&iter,pixbuf);
|
||||
|
||||
//gtk_text_buffer_get_end_iter(b,&iter);
|
||||
//gtk_text_buffer_insert_pixbuf(b,&iter,pixbuf);
|
||||
//gtk_text_buffer_get_end_iter(b,&iter);
|
||||
//gtk_text_buffer_insert(b,&iter,"\n",-1);
|
||||
g_object_set_data(G_OBJECT(page),"list",l);
|
||||
} else {
|
||||
fprintf(stdout,"NULLLL\n");
|
||||
}*/
|
||||
}
|
||||
|
||||
static void on_chat_state_changed(LinphoneChatMessage *msg, LinphoneChatMessageState state, void *user_pointer){
|
||||
g_message("chat message state is %s",linphone_chat_message_state_to_string(state));
|
||||
update_chat_state_message(state);
|
||||
}
|
||||
|
||||
void linphone_gtk_send_text(LinphoneChatRoom *cr){
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
|
||||
GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
|
||||
const gchar *entered;
|
||||
|
||||
LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),with);
|
||||
if (!cr) return;
|
||||
linphone_gtk_init_chatroom(cr,with);
|
||||
entered=gtk_entry_get_text(GTK_ENTRY(entry));
|
||||
if (strlen(entered)>0) {
|
||||
LinphoneChatMessage *msg;
|
||||
linphone_gtk_push_text(w,
|
||||
linphone_gtk_get_used_identity(),
|
||||
entered,TRUE,g_object_get_data(G_OBJECT(w),"cr"));
|
||||
msg=linphone_chat_room_create_message(cr,entered);
|
||||
linphone_chat_room_send_message2(cr,msg,on_chat_state_changed,NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry),"");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with){
|
||||
GtkWidget *chat_view=linphone_gtk_create_widget("main","chatroom_frame");
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window ();
|
||||
GHashTable *hash=g_object_get_data(G_OBJECT(main_window),"history");
|
||||
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
|
||||
GtkWidget *text=linphone_gtk_get_widget(chat_view,"textview");
|
||||
int idx;
|
||||
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(text),GTK_WRAP_WORD);
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW(text),FALSE);
|
||||
gtk_notebook_append_page (notebook,chat_view,create_tab_chat_header(cr,with));
|
||||
idx = gtk_notebook_page_num(notebook, chat_view);
|
||||
gtk_notebook_set_current_page(notebook, idx);
|
||||
gtk_widget_show(chat_view);
|
||||
|
||||
GList *l = NULL;
|
||||
g_object_set_data(G_OBJECT(chat_view),"cr",cr);
|
||||
g_object_set_data(G_OBJECT(chat_view),"idx",GINT_TO_POINTER(idx));
|
||||
g_object_set_data(G_OBJECT(chat_view),"from_message",NULL);
|
||||
g_object_set_data(G_OBJECT(chat_view),"from_chatroom",linphone_address_as_string_uri_only(with));
|
||||
g_object_set_data(G_OBJECT(chat_view),"list",l);
|
||||
|
||||
gchar *buf=g_hash_table_lookup(hash,linphone_address_as_string_uri_only(with));
|
||||
if(buf != NULL){
|
||||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
|
||||
GtkTextBuffer *text_buffer;
|
||||
text_buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
|
||||
gtk_text_buffer_get_bounds(text_buffer, &start, &end);
|
||||
g_object_set_data(G_OBJECT(chat_view),"cr",cr);
|
||||
gtk_text_buffer_delete (text_buffer, &start, &end);
|
||||
gtk_text_buffer_insert(text_buffer,&start,buf,-1);
|
||||
}
|
||||
|
||||
GtkWidget *button = linphone_gtk_get_widget(chat_view,"send");
|
||||
g_signal_connect_swapped(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_send_text,cr);
|
||||
|
||||
GtkWidget *entry = linphone_gtk_get_widget(chat_view,"text_entry");
|
||||
g_signal_connect_swapped(G_OBJECT(entry),"activate",(GCallback)linphone_gtk_send_text,cr);
|
||||
|
||||
return chat_view;
|
||||
}
|
||||
|
||||
LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with){
|
||||
LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),linphone_address_as_string(with));
|
||||
if (!cr) return NULL;
|
||||
return cr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view){
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window ();
|
||||
GHashTable *hash=g_object_get_data(G_OBJECT(main_window),"history");
|
||||
if(g_strcmp0((char *)g_object_get_data(G_OBJECT(chat_view),"from_chatroom"),
|
||||
linphone_address_as_string_uri_only(uri))!=0)
|
||||
{
|
||||
GtkTextView *text_view=GTK_TEXT_VIEW(linphone_gtk_get_widget(chat_view,"textview"));
|
||||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
gchar *buf=g_hash_table_lookup(hash,linphone_address_as_string_uri_only(uri));
|
||||
GtkTextBuffer *text_buffer;
|
||||
text_buffer=gtk_text_view_get_buffer(text_view);
|
||||
gtk_text_buffer_get_bounds(text_buffer, &start, &end);
|
||||
g_object_set_data(G_OBJECT(chat_view),"cr",cr);
|
||||
gtk_text_buffer_delete (text_buffer, &start, &end);
|
||||
if(buf!=NULL){
|
||||
gtk_text_buffer_insert(text_buffer,&start,buf,-1);
|
||||
} else {
|
||||
g_object_set_data(G_OBJECT(chat_view),"from_message",NULL);
|
||||
GtkWidget *entry = linphone_gtk_get_widget(chat_view,"text_entry");
|
||||
g_signal_connect_swapped(G_OBJECT(entry),"activate",(GCallback)linphone_gtk_send_text,cr);
|
||||
|
||||
GtkWidget *button = linphone_gtk_get_widget(chat_view,"send");
|
||||
g_signal_connect_swapped(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_send_text,cr);
|
||||
}
|
||||
|
||||
g_object_set_data(G_OBJECT(chat_view),"from_chatroom",linphone_address_as_string_uri_only(uri));
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_chat_destroyed(GtkWidget *w){
|
||||
|
|
@ -58,84 +276,37 @@ void linphone_gtk_chat_close(GtkWidget *button){
|
|||
gtk_widget_destroy(w);
|
||||
}
|
||||
|
||||
void linphone_gtk_push_text(GtkTextView *v, const char *from, const char *message, gboolean me){
|
||||
GtkTextBuffer *b=gtk_text_view_get_buffer(v);
|
||||
GtkTextIter iter,begin;
|
||||
int off;
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
off=gtk_text_iter_get_offset(&iter);
|
||||
gtk_text_buffer_insert(b,&iter,from,-1);
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
gtk_text_buffer_insert(b,&iter,":\t",-1);
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
gtk_text_buffer_get_iter_at_offset(b,&begin,off);
|
||||
gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
|
||||
gtk_text_buffer_insert(b,&iter,message,-1);
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
gtk_text_buffer_insert(b,&iter,"\n",-1);
|
||||
gtk_text_buffer_get_end_iter(b,&iter);
|
||||
|
||||
GtkTextMark *mark=gtk_text_buffer_create_mark(b,NULL,&iter,FALSE);
|
||||
gtk_text_view_scroll_mark_onscreen(v,mark);
|
||||
//gtk_text_buffer_get_end_iter(b,&iter);
|
||||
//gtk_text_iter_forward_to_line_end(&iter);
|
||||
//gtk_text_view_scroll_to_iter(v,&iter,0,TRUE,1.0,1.0);
|
||||
}
|
||||
|
||||
const char* linphone_gtk_get_used_identity(){
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
LinphoneProxyConfig *cfg;
|
||||
linphone_core_get_default_proxy(lc,&cfg);
|
||||
if (cfg) return linphone_proxy_config_get_identity(cfg);
|
||||
else return linphone_core_get_primary_contact(lc);
|
||||
}
|
||||
|
||||
static void on_chat_state_changed(LinphoneChatMessage *msg, LinphoneChatMessageState state, void *user_pointer){
|
||||
g_message("chat message state is %s",linphone_chat_message_state_to_string(state));
|
||||
}
|
||||
|
||||
void linphone_gtk_send_text(GtkWidget *button){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(button);
|
||||
GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
|
||||
LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
|
||||
const gchar *entered;
|
||||
entered=gtk_entry_get_text(GTK_ENTRY(entry));
|
||||
if (strlen(entered)>0) {
|
||||
LinphoneChatMessage *msg;
|
||||
linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
|
||||
linphone_gtk_get_used_identity(),
|
||||
entered,TRUE);
|
||||
msg=linphone_chat_room_create_message(cr,entered);
|
||||
linphone_chat_room_send_message2(cr,msg,on_chat_state_changed,NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry),"");
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message){
|
||||
GtkWidget *w=(GtkWidget*)linphone_chat_room_get_user_data(room);
|
||||
if (w==NULL){
|
||||
w=linphone_gtk_init_chatroom(room,linphone_address_as_string_uri_only(from));
|
||||
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(FALSE));
|
||||
}
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
|
||||
GtkWidget *w;
|
||||
|
||||
w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
if(w!=NULL){
|
||||
linphone_gtk_load_chatroom(room,from,w);
|
||||
} else {
|
||||
w=linphone_gtk_init_chatroom(room,from);
|
||||
g_object_set_data(G_OBJECT(friendlist),"chatview",(gpointer)w);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_GTK_OSX
|
||||
/* Notified when a new message is sent */
|
||||
linphone_gtk_status_icon_set_blinking(TRUE);
|
||||
#else
|
||||
if (!gtk_window_is_active((GtkWindow*)w)){
|
||||
#else
|
||||
if(!gtk_window_is_active(GTK_WINDOW(main_window))){
|
||||
if(!GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"is_notified"))){
|
||||
linphone_gtk_notify(NULL,message);
|
||||
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(TRUE));
|
||||
} else {
|
||||
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(FALSE));
|
||||
}
|
||||
} else {
|
||||
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(FALSE));
|
||||
}
|
||||
#endif
|
||||
|
||||
linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
|
||||
linphone_address_as_string_uri_only(from),
|
||||
message,FALSE);
|
||||
gtk_window_present(GTK_WINDOW(w));
|
||||
linphone_gtk_push_text(w,from,message,FALSE,room);
|
||||
//linphone_gtk_update_chat_picture(TRUE);
|
||||
//gtk_window_present(GTK_WINDOW(w));
|
||||
/*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
|
||||
}
|
||||
|
||||
|
|
|
|||
118
gtk/chatroom.ui
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 2.12 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkWindow" id="chatroom">
|
||||
<signal name="destroy" handler="linphone_gtk_chat_destroyed"/>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="textlog">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="wrap_mode">word</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="text_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<signal name="activate" handler="linphone_gtk_send_text"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="send">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="linphone_gtk_send_text"/>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-ok</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Send</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">7</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="linphone_gtk_chat_close"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "linphone.h"
|
||||
|
||||
#define PADDING_PIXELS 4
|
||||
|
|
@ -48,27 +48,32 @@ static void init_local_participant(GtkWidget *participant){
|
|||
|
||||
static GtkWidget *get_conference_tab(GtkWidget *mw){
|
||||
GtkWidget *box=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conference_tab");
|
||||
if (box==NULL){
|
||||
box=gtk_vbox_new(FALSE,0);
|
||||
GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
|
||||
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
|
||||
init_local_participant(participant);
|
||||
gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,PADDING_PIXELS);
|
||||
gtk_widget_show(box);
|
||||
g_object_set_data(G_OBJECT(mw),"conference_tab",box);
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(linphone_gtk_get_widget(mw,"viewswitch")),box,
|
||||
create_conference_label());
|
||||
GtkWidget *conf_frame=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conf_frame");
|
||||
if(conf_frame!=NULL){
|
||||
if (box==NULL){
|
||||
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
|
||||
box=gtk_vbox_new(FALSE,0);
|
||||
GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
|
||||
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
|
||||
init_local_participant(participant);
|
||||
gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,PADDING_PIXELS);
|
||||
gtk_widget_show(box);
|
||||
g_object_set_data(G_OBJECT(mw),"conference_tab",box);
|
||||
gtk_box_pack_start(GTK_BOX(conf_box),box,FALSE,FALSE,PADDING_PIXELS);
|
||||
}
|
||||
}
|
||||
return box;
|
||||
}
|
||||
|
||||
static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
GtkWidget *tab=get_conference_tab(mw);
|
||||
get_conference_tab(mw);
|
||||
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
|
||||
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
|
||||
GList *elem;
|
||||
GtkWidget *ret=NULL;
|
||||
if (call!=NULL){
|
||||
GList *l=gtk_container_get_children(GTK_CONTAINER(tab));
|
||||
GList *l=gtk_container_get_children(GTK_CONTAINER(conf_box));
|
||||
for(elem=l;elem!=NULL;elem=elem->next){
|
||||
GtkWidget *frame=(GtkWidget*)elem->data;
|
||||
if (call==g_object_get_data(G_OBJECT(frame),"call")){
|
||||
|
|
@ -84,14 +89,25 @@ static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
|
|||
|
||||
void linphone_gtk_set_in_conference(LinphoneCall *call){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
GtkWidget *participant=find_conferencee_from_call(call);
|
||||
|
||||
GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
|
||||
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
|
||||
g_object_set_data(G_OBJECT(mw),"is_conf",GINT_TO_POINTER(TRUE));
|
||||
if(conf_frame==NULL){
|
||||
conf_frame=linphone_gtk_create_widget("main","conf_frame");
|
||||
GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
|
||||
GtkWidget *image=create_pixmap("stopcall-red.png");
|
||||
gtk_button_set_image(GTK_BUTTON(button_conf),image);
|
||||
g_signal_connect_swapped(G_OBJECT(button_conf),"clicked",(GCallback)linphone_gtk_terminate_call,NULL);
|
||||
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(viewswitch),conf_frame,
|
||||
create_conference_label());
|
||||
}
|
||||
GtkWidget *participant=find_conferencee_from_call(call);
|
||||
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
|
||||
if (participant==NULL){
|
||||
GtkWidget *tab=get_conference_tab(mw);
|
||||
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
|
||||
participant=linphone_gtk_create_widget("main","callee_frame");
|
||||
GtkWidget *sound_meter;
|
||||
GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
|
||||
gchar *markup;
|
||||
if (linphone_address_get_display_name(addr)!=NULL){
|
||||
markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));
|
||||
|
|
@ -103,17 +119,14 @@ void linphone_gtk_set_in_conference(LinphoneCall *call){
|
|||
gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(participant,"callee_name_label")),markup);
|
||||
g_free(markup);
|
||||
sound_meter=linphone_gtk_get_widget(participant,"sound_indicator");
|
||||
linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
|
||||
gtk_box_pack_start(GTK_BOX(tab),participant,FALSE,FALSE,PADDING_PIXELS);
|
||||
linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
|
||||
gtk_box_pack_start(GTK_BOX(conf_box),participant,FALSE,FALSE,PADDING_PIXELS);
|
||||
g_object_set_data_full(G_OBJECT(participant),"call",linphone_call_ref(call),(GDestroyNotify)linphone_call_unref);
|
||||
gtk_widget_show(participant);
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(viewswitch),
|
||||
gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),tab));
|
||||
gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),conf_frame));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void linphone_gtk_terminate_conference_participant(LinphoneCall *call){
|
||||
GtkWidget *frame=find_conferencee_from_call(call);
|
||||
if (frame){
|
||||
|
|
@ -123,20 +136,23 @@ void linphone_gtk_terminate_conference_participant(LinphoneCall *call){
|
|||
|
||||
void linphone_gtk_unset_from_conference(LinphoneCall *call){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
GtkWidget *box=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conference_tab");
|
||||
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
|
||||
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
|
||||
GtkWidget *frame;
|
||||
if (box==NULL) return; /*conference tab already destroyed*/
|
||||
if (conf_box==NULL) return; /*conference tab already destroyed*/
|
||||
frame=find_conferencee_from_call(call);
|
||||
GList *children;
|
||||
if (frame){
|
||||
gtk_widget_destroy(frame);
|
||||
}
|
||||
children=gtk_container_get_children(GTK_CONTAINER(box));
|
||||
children=gtk_container_get_children(GTK_CONTAINER(conf_box));
|
||||
if (g_list_length(children)==2){
|
||||
/*the conference is terminated */
|
||||
gtk_widget_destroy(box);
|
||||
g_object_set_data(G_OBJECT(mw),"conference_tab",NULL);
|
||||
gtk_widget_destroy(conf_box);
|
||||
g_object_set_data(G_OBJECT(mw),"conference_tab",NULL);
|
||||
}
|
||||
gtk_widget_destroy(conf_frame);
|
||||
g_list_free(children);
|
||||
g_object_set_data(G_OBJECT(mw),"is_conf",GINT_TO_POINTER(FALSE));
|
||||
g_object_set_data(G_OBJECT(mw),"conf_frame",NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox7">
|
||||
|
|
|
|||
410
gtk/friendlist.c
|
|
@ -27,12 +27,15 @@ enum{
|
|||
FRIEND_NAME,
|
||||
FRIEND_PRESENCE_STATUS,
|
||||
FRIEND_ID,
|
||||
FRIEND_CHATROOM,
|
||||
FRIEND_SIP_ADDRESS,
|
||||
FRIEND_ICON,
|
||||
FRIEND_CALL,
|
||||
FRIEND_CHAT,
|
||||
FRIEND_CHAT_CONVERSATION,
|
||||
FRIEND_LIST_NCOL
|
||||
};
|
||||
|
||||
|
||||
typedef struct _status_picture_tab_t{
|
||||
LinphoneOnlineStatus status;
|
||||
const char *img;
|
||||
|
|
@ -67,6 +70,24 @@ static GdkPixbuf *create_status_picture(LinphoneOnlineStatus ss){
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static GdkPixbuf *create_call_picture(){
|
||||
GdkPixbuf *pixbuf;
|
||||
pixbuf = create_pixbuf("call.png");
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
static GdkPixbuf *create_chat_picture(){
|
||||
GdkPixbuf *pixbuf;
|
||||
pixbuf = create_pixbuf("chat.png");
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
static GdkPixbuf *create_active_chat_picture(){
|
||||
GdkPixbuf *pixbuf;
|
||||
pixbuf = create_pixbuf("active_chat.png");
|
||||
return pixbuf;
|
||||
}
|
||||
/*
|
||||
void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
|
||||
GtkTreeIter iter;
|
||||
LinphoneFriend *tmp=0;
|
||||
|
|
@ -87,10 +108,8 @@ void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid
|
|||
}
|
||||
}while(gtk_tree_model_iter_next(model,&iter));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
|
|
@ -107,22 +126,141 @@ static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
|
|||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_add_contact(){
|
||||
GtkWidget *w=linphone_gtk_create_window("contact");
|
||||
int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
|
||||
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
|
||||
presence_enabled);
|
||||
gtk_widget_show(w);
|
||||
}
|
||||
|
||||
void linphone_gtk_edit_contact(GtkWidget *button){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(button);
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter))
|
||||
{
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
linphone_gtk_show_contact(lf);
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_remove_contact(GtkWidget *button){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(button);
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter))
|
||||
{
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
linphone_core_remove_friend(linphone_gtk_get_core(),lf);
|
||||
linphone_gtk_show_friends();
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_gtk_call_selected(GtkTreeView *treeview){
|
||||
linphone_gtk_set_selection_to_uri_bar(treeview);
|
||||
linphone_gtk_start_call(linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(treeview)),
|
||||
"start_call"));
|
||||
}
|
||||
|
||||
void linphone_gtk_update_chat_picture(gboolean active){
|
||||
GtkTreeIter iter;
|
||||
GtkWidget *w = linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
|
||||
GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)) {
|
||||
do{
|
||||
if(!active){
|
||||
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,create_chat_picture(),-1);
|
||||
} else {
|
||||
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,create_active_chat_picture(),-1);
|
||||
}
|
||||
}while(gtk_tree_model_iter_next(model,&iter));
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean grab_focus(GtkWidget *w){
|
||||
gtk_widget_grab_focus(w);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void linphone_gtk_chat_selected(GtkWidget *item){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(item);
|
||||
GtkTreeSelection *select;
|
||||
GtkListStore *store=NULL;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
LinphoneChatRoom *cr=NULL;
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
|
||||
GtkWidget *page;
|
||||
|
||||
select=gtk_tree_view_get_selection(GTK_TREE_VIEW(friendlist));
|
||||
store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(item)));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter)){
|
||||
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(w,"viewswitch");
|
||||
gtk_tree_model_get(model,&iter,FRIEND_CHATROOM,&cr,-1);
|
||||
const LinphoneAddress *uri;
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
uri=linphone_friend_get_address(lf);
|
||||
if(cr == NULL){
|
||||
cr=linphone_gtk_create_chatroom(uri);
|
||||
gtk_list_store_set(store,&iter, FRIEND_CHATROOM,cr,-1);
|
||||
gtk_list_store_set(store,&iter, FRIEND_CHAT_CONVERSATION,NULL,-1);
|
||||
}
|
||||
page=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
if(page==NULL){
|
||||
page=linphone_gtk_init_chatroom(cr,uri);
|
||||
g_object_set_data(G_OBJECT(friendlist),"chatview",(gpointer)page);
|
||||
} else {
|
||||
linphone_gtk_load_chatroom(cr,uri,page);
|
||||
}
|
||||
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
|
||||
linphone_gtk_update_chat_picture(FALSE);
|
||||
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
|
||||
gtk_list_store_set(store,&iter,FRIEND_CHAT,create_active_chat_picture(),-1);
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_contact_activated(GtkTreeView *treeview,
|
||||
GtkTreePath *path,
|
||||
GtkTreeViewColumn *column,
|
||||
gpointer user_data)
|
||||
{
|
||||
linphone_gtk_call_selected(treeview);
|
||||
//linphone_gtk_call_selected(treeview);
|
||||
}
|
||||
|
||||
void linphone_gtk_contact_clicked(GtkTreeView *treeview){
|
||||
linphone_gtk_set_selection_to_uri_bar(treeview);
|
||||
if(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview),"numcol"))==1){
|
||||
linphone_gtk_call_selected(treeview);
|
||||
} else {
|
||||
if(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(treeview),"numcol"))==2){
|
||||
linphone_gtk_chat_selected(GTK_WIDGET(treeview));
|
||||
}
|
||||
}
|
||||
g_object_set_data(G_OBJECT(treeview),"numcol",GINT_TO_POINTER(0));
|
||||
}
|
||||
|
||||
|
||||
void linphone_gtk_add_button_clicked(void){
|
||||
linphone_gtk_add_contact();
|
||||
}
|
||||
|
||||
void linphone_gtk_edit_button_clicked(GtkWidget *button){
|
||||
linphone_gtk_edit_contact(button);
|
||||
}
|
||||
|
||||
void linphone_gtk_remove_button_clicked(GtkWidget *button){
|
||||
linphone_gtk_remove_contact(button);
|
||||
}
|
||||
|
||||
static GtkWidget * create_presence_menu(){
|
||||
|
|
@ -275,7 +413,7 @@ static gint friend_sort(GtkTreeModel *model, GtkTreeIter *a,GtkTreeIter *b,gpoin
|
|||
static void on_name_column_clicked(GtkTreeModel *model){
|
||||
GtkSortType st;
|
||||
gint column;
|
||||
|
||||
|
||||
gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(model),&column,&st);
|
||||
if (column==FRIEND_NAME){
|
||||
if (st==GTK_SORT_ASCENDING) st=GTK_SORT_DESCENDING;
|
||||
|
|
@ -284,7 +422,6 @@ static void on_name_column_clicked(GtkTreeModel *model){
|
|||
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model),FRIEND_NAME,st);
|
||||
}
|
||||
|
||||
|
||||
static int get_friend_weight(const LinphoneFriend *lf){
|
||||
int w=0;
|
||||
switch(linphone_friend_get_status(lf)){
|
||||
|
|
@ -320,14 +457,6 @@ static int friend_compare_func(const LinphoneFriend *lf1, const LinphoneFriend *
|
|||
return w2-w1;
|
||||
}
|
||||
|
||||
static gint friend_sort_with_presence(GtkTreeModel *model, GtkTreeIter *a,GtkTreeIter *b,gpointer user_data){
|
||||
LinphoneFriend *lf1=NULL,*lf2=NULL;
|
||||
gtk_tree_model_get(model,a,FRIEND_ID,&lf1,-1);
|
||||
gtk_tree_model_get(model,b,FRIEND_ID,&lf2,-1);
|
||||
return friend_compare_func(lf1,lf2);
|
||||
}
|
||||
|
||||
|
||||
static MSList *sort_friend_list(const MSList *friends){
|
||||
MSList *ret=NULL;
|
||||
const MSList *elem;
|
||||
|
|
@ -343,7 +472,7 @@ static MSList *sort_friend_list(const MSList *friends){
|
|||
static void on_presence_column_clicked(GtkTreeModel *model){
|
||||
GtkSortType st;
|
||||
gint column;
|
||||
|
||||
|
||||
gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(model),&column,&st);
|
||||
if (column==FRIEND_ID){
|
||||
if (st==GTK_SORT_ASCENDING) st=GTK_SORT_DESCENDING;
|
||||
|
|
@ -352,44 +481,37 @@ static void on_presence_column_clicked(GtkTreeModel *model){
|
|||
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model),FRIEND_ID,st);
|
||||
}
|
||||
|
||||
static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
|
||||
{
|
||||
void create_button(){
|
||||
GtkWidget *main_window = linphone_gtk_get_main_window ();
|
||||
GtkWidget *button_add = linphone_gtk_get_widget(main_window,"add_button");
|
||||
GtkWidget *image;
|
||||
|
||||
image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (button_add), image);
|
||||
}
|
||||
|
||||
static void linphone_gtk_friend_list_init(GtkWidget *friendlist){
|
||||
GtkListStore *store;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *select;
|
||||
|
||||
linphone_gtk_init_bookmark_icon();
|
||||
|
||||
store = gtk_list_store_new(FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER,
|
||||
G_TYPE_STRING, GDK_TYPE_PIXBUF);
|
||||
|
||||
store = gtk_list_store_new(FRIEND_LIST_NCOL,GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER,
|
||||
G_TYPE_POINTER, G_TYPE_STRING, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(friendlist),GTK_TREE_MODEL(store));
|
||||
g_object_unref(G_OBJECT(store));
|
||||
|
||||
/* Tree specification*/
|
||||
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(friendlist),FALSE);
|
||||
gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(friendlist),friend_search_func,NULL,NULL);
|
||||
gtk_tree_view_set_search_column(GTK_TREE_VIEW(friendlist),FRIEND_NAME);
|
||||
|
||||
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(store),FRIEND_NAME,friend_sort,NULL,NULL);
|
||||
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(store),FRIEND_ID,friend_sort_with_presence,NULL,NULL);
|
||||
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Name"),
|
||||
renderer,
|
||||
"pixbuf", FRIEND_ICON,
|
||||
NULL);
|
||||
g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
|
||||
g_signal_connect_swapped(G_OBJECT(column),"clicked",(GCallback)on_name_column_clicked,GTK_TREE_MODEL(store));
|
||||
gtk_tree_view_column_set_clickable(column,TRUE);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_tree_view_column_pack_start(column,renderer,FALSE);
|
||||
gtk_tree_view_column_add_attribute (column,renderer,
|
||||
"text",
|
||||
FRIEND_NAME);
|
||||
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
|
||||
|
||||
/*Name and presence column*/
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
|
||||
renderer,
|
||||
"text", FRIEND_PRESENCE_STATUS,
|
||||
|
|
@ -398,21 +520,46 @@ static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
|
|||
g_signal_connect_swapped(G_OBJECT(column),"clicked",(GCallback)on_presence_column_clicked,GTK_TREE_MODEL(store));
|
||||
gtk_tree_view_column_set_clickable(column,TRUE);
|
||||
gtk_tree_view_column_set_visible(column,linphone_gtk_get_ui_config_int("friendlist_status",1));
|
||||
|
||||
|
||||
renderer = gtk_cell_renderer_pixbuf_new();
|
||||
gtk_tree_view_column_pack_start(column,renderer,FALSE);
|
||||
gtk_tree_view_column_pack_start(column,renderer,TRUE);
|
||||
gtk_tree_view_column_add_attribute (column,renderer,
|
||||
"pixbuf",
|
||||
FRIEND_PRESENCE_IMG);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Name"),
|
||||
renderer,
|
||||
"text", FRIEND_NAME,NULL);
|
||||
g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
|
||||
g_signal_connect_swapped(G_OBJECT(column),"clicked",(GCallback)on_name_column_clicked,GTK_TREE_MODEL(store));
|
||||
gtk_tree_view_column_set_clickable(column,TRUE);
|
||||
gtk_tree_view_column_set_expand(column,TRUE);
|
||||
gtk_tree_view_column_set_max_width(column,60);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
|
||||
|
||||
/* Call column*/
|
||||
renderer = gtk_cell_renderer_pixbuf_new();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Call"),renderer,"pixbuf",FRIEND_CALL,NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
|
||||
|
||||
/* chat column*/
|
||||
renderer = gtk_cell_renderer_pixbuf_new();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Chat"),renderer,"pixbuf",FRIEND_CHAT,NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
|
||||
|
||||
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
|
||||
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
|
||||
|
||||
gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(friendlist),GTK_TREE_VIEW_GRID_LINES_NONE);
|
||||
#if GTK_CHECK_VERSION(2,12,0)
|
||||
gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(friendlist),FRIEND_SIP_ADDRESS);
|
||||
#endif
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
|
||||
gtk_widget_get_toplevel(friendlist),"show_category")),0);
|
||||
|
||||
gtk_widget_set_size_request(friendlist,200,100);
|
||||
/*gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
|
||||
gtk_widget_get_toplevel(friendlist),"show_category")),0);*/
|
||||
}
|
||||
|
||||
void linphone_gtk_show_directory_search(void){
|
||||
|
|
@ -468,29 +615,27 @@ void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
|
|||
linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"directory_search_entry"));
|
||||
}
|
||||
|
||||
|
||||
void linphone_gtk_show_friends(void){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
|
||||
GtkListStore *store=NULL;
|
||||
GtkTreeIter iter;
|
||||
const MSList *itf;
|
||||
GtkWidget *category=linphone_gtk_get_widget(mw,"show_category");
|
||||
GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
|
||||
LinphoneCore *core=linphone_gtk_get_core();
|
||||
const gchar *search=NULL;
|
||||
gboolean online_only=FALSE,lookup=FALSE;
|
||||
gboolean lookup=FALSE;
|
||||
MSList *sorted;
|
||||
|
||||
|
||||
linphone_gtk_show_directory_search();
|
||||
|
||||
if (gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist))==NULL){
|
||||
linphone_gtk_friend_list_init(friendlist);
|
||||
}
|
||||
|
||||
store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
|
||||
gtk_list_store_clear(store);
|
||||
|
||||
online_only=(gtk_combo_box_get_active(GTK_COMBO_BOX(category))==1);
|
||||
search=gtk_entry_get_text(GTK_ENTRY(filter));
|
||||
if (search==NULL || search[0]=='\0')
|
||||
lookup=FALSE;
|
||||
|
|
@ -511,60 +656,36 @@ void linphone_gtk_show_friends(void){
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (!online_only || (linphone_friend_get_status(lf)!=LinphoneStatusOffline)){
|
||||
BuddyInfo *bi;
|
||||
gboolean send_subscribe=linphone_friend_get_send_subscribe(lf);
|
||||
if (name==NULL || name[0]=='\0') display=uri;
|
||||
gtk_list_store_append(store,&iter);
|
||||
gtk_list_store_set(store,&iter,FRIEND_NAME, display,
|
||||
FRIEND_PRESENCE_STATUS,
|
||||
send_subscribe ? linphone_online_status_to_string(linphone_friend_get_status(lf)) : "",
|
||||
FRIEND_ID,lf,
|
||||
FRIEND_PRESENCE_IMG, send_subscribe ? create_status_picture(linphone_friend_get_status(lf)) : NULL,
|
||||
-1);
|
||||
escaped=g_markup_escape_text(uri,-1);
|
||||
gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
|
||||
g_free(escaped);
|
||||
bi=linphone_friend_get_info(lf);
|
||||
if (bi!=NULL && bi->image_data!=NULL){
|
||||
GdkPixbuf *pbuf=
|
||||
_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
|
||||
if (pbuf) {
|
||||
gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
|
||||
g_object_unref(G_OBJECT(pbuf));
|
||||
}
|
||||
}
|
||||
//BuddyInfo *bi;
|
||||
gboolean send_subscribe=linphone_friend_get_send_subscribe(lf);
|
||||
if (name==NULL || name[0]=='\0') {
|
||||
display=linphone_address_get_username(f_uri);
|
||||
}
|
||||
gtk_list_store_append(store,&iter);
|
||||
gtk_list_store_set(store,&iter,FRIEND_NAME, display,FRIEND_ID,lf,
|
||||
FRIEND_PRESENCE_IMG, send_subscribe ? create_status_picture(linphone_friend_get_status(lf)) : NULL,
|
||||
-1);
|
||||
|
||||
gtk_list_store_set(store,&iter,FRIEND_CALL,create_call_picture(),-1);
|
||||
gtk_list_store_set(store,&iter,FRIEND_CHAT,create_chat_picture(),-1);
|
||||
|
||||
escaped=g_markup_escape_text(uri,-1);
|
||||
gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
|
||||
g_free(escaped);
|
||||
//bi=linphone_friend_get_info(lf);
|
||||
/*if (bi!=NULL && bi->image_data!=NULL){
|
||||
GdkPixbuf *pbuf=
|
||||
_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
|
||||
if (pbuf) {
|
||||
//gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
|
||||
g_object_unref(G_OBJECT(pbuf));
|
||||
}
|
||||
}*/
|
||||
ms_free(uri);
|
||||
}
|
||||
ms_list_free(sorted);
|
||||
}
|
||||
|
||||
void linphone_gtk_add_contact(){
|
||||
GtkWidget *w=linphone_gtk_create_window("contact");
|
||||
int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
|
||||
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
|
||||
presence_enabled);
|
||||
gtk_widget_show(w);
|
||||
}
|
||||
|
||||
void linphone_gtk_remove_contact(GtkWidget *button){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(button);
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter))
|
||||
{
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
linphone_core_remove_friend(linphone_gtk_get_core(),lf);
|
||||
linphone_gtk_show_friends();
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_show_contact(LinphoneFriend *lf){
|
||||
GtkWidget *w=linphone_gtk_create_window("contact");
|
||||
char *uri;
|
||||
|
|
@ -587,37 +708,6 @@ void linphone_gtk_show_contact(LinphoneFriend *lf){
|
|||
gtk_widget_show(w);
|
||||
}
|
||||
|
||||
void linphone_gtk_edit_contact(GtkWidget *button){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(button);
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter))
|
||||
{
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
linphone_gtk_show_contact(lf);
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_chat_selected(GtkWidget *item){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(item);
|
||||
GtkTreeSelection *select;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
LinphoneFriend *lf=NULL;
|
||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
|
||||
if (gtk_tree_selection_get_selected (select, &model, &iter))
|
||||
{
|
||||
char *uri;
|
||||
gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
|
||||
uri=linphone_address_as_string(linphone_friend_get_address(lf));
|
||||
linphone_gtk_create_chatroom(uri);
|
||||
ms_free(uri);
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_contact_cancel(GtkWidget *button){
|
||||
gtk_widget_destroy(gtk_widget_get_toplevel(button));
|
||||
}
|
||||
|
|
@ -730,7 +820,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
|
|||
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
|
||||
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_remove_contact,contact_list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (ssc && (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP)) {
|
||||
gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
|
||||
|
|
@ -744,7 +834,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
|
|||
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
|
||||
gtk_widget_show(menu);
|
||||
}
|
||||
|
||||
|
||||
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
|
||||
|
|
@ -759,19 +849,75 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
|
|||
return menu;
|
||||
}
|
||||
|
||||
|
||||
gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event){
|
||||
GtkWidget *m=linphone_gtk_create_contact_menu(list);
|
||||
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
|
||||
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
|
||||
event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint get_col_number_from_tree_view_column (GtkTreeViewColumn *col){
|
||||
GList *cols;
|
||||
gint num;
|
||||
g_return_val_if_fail ( col != NULL, -1 );
|
||||
g_return_val_if_fail ( col->tree_view != NULL, -1 );
|
||||
cols = gtk_tree_view_get_columns(GTK_TREE_VIEW(col->tree_view));
|
||||
num = g_list_index(cols, (gpointer) col);
|
||||
g_list_free(cols);
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
int longueur_list (GtkTreeView *tree_view){
|
||||
GtkTreeIter iter;
|
||||
int i=0;
|
||||
GtkTreeModel *model=gtk_tree_view_get_model(tree_view);
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)) {
|
||||
do{
|
||||
i++;
|
||||
}while(gtk_tree_model_iter_next(model,&iter));
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static gint tree_view_get_cell_from_pos(GtkTreeView *view, guint x, guint y){
|
||||
GtkTreeViewColumn *col = NULL;
|
||||
GList *node, *columns;
|
||||
gint colx = 0;
|
||||
gint coly = longueur_list(view);
|
||||
gint height=0;
|
||||
|
||||
g_return_val_if_fail ( view != NULL, 0 );
|
||||
columns = gtk_tree_view_get_columns(view);
|
||||
|
||||
for (node = columns; node != NULL && col == NULL; node = node->next){
|
||||
GtkTreeViewColumn *checkcol = (GtkTreeViewColumn*) node->data;
|
||||
gtk_tree_view_column_cell_get_size(checkcol,NULL,NULL,NULL,NULL,&height);
|
||||
if (x >= colx && x < (colx + checkcol->width) && y < height*coly){
|
||||
col = checkcol;
|
||||
gint num = get_col_number_from_tree_view_column(col);
|
||||
return num;
|
||||
}
|
||||
else {
|
||||
colx += checkcol->width;
|
||||
}
|
||||
}
|
||||
g_list_free(columns);
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
|
||||
/* Ignore double-clicks and triple-clicks */
|
||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
return linphone_gtk_popup_contact_menu(widget, event);
|
||||
} else if(event->button == 1 && event->type == GDK_BUTTON_PRESS){
|
||||
gint numcol = tree_view_get_cell_from_pos(GTK_TREE_VIEW(widget),event->x,event->y);
|
||||
if(numcol==2){
|
||||
g_object_set_data(G_OBJECT(widget),"numcol",GINT_TO_POINTER(1));
|
||||
} else if(numcol==3){
|
||||
g_object_set_data(G_OBJECT(widget),"numcol",GINT_TO_POINTER(2));
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/*
|
||||
* C Implementation: incall_frame
|
||||
*
|
||||
* Description:
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
* Author: Simon Morlat <simon.morlat@linphone.org>, (C) 2009
|
||||
|
|
@ -50,7 +50,7 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
|
|||
if (page!=NULL){
|
||||
LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(page),"call");
|
||||
if (call==NULL){
|
||||
if (page==g_object_get_data(G_OBJECT(main_window),"conference_tab")){
|
||||
if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(main_window),"is_conf"))){
|
||||
if (is_conf)
|
||||
*is_conf=TRUE;
|
||||
return NULL;
|
||||
|
|
@ -74,12 +74,34 @@ static GtkWidget *make_tab_header(int number){
|
|||
return w;
|
||||
}
|
||||
|
||||
void update_tab_header(LinphoneCall *call,gboolean pause){
|
||||
GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
|
||||
gint call_index=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"call_index"));
|
||||
GtkWidget *new_label=gtk_hbox_new (FALSE,0);
|
||||
GtkWidget *i=NULL;
|
||||
if(pause){
|
||||
i=gtk_image_new_from_stock(GTK_STOCK_MEDIA_PAUSE,GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||
} else {
|
||||
i=create_pixmap ("status-green.png");
|
||||
}
|
||||
GtkWidget *l;
|
||||
gchar *text=g_strdup_printf(_("Call #%i"),call_index);
|
||||
l=gtk_label_new (text);
|
||||
gtk_box_pack_start (GTK_BOX(new_label),i,FALSE,FALSE,0);
|
||||
gtk_box_pack_end(GTK_BOX(new_label),l,TRUE,TRUE,0);
|
||||
|
||||
gtk_notebook_set_tab_label(notebook,w,new_label);
|
||||
gtk_widget_show_all(new_label);
|
||||
}
|
||||
|
||||
static void linphone_gtk_in_call_set_animation_image(GtkWidget *callview, const char *image_name, gboolean is_stock){
|
||||
GtkWidget *container=linphone_gtk_get_widget(callview,"in_call_animation");
|
||||
GList *elem=gtk_container_get_children(GTK_CONTAINER(container));
|
||||
GtkWidget *image;
|
||||
|
||||
if (!is_stock){
|
||||
|
||||
if (!is_stock){
|
||||
if (image_name==NULL){
|
||||
gtk_widget_hide(container);
|
||||
}
|
||||
|
|
@ -107,19 +129,18 @@ static void linphone_gtk_in_call_set_animation_spinner(GtkWidget *callview){
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void linphone_gtk_transfer_call(LinphoneCall *dest_call){
|
||||
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
|
||||
if (call) linphone_core_transfer_call_to_another(linphone_gtk_get_core(),call,dest_call);
|
||||
}
|
||||
|
||||
static void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
|
||||
void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
|
||||
GtkWidget *menu_item;
|
||||
GtkWidget *menu=gtk_menu_new();
|
||||
LinphoneCall *call=(LinphoneCall*)call_ref;
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
const MSList *elem=linphone_core_get_calls(lc);
|
||||
|
||||
|
||||
for(;elem!=NULL;elem=elem->next){
|
||||
LinphoneCall *other_call=(LinphoneCall*)elem->data;
|
||||
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(other_call);
|
||||
|
|
@ -137,38 +158,28 @@ static void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
|
|||
}
|
||||
}
|
||||
gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,
|
||||
gtk_get_current_event_time());
|
||||
gtk_get_current_event_time());
|
||||
gtk_widget_show(menu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value){
|
||||
const MSList *elem=linphone_core_get_calls(lc);
|
||||
for(;elem!=NULL;elem=elem->next){
|
||||
LinphoneCall *call=(LinphoneCall*)elem->data;
|
||||
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *box=linphone_gtk_get_widget (call_view,"mute_pause_buttons");
|
||||
GtkWidget *button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"transfer");
|
||||
if (button && value==FALSE){
|
||||
gtk_widget_destroy(button);
|
||||
button=NULL;
|
||||
}else if (!button && value==TRUE){
|
||||
button=gtk_button_new_with_label (_("Transfer"));
|
||||
//gtk_button_set_image_position(GTK_BUTTON(button),GTK_POS_BOTTOM);
|
||||
gtk_button_set_image(GTK_BUTTON(button),gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect(G_OBJECT(button),"clicked",(GCallback)transfer_button_clicked,call);
|
||||
gtk_widget_show_all(button);
|
||||
gtk_container_add(GTK_CONTAINER(box),button);
|
||||
GtkWidget *button=linphone_gtk_get_widget (call_view,"transfer_button");
|
||||
if(button != NULL){
|
||||
gtk_widget_set_sensitive(button,value);
|
||||
}
|
||||
g_object_set_data(G_OBJECT(box),"transfer",button);
|
||||
}
|
||||
}
|
||||
|
||||
static void conference_button_clicked(GtkWidget *button, gpointer call_ref){
|
||||
gtk_widget_set_sensitive(button,FALSE);
|
||||
g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"conf_frame",NULL);
|
||||
linphone_core_add_all_to_conference(linphone_gtk_get_core());
|
||||
//linphone_core_add_to_conference(linphone_gtk_get_core(),(LinphoneCall*)call_ref);
|
||||
gtk_widget_set_sensitive(button,FALSE);
|
||||
|
||||
}
|
||||
|
||||
void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value){
|
||||
|
|
@ -176,20 +187,10 @@ void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value){
|
|||
for(;elem!=NULL;elem=elem->next){
|
||||
LinphoneCall *call=(LinphoneCall*)elem->data;
|
||||
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *box=linphone_gtk_get_widget (call_view,"mute_pause_buttons");
|
||||
GtkWidget *button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"conference");
|
||||
if (button && value==FALSE){
|
||||
gtk_widget_destroy(button);
|
||||
button=NULL;
|
||||
}else if (!button && value==TRUE){
|
||||
button=gtk_button_new_with_label (_("Conference"));
|
||||
//gtk_button_set_image_position(GTK_BUTTON(button),GTK_POS_BOTTOM);
|
||||
gtk_button_set_image(GTK_BUTTON(button),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect(G_OBJECT(button),"clicked",(GCallback)conference_button_clicked,call);
|
||||
gtk_widget_show_all(button);
|
||||
gtk_container_add(GTK_CONTAINER(box),button);
|
||||
GtkWidget *button=linphone_gtk_get_widget (call_view,"conference_button");
|
||||
if (button != NULL){
|
||||
gtk_widget_set_sensitive(button,value);
|
||||
}
|
||||
g_object_set_data(G_OBJECT(box),"conference",button);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +202,7 @@ static void show_used_codecs(GtkWidget *callstats, LinphoneCall *call){
|
|||
GtkWidget *acodec_ui=linphone_gtk_get_widget(callstats,"audio_codec");
|
||||
GtkWidget *vcodec_ui=linphone_gtk_get_widget(callstats,"video_codec");
|
||||
if (acodec){
|
||||
|
||||
|
||||
char tmp[64]={0};
|
||||
snprintf(tmp,sizeof(tmp)-1,"%s/%i/%i",acodec->mime_type,acodec->clock_rate,acodec->channels);
|
||||
gtk_label_set_label(GTK_LABEL(acodec_ui),tmp);
|
||||
|
|
@ -286,7 +287,16 @@ static void linphone_gtk_show_call_stats(LinphoneCall *call){
|
|||
refresh_call_stats(call_stats);
|
||||
gtk_widget_show(call_stats);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void linphone_gtk_enable_video_button(LinphoneCall *call, gboolean sensitive, gboolean holdon){
|
||||
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer (call);
|
||||
GtkWidget *button;
|
||||
g_return_if_fail(callview!=NULL);
|
||||
button=linphone_gtk_get_widget(callview,"video_button");
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
|
||||
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
|
||||
}
|
||||
|
||||
void linphone_gtk_create_in_call_view(LinphoneCall *call){
|
||||
|
|
@ -311,8 +321,26 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
|
|||
gtk_notebook_set_current_page(notebook, idx);
|
||||
call_index++;
|
||||
linphone_gtk_enable_hold_button (call,FALSE,TRUE);
|
||||
linphone_gtk_enable_video_button (call,FALSE,TRUE);
|
||||
linphone_gtk_enable_mute_button(
|
||||
GTK_BUTTON(linphone_gtk_get_widget(call_view,"incall_mute")),FALSE);
|
||||
|
||||
GtkWidget *transfer = linphone_gtk_get_widget(call_view,"transfer_button");
|
||||
gtk_button_set_image(GTK_BUTTON(transfer),gtk_image_new_from_stock
|
||||
(GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect(G_OBJECT(transfer),"clicked",(GCallback)transfer_button_clicked,call);
|
||||
gtk_widget_hide(transfer);
|
||||
|
||||
GtkWidget *conf = linphone_gtk_get_widget(call_view,"conference_button");
|
||||
gtk_button_set_image(GTK_BUTTON(conf),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect(G_OBJECT(conf),"clicked",(GCallback)conference_button_clicked,call);
|
||||
gtk_widget_hide(conf);
|
||||
|
||||
GtkWidget *button=linphone_gtk_get_widget(call_view,"terminate_call");
|
||||
GtkWidget *image=create_pixmap("stopcall-red.png");
|
||||
gtk_button_set_label(GTK_BUTTON(button),_("Hang up"));
|
||||
gtk_button_set_image(GTK_BUTTON(button),image);
|
||||
gtk_widget_show(image);
|
||||
g_signal_connect_swapped(G_OBJECT(linphone_gtk_get_widget(call_view,"quality_indicator")),"button-press-event",(GCallback)linphone_gtk_show_call_stats,call);
|
||||
}
|
||||
|
||||
|
|
@ -368,7 +396,7 @@ void linphone_gtk_remove_in_call_view(LinphoneCall *call){
|
|||
if (linphone_core_is_in_conference(linphone_gtk_get_core())){
|
||||
/*show the conference*/
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),
|
||||
g_object_get_data(G_OBJECT(main_window),"conference_tab")));
|
||||
g_object_get_data(G_OBJECT(main_window),"conf_frame")));
|
||||
}else gtk_notebook_set_current_page(GTK_NOTEBOOK(nb), 0);
|
||||
}else{
|
||||
/*show the active call*/
|
||||
|
|
@ -383,9 +411,9 @@ static void display_peer_name_in_label(GtkWidget *label, const LinphoneAddress *
|
|||
char *uri_label;
|
||||
displayname=linphone_address_get_display_name(from);
|
||||
id=linphone_address_as_string_uri_only(from);
|
||||
|
||||
|
||||
if (displayname!=NULL){
|
||||
uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>",
|
||||
uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>",
|
||||
displayname,id);
|
||||
}else
|
||||
uri_label=g_markup_printf_escaped("<span size=\"large\"><i>%s</i></span>\n",id);
|
||||
|
|
@ -398,10 +426,10 @@ void linphone_gtk_in_call_view_set_calling(LinphoneCall *call){
|
|||
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
|
||||
GtkWidget *callee=linphone_gtk_get_widget(callview,"in_call_uri");
|
||||
GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration");
|
||||
|
||||
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
|
||||
display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
|
||||
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
|
||||
linphone_gtk_in_call_set_animation_spinner(callview);
|
||||
}
|
||||
|
|
@ -415,7 +443,7 @@ void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call){
|
|||
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>Incoming call</b>"));
|
||||
gtk_widget_show_all(linphone_gtk_get_widget(callview,"answer_decline_panel"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"mute_pause_buttons"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"buttons_panel"));
|
||||
display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
|
||||
|
||||
answer_button=linphone_gtk_get_widget(callview,"accept_call");
|
||||
|
|
@ -423,11 +451,11 @@ void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call){
|
|||
gtk_button_set_label(GTK_BUTTON(answer_button),_("Answer"));
|
||||
gtk_button_set_image(GTK_BUTTON(answer_button),image);
|
||||
gtk_widget_show(image);
|
||||
|
||||
|
||||
image=create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"));
|
||||
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(callview,"decline_call")),image);
|
||||
gtk_widget_show(image);
|
||||
|
||||
|
||||
linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_DIALOG_INFO,TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -482,8 +510,6 @@ static gboolean linphone_gtk_in_call_view_refresh(LinphoneCall *call){
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef struct _volume_ctx{
|
||||
GtkWidget *widget;
|
||||
get_volume_t get_volume;
|
||||
|
|
@ -537,13 +563,14 @@ void linphone_gtk_uninit_audio_meter(GtkWidget *w){
|
|||
void linphone_gtk_in_call_view_enable_audio_view(LinphoneCall *call, gboolean val){
|
||||
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *audio_view=linphone_gtk_get_widget(callview,"incall_audioview");
|
||||
//GtkWidget *mic=linphone_gtk_get_widget(callview,"incall_mic_icon");
|
||||
GtkWidget *mic=linphone_gtk_get_widget(callview,"incall_mic_icon");
|
||||
GtkWidget *spk=linphone_gtk_get_widget(callview,"incall_spk_icon");
|
||||
GtkWidget *mic_level=linphone_gtk_get_widget(callview,"mic_audiolevel");
|
||||
GtkWidget *spk_level=linphone_gtk_get_widget(callview,"spk_audiolevel");
|
||||
GdkPixbuf *pbuf;
|
||||
//gtk_image_set_from_pixbuf(GTK_IMAGE(mic),(pbuf=create_pixbuf("mic_active.png")));
|
||||
//g_object_unref(pbuf);
|
||||
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(mic),(pbuf=create_pixbuf("mic_active.png")));
|
||||
g_object_unref(pbuf);
|
||||
if (val){
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(spk),(pbuf=create_pixbuf("speaker.png")));
|
||||
g_object_unref(pbuf);
|
||||
|
|
@ -589,7 +616,7 @@ void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call){
|
|||
gtk_button_set_label(GTK_BUTTON(verify_button),
|
||||
verified ? _("Set unverified") : _("Set verified"));
|
||||
gtk_widget_show_all(encryption_box);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
gtk_widget_hide_all(encryption_box);
|
||||
|
|
@ -604,24 +631,34 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
|
|||
guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid"));
|
||||
gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));
|
||||
GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(callview),"call_stats");
|
||||
|
||||
|
||||
display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
|
||||
|
||||
gtk_widget_set_visible(linphone_gtk_get_widget(callview,"mute_pause_buttons"),!in_conf);
|
||||
gtk_widget_set_visible(linphone_gtk_get_widget(callview,"buttons_panel"),!in_conf);
|
||||
|
||||
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
|
||||
gtk_label_set_markup(GTK_LABEL(status),in_conf ? _("In conference") : _("<b>In call</b>"));
|
||||
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"conference_button"),!in_conf);
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"transfer_button"),!in_conf);
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
|
||||
linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PLAY,TRUE);
|
||||
update_tab_header(call,FALSE);
|
||||
linphone_gtk_enable_mute_button(
|
||||
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),!in_conf);
|
||||
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);
|
||||
gtk_widget_show_all(linphone_gtk_get_widget(callview,"buttons_panel"));
|
||||
if (taskid==0){
|
||||
taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
|
||||
g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
|
||||
}
|
||||
linphone_gtk_in_call_view_enable_audio_view(call, !in_conf);
|
||||
linphone_gtk_in_call_view_show_encryption(call);
|
||||
if (in_conf) linphone_gtk_set_in_conference(call);
|
||||
if (in_conf){
|
||||
linphone_gtk_set_in_conference(call);
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"incall_mute"),FALSE);
|
||||
}
|
||||
if (call_stats) show_used_codecs(call_stats,call);
|
||||
}
|
||||
|
||||
|
|
@ -630,6 +667,7 @@ void linphone_gtk_in_call_view_set_paused(LinphoneCall *call){
|
|||
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>Paused call</b>"));
|
||||
|
||||
linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PAUSE,TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -654,7 +692,7 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
|
|||
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *status=linphone_gtk_get_widget(callview,"in_call_status");
|
||||
guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid"));
|
||||
gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));
|
||||
gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call));
|
||||
|
||||
if ((callview==NULL) || (status==NULL)) return;
|
||||
if (error_msg==NULL)
|
||||
|
|
@ -666,13 +704,17 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
|
|||
}
|
||||
linphone_gtk_in_call_set_animation_image(callview,
|
||||
linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"),FALSE);
|
||||
|
||||
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"incall_audioview"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"terminate_call"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"video_button"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"transfer_button"));
|
||||
gtk_widget_hide(linphone_gtk_get_widget(callview,"conference_button"));
|
||||
linphone_gtk_enable_mute_button(
|
||||
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),FALSE);
|
||||
linphone_gtk_enable_hold_button(call,FALSE,TRUE);
|
||||
|
||||
|
||||
if (taskid!=0) g_source_remove(taskid);
|
||||
g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,call);
|
||||
if (in_conf)
|
||||
|
|
@ -726,8 +768,7 @@ void linphone_gtk_mute_clicked(GtkButton *button){
|
|||
linphone_gtk_draw_mute_button(button,!active);
|
||||
}
|
||||
|
||||
void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive)
|
||||
{
|
||||
void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive){
|
||||
/*gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);*/
|
||||
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
|
||||
linphone_gtk_draw_mute_button(button,FALSE);
|
||||
|
|
@ -755,6 +796,7 @@ void linphone_gtk_draw_hold_button(GtkButton *button, gboolean active){
|
|||
void linphone_gtk_hold_clicked(GtkButton *button){
|
||||
int active=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"active"));
|
||||
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
|
||||
update_tab_header(call,active);
|
||||
if (!call) return;
|
||||
if(!active)
|
||||
{
|
||||
|
|
@ -770,6 +812,7 @@ void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gbo
|
|||
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer (call);
|
||||
GtkWidget *button;
|
||||
g_return_if_fail(callview!=NULL);
|
||||
update_tab_header(call,!holdon);
|
||||
button=linphone_gtk_get_widget(callview,"hold_call");
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
|
||||
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void linphone_gtk_show_parameters(void);
|
|||
void linphone_gtk_fill_soundcards(GtkWidget *pb);
|
||||
void linphone_gtk_fill_webcams(GtkWidget *pb);
|
||||
void linphone_gtk_load_identities(void);
|
||||
void linphone_gtk_create_chatroom(const char *with);
|
||||
LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with);
|
||||
void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message);
|
||||
void linphone_gtk_call_log_update(GtkWidget *w);
|
||||
void linphone_gtk_create_log_window(void);
|
||||
|
|
@ -95,10 +95,20 @@ GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
|
|||
void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
|
||||
void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
|
||||
|
||||
void linphone_gtk_terminate_call(GtkWidget *button);
|
||||
void update_tab_header(LinphoneCall *call,gboolean pause);
|
||||
|
||||
void linphone_gtk_show_directory_search(void);
|
||||
|
||||
void linphone_gtk_status_icon_set_blinking(gboolean val);
|
||||
void linphone_gtk_notify(LinphoneCall *call, const char *msg);
|
||||
LinphoneChatRoom *linphone_gtk_start_chat(GtkTreeView* t);
|
||||
void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view);
|
||||
void linphone_gtk_send_text(LinphoneChatRoom *cr);
|
||||
GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with);
|
||||
void linphone_gtk_update_chat_picture(gboolean active);
|
||||
void linphone_gtk_chat_set_conversation(const LinphoneAddress *uri,gchar *conversation);
|
||||
gchar * linphone_gtk_chat_get_conversation(const LinphoneAddress *uri);
|
||||
|
||||
/*functions controlling the different views*/
|
||||
gboolean linphone_gtk_use_in_call_view();
|
||||
|
|
@ -112,6 +122,7 @@ void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call);
|
|||
void linphone_gtk_in_call_view_set_paused(LinphoneCall *call);
|
||||
void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call,LinphoneCallState cstate);
|
||||
void linphone_gtk_mute_clicked(GtkButton *button);
|
||||
void transfer_button_clicked(GtkWidget *button, gpointer call_ref);
|
||||
void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive);
|
||||
void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
|
||||
void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value);
|
||||
|
|
|
|||
107
gtk/main.c
|
|
@ -134,7 +134,7 @@ static GOptionEntry linphone_options[]={
|
|||
};
|
||||
|
||||
#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
|
||||
#define RELATIVE_XML_DIR
|
||||
#define RELATIVE_XML_DIR
|
||||
#define BUILD_TREE_XML_DIR "gtk"
|
||||
|
||||
#ifndef WIN32
|
||||
|
|
@ -145,7 +145,6 @@ static GOptionEntry linphone_options[]={
|
|||
#define SECRETS_FILE "linphone-zidcache"
|
||||
#endif
|
||||
|
||||
|
||||
char *linphone_gtk_get_config_file(const char *filename){
|
||||
const int path_max=1024;
|
||||
char *config_file=g_malloc0(path_max);
|
||||
|
|
@ -170,7 +169,6 @@ char *linphone_gtk_get_config_file(const char *filename){
|
|||
return config_file;
|
||||
}
|
||||
|
||||
|
||||
#define FACTORY_CONFIG_FILE "linphonerc.factory"
|
||||
static char _factory_config_file[1024];
|
||||
static const char *linphone_gtk_get_factory_config_file(){
|
||||
|
|
@ -180,7 +178,7 @@ static const char *linphone_gtk_get_factory_config_file(){
|
|||
"%s",FACTORY_CONFIG_FILE);
|
||||
} else {
|
||||
char *progdir;
|
||||
|
||||
|
||||
if (progpath != NULL) {
|
||||
char *basename;
|
||||
progdir = strdup(progpath);
|
||||
|
|
@ -251,8 +249,6 @@ static void linphone_gtk_init_liblinphone(const char *config_file,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
LinphoneCore *linphone_gtk_get_core(void){
|
||||
return the_core;
|
||||
}
|
||||
|
|
@ -306,7 +302,7 @@ GtkWidget *linphone_gtk_create_window(const char *window_name){
|
|||
GtkWidget *w;
|
||||
|
||||
if (get_ui_file(window_name,path,sizeof(path))==-1) return NULL;
|
||||
|
||||
|
||||
if (!gtk_builder_add_from_file (builder, path, &error)){
|
||||
g_error("Couldn't load builder file: %s", error->message);
|
||||
g_error_free (error);
|
||||
|
|
@ -331,7 +327,7 @@ GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_n
|
|||
gchar *object_ids[2];
|
||||
object_ids[0]=g_strdup(widget_name);
|
||||
object_ids[1]=NULL;
|
||||
|
||||
|
||||
if (get_ui_file(filename,path,sizeof(path))==-1) return NULL;
|
||||
if (!gtk_builder_add_objects_from_file(builder,path,object_ids,&error)){
|
||||
g_error("Couldn't load %s from builder file %s: %s", widget_name,path,error->message);
|
||||
|
|
@ -385,7 +381,7 @@ GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
|
|||
void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
|
||||
|
||||
gtk_widget_show(main_window);
|
||||
if (type==GTK_MESSAGE_QUESTION)
|
||||
{
|
||||
|
|
@ -441,7 +437,7 @@ void linphone_gtk_show_about(){
|
|||
GdkPixbuf *logo=create_pixbuf(
|
||||
linphone_gtk_get_ui_config("logo","linphone-banner.png"));
|
||||
static const char *defcfg="defcfg";
|
||||
|
||||
|
||||
about=linphone_gtk_create_window("about");
|
||||
gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
|
||||
memset(&filestat,0,sizeof(filestat));
|
||||
|
|
@ -483,6 +479,7 @@ static void set_video_window_decorations(GdkWindow *w){
|
|||
const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
|
||||
char video_title[256];
|
||||
GdkPixbuf *pbuf=create_pixbuf(icon_path);
|
||||
|
||||
if (!linphone_core_in_call(linphone_gtk_get_core())){
|
||||
snprintf(video_title,sizeof(video_title),"%s video",title);
|
||||
/* When not in call, treat the video as a normal window */
|
||||
|
|
@ -650,8 +647,8 @@ static void save_uri_history(){
|
|||
static void completion_add_text(GtkEntry *entry, const char *text){
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
|
||||
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)){
|
||||
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)){
|
||||
do {
|
||||
gchar *uri=NULL;
|
||||
gtk_tree_model_get(model,&iter,0,&uri,-1);
|
||||
|
|
@ -672,7 +669,6 @@ static void completion_add_text(GtkEntry *entry, const char *text){
|
|||
save_uri_history();
|
||||
}
|
||||
|
||||
|
||||
bool_t linphone_gtk_video_enabled(void){
|
||||
const LinphoneVideoPolicy *vpol=linphone_core_get_video_policy(linphone_gtk_get_core());
|
||||
return vpol->automatically_accept && vpol->automatically_initiate;
|
||||
|
|
@ -690,7 +686,6 @@ void linphone_gtk_show_main_window(){
|
|||
void linphone_gtk_call_terminated(LinphoneCall *call, const char *error){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
if (linphone_core_get_calls(linphone_gtk_get_core())==NULL){
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),FALSE);
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),TRUE);
|
||||
}
|
||||
if (linphone_gtk_use_in_call_view() && call)
|
||||
|
|
@ -704,22 +699,22 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
|
|||
const MSList *calls=linphone_core_get_calls(lc);
|
||||
GtkWidget *button;
|
||||
bool_t start_active=TRUE;
|
||||
bool_t stop_active=FALSE;
|
||||
//bool_t stop_active=FALSE;
|
||||
bool_t add_call=FALSE;
|
||||
int call_list_size=ms_list_size(calls);
|
||||
|
||||
|
||||
if (calls==NULL){
|
||||
start_active=TRUE;
|
||||
stop_active=FALSE;
|
||||
//stop_active=FALSE;
|
||||
}else{
|
||||
stop_active=TRUE;
|
||||
//stop_active=TRUE;
|
||||
start_active=TRUE;
|
||||
add_call=TRUE;
|
||||
}
|
||||
button=linphone_gtk_get_widget(mw,"start_call");
|
||||
gtk_widget_set_sensitive(button,start_active);
|
||||
gtk_widget_set_visible(button,!add_call);
|
||||
|
||||
|
||||
button=linphone_gtk_get_widget(mw,"add_call");
|
||||
if (linphone_core_sound_resources_locked(lc) || (call && linphone_call_get_state(call)==LinphoneCallIncomingReceived)) {
|
||||
gtk_widget_set_sensitive(button,FALSE);
|
||||
|
|
@ -727,8 +722,8 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
|
|||
gtk_widget_set_sensitive(button,start_active);
|
||||
}
|
||||
gtk_widget_set_visible(button,add_call);
|
||||
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),stop_active);
|
||||
|
||||
//gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),stop_active);
|
||||
|
||||
linphone_gtk_enable_transfer_button(lc,call_list_size>1);
|
||||
linphone_gtk_enable_conference_button(lc,call_list_size>1);
|
||||
|
|
@ -754,7 +749,6 @@ static gboolean linphone_gtk_auto_answer(LinphoneCall *call){
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void linphone_gtk_start_call(GtkWidget *w){
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
LinphoneCall *call;
|
||||
|
|
@ -771,14 +765,13 @@ void linphone_gtk_start_call(GtkWidget *w){
|
|||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),FALSE);
|
||||
g_timeout_add(100,(GSourceFunc)linphone_gtk_start_call_do,uri_bar);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void linphone_gtk_uri_bar_activate(GtkWidget *w){
|
||||
linphone_gtk_start_call(w);
|
||||
}
|
||||
|
||||
|
||||
void linphone_gtk_terminate_call(GtkWidget *button){
|
||||
gboolean is_conf;
|
||||
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(&is_conf);
|
||||
|
|
@ -808,7 +801,7 @@ void _linphone_gtk_enable_video(gboolean val){
|
|||
policy.automatically_initiate=policy.automatically_accept=val;
|
||||
linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
|
||||
linphone_core_set_video_policy(linphone_gtk_get_core(),&policy);
|
||||
|
||||
|
||||
if (val){
|
||||
linphone_core_enable_video_preview(linphone_gtk_get_core(),
|
||||
linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
|
||||
|
|
@ -841,7 +834,6 @@ void linphone_gtk_used_identity_changed(GtkWidget *w){
|
|||
if (sel) g_free(sel);
|
||||
}
|
||||
|
||||
|
||||
void on_proxy_refresh_button_clicked(GtkWidget *w){
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
MSList const *item=linphone_core_get_proxy_config_list(lc);
|
||||
|
|
@ -895,7 +887,6 @@ typedef struct _AuthTimeout{
|
|||
GtkWidget *w;
|
||||
} AuthTimeout;
|
||||
|
||||
|
||||
static void auth_timeout_clean(AuthTimeout *tout){
|
||||
tout->w=NULL;
|
||||
}
|
||||
|
|
@ -947,7 +938,7 @@ static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm
|
|||
LinphoneAuthInfo *info;
|
||||
gchar *msg;
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
|
||||
|
||||
if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
|
||||
/*don't prompt for authentication when login frame is visible*/
|
||||
linphone_core_abort_authentication(lc,NULL);
|
||||
|
|
@ -969,6 +960,7 @@ static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm
|
|||
static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
|
||||
GtkWidget *w=linphone_gtk_get_main_window();
|
||||
GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
|
||||
|
||||
gtk_statusbar_push(GTK_STATUSBAR(status_bar),
|
||||
gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
|
||||
status);
|
||||
|
|
@ -1037,14 +1029,14 @@ void linphone_gtk_notify(LinphoneCall *call, const char *msg){
|
|||
if (!notify_init ("Linphone")) ms_error("Libnotify failed to init.");
|
||||
#endif
|
||||
if (!call) {
|
||||
|
||||
|
||||
#ifdef HAVE_NOTIFY
|
||||
if (!notify_notification_show(notify_notification_new("Linphone",msg,NULL
|
||||
#ifdef HAVE_NOTIFY1
|
||||
,NULL
|
||||
#endif
|
||||
),NULL))
|
||||
|
||||
|
||||
ms_error("Failed to send notification.");
|
||||
#else
|
||||
linphone_gtk_show_main_window();
|
||||
|
|
@ -1157,7 +1149,7 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
|
|||
if (auto_answer) {
|
||||
linphone_call_ref(call);
|
||||
g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer ,call);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LinphoneCallResuming:
|
||||
linphone_gtk_enable_hold_button(call,TRUE,TRUE);
|
||||
|
|
@ -1165,8 +1157,10 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
|
|||
break;
|
||||
case LinphoneCallPausing:
|
||||
linphone_gtk_enable_hold_button(call,TRUE,FALSE);
|
||||
update_tab_header(call,FALSE);
|
||||
case LinphoneCallPausedByRemote:
|
||||
linphone_gtk_in_call_view_set_paused(call);
|
||||
update_tab_header(call,TRUE);
|
||||
break;
|
||||
case LinphoneCallConnected:
|
||||
linphone_gtk_enable_hold_button (call,TRUE,TRUE);
|
||||
|
|
@ -1193,7 +1187,7 @@ static void update_registration_status(LinphoneProxyConfig *cfg, LinphoneRegistr
|
|||
GtkTreeIter iter;
|
||||
gboolean found=FALSE;
|
||||
const char *stock_id=NULL;
|
||||
|
||||
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)){
|
||||
gpointer p;
|
||||
do{
|
||||
|
|
@ -1227,7 +1221,7 @@ static void update_registration_status(LinphoneProxyConfig *cfg, LinphoneRegistr
|
|||
gtk_list_store_set(GTK_LIST_STORE(model),&iter,1,stock_id,-1);
|
||||
}
|
||||
|
||||
static void linphone_gtk_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg,
|
||||
static void linphone_gtk_registration_state_changed(LinphoneCore *lc, LinphoneProxyConfig *cfg,
|
||||
LinphoneRegistrationState rs, const char *msg){
|
||||
switch (rs){
|
||||
case LinphoneRegistrationOk:
|
||||
|
|
@ -1279,13 +1273,13 @@ static GtkWidget *create_icon_menu(){
|
|||
GtkWidget *image;
|
||||
gchar *tmp;
|
||||
const gchar *homesite;
|
||||
|
||||
|
||||
homesite=linphone_gtk_get_ui_config("home","http://www.linphone.org");
|
||||
menu_item=gtk_image_menu_item_new_with_label(_("Website link"));
|
||||
tmp=g_strdup(homesite);
|
||||
g_object_set_data(G_OBJECT(menu_item),"home",tmp);
|
||||
g_object_weak_ref(G_OBJECT(menu_item),(GWeakNotify)g_free,tmp);
|
||||
|
||||
|
||||
image=gtk_image_new_from_stock(GTK_STOCK_HELP,GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show(image);
|
||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
|
||||
|
|
@ -1293,7 +1287,7 @@ static GtkWidget *create_icon_menu(){
|
|||
gtk_widget_show(menu_item);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
|
||||
g_signal_connect(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_link_to_website,NULL);
|
||||
|
||||
|
||||
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,NULL);
|
||||
gtk_widget_show(menu_item);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
|
||||
|
|
@ -1447,6 +1441,7 @@ static void linphone_gtk_dtmf_released(GtkButton *button){
|
|||
linphone_core_stop_dtmf (linphone_gtk_get_core());
|
||||
}
|
||||
|
||||
|
||||
static void linphone_gtk_connect_digits(void){
|
||||
GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
|
||||
GList *children=gtk_container_get_children(cont);
|
||||
|
|
@ -1486,18 +1481,23 @@ static void linphone_gtk_configure_main_window(){
|
|||
static const char *home;
|
||||
static const char *start_call_icon;
|
||||
static const char *add_call_icon;
|
||||
static const char *stop_call_icon;
|
||||
//static const char *stop_call_icon;
|
||||
static const char *search_icon;
|
||||
static gboolean update_check_menu;
|
||||
static gboolean buttons_have_borders;
|
||||
static gboolean show_abcd;
|
||||
GtkWidget *w=linphone_gtk_get_main_window();
|
||||
GHashTable *contacts_history;
|
||||
|
||||
contacts_history=g_hash_table_new_full(g_str_hash, g_str_equal,g_free, NULL);
|
||||
g_object_set_data(G_OBJECT(w),"history",(gpointer)contacts_history);
|
||||
|
||||
if (!config_loaded){
|
||||
title=linphone_gtk_get_ui_config("title","Linphone");
|
||||
home=linphone_gtk_get_ui_config("home","http://www.linphone.org");
|
||||
start_call_icon=linphone_gtk_get_ui_config("start_call_icon","startcall-green.png");
|
||||
add_call_icon=linphone_gtk_get_ui_config("add_call_icon","addcall-green.png");
|
||||
stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png");
|
||||
//stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png");
|
||||
search_icon=linphone_gtk_get_ui_config("directory_search_icon",NULL);
|
||||
update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
|
||||
buttons_have_borders=linphone_gtk_get_ui_config_int("buttons_border",1);
|
||||
|
|
@ -1520,12 +1520,6 @@ static void linphone_gtk_configure_main_window(){
|
|||
if (!buttons_have_borders)
|
||||
gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"add_call")),GTK_RELIEF_NONE);
|
||||
}
|
||||
if (stop_call_icon){
|
||||
gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(w,"terminate_call")),
|
||||
create_pixmap (stop_call_icon));
|
||||
if (!buttons_have_borders)
|
||||
gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"terminate_call")),GTK_RELIEF_NONE);
|
||||
}
|
||||
if (search_icon){
|
||||
GdkPixbuf *pbuf=create_pixbuf(search_icon);
|
||||
if(pbuf != NULL) {
|
||||
|
|
@ -1632,6 +1626,7 @@ static void linphone_gtk_init_main_window(){
|
|||
linphone_gtk_call_log_update(main_window);
|
||||
|
||||
linphone_gtk_update_call_buttons (NULL);
|
||||
g_object_set_data(G_OBJECT(main_window),"is_conf",GINT_TO_POINTER(FALSE));
|
||||
/*prevent the main window from being destroyed by a user click on WM controls, instead we hide it*/
|
||||
g_signal_connect (G_OBJECT (main_window), "delete-event",
|
||||
G_CALLBACK (linphone_gtk_close), main_window);
|
||||
|
|
@ -1764,11 +1759,11 @@ int main(int argc, char *argv[]){
|
|||
g_thread_init(NULL);
|
||||
#endif
|
||||
gdk_threads_init();
|
||||
|
||||
|
||||
progpath = strdup(argv[0]);
|
||||
|
||||
|
||||
config_file=linphone_gtk_get_config_file(NULL);
|
||||
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */
|
||||
|
|
@ -1792,8 +1787,10 @@ int main(int argc, char *argv[]){
|
|||
if (strncmp(lang,"zh",2)==0){
|
||||
workaround_gtk_entry_chinese_bug=TRUE;
|
||||
}
|
||||
#else
|
||||
#elif __APPLE__
|
||||
setenv("LANG",lang,1);
|
||||
#else
|
||||
setenv("LANGUAGE",lang,1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1809,13 +1806,13 @@ int main(int argc, char *argv[]){
|
|||
gtk_rc_add_default_file("./gtkrc");
|
||||
#endif
|
||||
gdk_threads_enter();
|
||||
|
||||
|
||||
if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"),
|
||||
linphone_options,NULL,NULL)){
|
||||
gdk_threads_leave();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
settings=gtk_settings_get_default();
|
||||
g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
|
||||
g_type_class_unref (g_type_class_ref (GTK_TYPE_BUTTON));
|
||||
|
|
@ -1850,18 +1847,20 @@ int main(int argc, char *argv[]){
|
|||
/*never block termination:*/
|
||||
g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)on_block_termination,NULL);
|
||||
#endif
|
||||
|
||||
|
||||
the_ui=linphone_gtk_create_window("main");
|
||||
|
||||
|
||||
g_object_set_data(G_OBJECT(the_ui),"is_created",GINT_TO_POINTER(FALSE));
|
||||
|
||||
linphone_gtk_create_log_window();
|
||||
linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
|
||||
|
||||
linphone_gtk_init_liblinphone(config_file, factory_config_file);
|
||||
|
||||
|
||||
g_set_application_name(app_name);
|
||||
pbuf=create_pixbuf(linphone_gtk_get_ui_config("icon",LINPHONE_ICON));
|
||||
if (pbuf!=NULL) gtk_window_set_default_icon(pbuf);
|
||||
|
||||
|
||||
/* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
|
||||
gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
|
||||
gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)NULL);
|
||||
|
|
|
|||
1638
gtk/main.ui
|
|
@ -176,7 +176,6 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="title" translatable="yes">Settings</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<signal name="destroy" handler="linphone_gtk_parameters_destroyed" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
|
|
@ -1615,50 +1614,6 @@
|
|||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="create_phonics">
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="linphone_gtk_create_fonics_account" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-network</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Register to FONICS
|
||||
virtual network !</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
@ -2092,7 +2047,7 @@ virtual network !</property>
|
|||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
@ -2154,7 +2109,7 @@ virtual network !</property>
|
|||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
<property name="title" translatable="yes">Linphone - Authentication required</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="has_separator">False</property>
|
||||
<child internal-child="vbox">
|
||||
|
|
|
|||
|
|
@ -794,7 +794,12 @@ static void linphone_gtk_fill_langs(GtkWidget *pb){
|
|||
const char *all_langs="C " LINPHONE_ALL_LANGS;
|
||||
const char *name;
|
||||
int i=0,index=0;
|
||||
const char *cur_lang=getenv("LANG");
|
||||
const char *cur_lang;
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
cur_lang=getenv("LANG");
|
||||
#else
|
||||
cur_lang=getenv("LANGUAGE");
|
||||
#endif
|
||||
int cur_lang_index=-1;
|
||||
char text[256]={0};
|
||||
if (cur_lang==NULL) cur_lang="C";
|
||||
|
|
@ -818,7 +823,12 @@ static void linphone_gtk_fill_langs(GtkWidget *pb){
|
|||
void linphone_gtk_lang_changed(GtkComboBox *combo){
|
||||
const char *selected=gtk_combo_box_get_active_text(combo);
|
||||
char code[10];
|
||||
const char *cur_lang=getenv("LANG");
|
||||
const char *cur_lang;
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
cur_lang=getenv("LANG");
|
||||
#else
|
||||
cur_lang=getenv("LANGUAGE");
|
||||
#endif
|
||||
if (selected!=NULL){
|
||||
sscanf(selected,"%s",code);
|
||||
if (cur_lang==NULL) cur_lang="C";
|
||||
|
|
@ -1286,4 +1296,3 @@ void linphone_gtk_dscp_edit_response(GtkWidget *dialog, guint response_id){
|
|||
}
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Linphone - Configure a SIP account</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox2">
|
||||
|
|
|
|||
|
|
@ -156,7 +156,11 @@ const char *linphone_gtk_get_lang(const char *config_file){
|
|||
void linphone_gtk_set_lang(const char *code){
|
||||
LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
|
||||
const char *curlang;
|
||||
curlang=getenv("LANG");
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
curlang=getenv("LANG");
|
||||
#else
|
||||
curlang=getenv("LANGUAGE");
|
||||
#endif
|
||||
if (curlang!=NULL && strncmp(curlang,code,2)==0) {
|
||||
/* do not loose the _territory@encoding part*/
|
||||
return;
|
||||
|
|
@ -166,8 +170,10 @@ void linphone_gtk_set_lang(const char *code){
|
|||
char tmp[128];
|
||||
snprintf(tmp,sizeof(tmp),"LANG=%s",code);
|
||||
_putenv(tmp);
|
||||
#else
|
||||
#elif __APPLE__
|
||||
setenv("LANG",code,1);
|
||||
#else
|
||||
setenv("LANGUAGE",code,1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Configure VoIP tunnel</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox2">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="deletable">False</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
|
|
|
|||
|
|
@ -786,7 +786,9 @@ public interface LinphoneCore {
|
|||
LinphoneProxyConfig[] getProxyConfigList();
|
||||
|
||||
void setVideoPolicy(boolean autoInitiate, boolean autoAccept);
|
||||
|
||||
|
||||
void setStaticPicture(String path);
|
||||
|
||||
void setUserAgent(String name, String version);
|
||||
|
||||
void setCpuCount(int count);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,9 @@ abstract public class LinphoneCoreFactory {
|
|||
/**
|
||||
* Enable verbose traces
|
||||
* @param enable
|
||||
* @param tag
|
||||
*/
|
||||
abstract public void setDebugMode(boolean enable);
|
||||
abstract public void setDebugMode(boolean enable, String tag);
|
||||
|
||||
abstract public void setLogHandler(LinphoneLogHandler handler);
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -145,4 +145,10 @@ public interface LinphoneProxyConfig {
|
|||
* @param country iso code
|
||||
*/
|
||||
public int lookupCCCFromIso(String iso);
|
||||
|
||||
/**
|
||||
* Return the international prefix for the given country
|
||||
* @param e164 phone number
|
||||
*/
|
||||
public int lookupCCCFromE164(String e164);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public native void setDebugMode(boolean enable);
|
||||
public native void setDebugMode(boolean enable, String tag);
|
||||
|
||||
@Override
|
||||
public void setLogHandler(LinphoneLogHandler handler) {
|
||||
|
|
|
|||
|
|
@ -20,15 +20,17 @@ package org.linphone.core;
|
|||
|
||||
import static android.media.AudioManager.MODE_IN_CALL;
|
||||
import static android.media.AudioManager.MODE_RINGTONE;
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.mediastream.video.capture.hwconf.Hacks;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
||||
|
||||
|
||||
class LinphoneCoreImpl implements LinphoneCore {
|
||||
|
||||
|
|
@ -754,6 +756,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public synchronized void setVideoPolicy(boolean autoInitiate, boolean autoAccept) {
|
||||
setVideoPolicy(nativePtr, autoInitiate, autoAccept);
|
||||
}
|
||||
private native void setStaticPicture(long nativePtr, String path);
|
||||
public void setStaticPicture(String path) {
|
||||
setStaticPicture(nativePtr, path);
|
||||
}
|
||||
private native void setUserAgent(long nativePtr, String name, String version);
|
||||
@Override
|
||||
public void setUserAgent(String name, String version) {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
private native void setContactParameters(long ptr, String params);
|
||||
|
||||
private native int lookupCCCFromIso(long nativePtr, String iso);
|
||||
private native int lookupCCCFromE164(long nativePtr, String e164);
|
||||
|
||||
public void enableRegister(boolean value) {
|
||||
enableRegister(nativePtr,value);
|
||||
|
|
@ -153,4 +154,8 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
public int lookupCCCFromIso(String iso) {
|
||||
return lookupCCCFromIso(nativePtr, iso);
|
||||
}
|
||||
@Override
|
||||
public int lookupCCCFromE164(String e164) {
|
||||
return lookupCCCFromE164(nativePtr, e164);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,112 +0,0 @@
|
|||
/*
|
||||
Log.java
|
||||
Copyright (C) 2011 Belledonne Communications, Grenoble, France
|
||||
|
||||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
package org.linphone.core;
|
||||
|
||||
import static android.util.Log.DEBUG;
|
||||
import static android.util.Log.ERROR;
|
||||
import static android.util.Log.INFO;
|
||||
import static android.util.Log.WARN;
|
||||
|
||||
/**
|
||||
* Convenient wrapper for Android logs.
|
||||
*
|
||||
* @author Guillaume Beraudo
|
||||
*/
|
||||
public final class Log {
|
||||
|
||||
public static final String TAG = "Linphone";
|
||||
private static final boolean useIsLoggable = false;
|
||||
|
||||
@SuppressWarnings(value="all")
|
||||
private static boolean isLoggable(int level) {
|
||||
return !useIsLoggable || android.util.Log.isLoggable(TAG, level);
|
||||
}
|
||||
|
||||
public static void i(Object...objects) {
|
||||
if (isLoggable(INFO)) {
|
||||
android.util.Log.i(TAG, toString(objects));
|
||||
}
|
||||
}
|
||||
public static void i(Throwable t, Object...objects) {
|
||||
if (isLoggable(INFO)) {
|
||||
android.util.Log.i(TAG, toString(objects), t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void d(Object...objects) {
|
||||
if (isLoggable(DEBUG)) {
|
||||
android.util.Log.d(TAG, toString(objects));
|
||||
}
|
||||
}
|
||||
public static void d(Throwable t, Object...objects) {
|
||||
if (isLoggable(DEBUG)) {
|
||||
android.util.Log.d(TAG, toString(objects), t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void w(Object...objects) {
|
||||
if (isLoggable(WARN)) {
|
||||
android.util.Log.w(TAG, toString(objects));
|
||||
}
|
||||
}
|
||||
public static void w(Throwable t, Object...objects) {
|
||||
if (isLoggable(WARN)) {
|
||||
android.util.Log.w(TAG, toString(objects), t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void e(Object...objects) {
|
||||
if (isLoggable(ERROR)) {
|
||||
android.util.Log.e(TAG, toString(objects));
|
||||
}
|
||||
}
|
||||
public static void e(Throwable t, Object...objects) {
|
||||
if (isLoggable(ERROR)) {
|
||||
android.util.Log.e(TAG, toString(objects), t);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException always throw after logging the error message.
|
||||
*/
|
||||
public static void f(Object...objects) {
|
||||
if (isLoggable(ERROR)) {
|
||||
android.util.Log.e(TAG, toString(objects));
|
||||
throw new RuntimeException("Fatal error : " + toString(objects));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @throws RuntimeException always throw after logging the error message.
|
||||
*/
|
||||
public static void f(Throwable t, Object...objects) {
|
||||
if (isLoggable(ERROR)) {
|
||||
android.util.Log.e(TAG, toString(objects), t);
|
||||
throw new RuntimeException("Fatal error : " + toString(objects), t);
|
||||
}
|
||||
}
|
||||
|
||||
private static String toString(Object...objects) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Object o : objects) {
|
||||
sb.append(o);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 517ddc04728373f6f0844e45c2b7ade272d33016
|
||||
Subproject commit 256e4eca87c06865d0ff186d05b4ca03f9394701
|
||||
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 59ff6bb7a0c5047526b802d264f6db4faa2bd5c2
|
||||
Subproject commit b1590514c98d33e5464d46317fdeaec52f778de7
|
||||
|
|
@ -5,12 +5,14 @@ pixmapdir=$(datadir)/pixmaps/linphone
|
|||
pixmap_DATA= \
|
||||
hold_on.png hold_off.png \
|
||||
mic_muted.png mic_active.png \
|
||||
linphone-3-250x130.png linphone-3.png linphone2-57x57.png \
|
||||
linphone.png linphone-banner.png \
|
||||
status-green.png \
|
||||
status-orange.png \
|
||||
status-red.png \
|
||||
status-offline.png \
|
||||
call.png \
|
||||
chat.png \
|
||||
chat_message_inprogress.png chat_message_delivered.png chat_message_not_delivered.png\
|
||||
contact-orange.png dialer-orange.png history-orange.png\
|
||||
startcall-green.png stopcall-red.png addcall-green.png linphone.icns \
|
||||
contact_starred.png contact_unstarred.png \
|
||||
|
|
|
|||
BIN
pixmaps/active_chat.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 5.5 KiB |
BIN
pixmaps/call.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
pixmaps/chat.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
pixmaps/chat_message_delivered.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
pixmaps/chat_message_inprogress.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
pixmaps/chat_message_not_delivered.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
|
@ -1,883 +0,0 @@
|
|||
/* XPM */
|
||||
static char * linphone2_xpm[] = {
|
||||
"50 45 835 2",
|
||||
" c None",
|
||||
". c #211F1D",
|
||||
"+ c #53514E",
|
||||
"@ c #5F5D59",
|
||||
"# c #7D7C78",
|
||||
"$ c #605F5C",
|
||||
"% c #94928C",
|
||||
"& c #95938D",
|
||||
"* c #7B7A77",
|
||||
"= c #605E5C",
|
||||
"- c #353432",
|
||||
"; c #585754",
|
||||
"> c #84827D",
|
||||
", c #B9B6B0",
|
||||
"' c #D9D5CE",
|
||||
") c #DFDBD3",
|
||||
"! c #EAE6DE",
|
||||
"~ c #EFEBE2",
|
||||
"{ c #EEEAE1",
|
||||
"] c #EFEBE3",
|
||||
"^ c #EEEAE2",
|
||||
"/ c #75726D",
|
||||
"( c #5E5C58",
|
||||
"_ c #7D7B77",
|
||||
": c #BAB6AF",
|
||||
"< c #E5E1D8",
|
||||
"[ c #DAD7CF",
|
||||
"} c #C8C4BD",
|
||||
"| c #898782",
|
||||
"1 c #949089",
|
||||
"2 c #938F88",
|
||||
"3 c #5B5854",
|
||||
"4 c #45433F",
|
||||
"5 c #4D4943",
|
||||
"6 c #5F5C56",
|
||||
"7 c #A5A199",
|
||||
"8 c #DCD5C5",
|
||||
"9 c #6F6B63",
|
||||
"0 c #42413F",
|
||||
"a c #A19E97",
|
||||
"b c #DAD6CE",
|
||||
"c c #EDE9E1",
|
||||
"d c #D4D0C9",
|
||||
"e c #96928C",
|
||||
"f c #63605B",
|
||||
"g c #827C73",
|
||||
"h c #6F6961",
|
||||
"i c #90877A",
|
||||
"j c #8E8578",
|
||||
"k c #B4A999",
|
||||
"l c #B9AD9D",
|
||||
"m c #C0B5A3",
|
||||
"n c #BCB1A0",
|
||||
"o c #858075",
|
||||
"p c #C3BCAE",
|
||||
"q c #EAE5DB",
|
||||
"r c #E0D9C9",
|
||||
"s c #C5BDAE",
|
||||
"t c #20201E",
|
||||
"u c #8D8B86",
|
||||
"v c #CAC7C1",
|
||||
"w c #D2CEC6",
|
||||
"x c #918F89",
|
||||
"y c #5D5A56",
|
||||
"z c #A0998F",
|
||||
"A c #827B6F",
|
||||
"B c #C0B4A2",
|
||||
"C c #C2B7A5",
|
||||
"D c #C1B6A4",
|
||||
"E c #8A8174",
|
||||
"F c #94918B",
|
||||
"G c #C7C3BB",
|
||||
"H c #AFAAA1",
|
||||
"I c #938B7E",
|
||||
"J c #646058",
|
||||
"K c #D8D1C3",
|
||||
"L c #ECE7DE",
|
||||
"M c #EBE7DD",
|
||||
"N c #E4DED0",
|
||||
"O c #DED6C5",
|
||||
"P c #57544D",
|
||||
"Q c #202020",
|
||||
"R c #7E7C77",
|
||||
"S c #DFDCD4",
|
||||
"T c #F0ECE4",
|
||||
"U c #EDE9E0",
|
||||
"V c #ECE8E1",
|
||||
"W c #B6B2AB",
|
||||
"X c #77736E",
|
||||
"Y c #767067",
|
||||
"Z c #A3998B",
|
||||
"` c #BCB09F",
|
||||
" . c #C3B7A6",
|
||||
".. c #BFB3A1",
|
||||
"+. c #C3B8A7",
|
||||
"@. c #BFB4A2",
|
||||
"#. c #BDB2A1",
|
||||
"$. c #3E3B35",
|
||||
"%. c #BBB4A6",
|
||||
"&. c #A7A39C",
|
||||
"*. c #ECE9E1",
|
||||
"=. c #77736A",
|
||||
"-. c #E7E1D5",
|
||||
";. c #E3DDCE",
|
||||
">. c #8F897F",
|
||||
",. c #22201E",
|
||||
"'. c #91908C",
|
||||
"). c #EFECE3",
|
||||
"!. c #EBE7DE",
|
||||
"~. c #878581",
|
||||
"{. c #5B574F",
|
||||
"]. c #7F786C",
|
||||
"^. c #8D867A",
|
||||
"/. c #9C9994",
|
||||
"(. c #98958F",
|
||||
"_. c #837B6E",
|
||||
":. c #C4B9A7",
|
||||
"<. c #958B7E",
|
||||
"[. c #736D62",
|
||||
"}. c #4E4942",
|
||||
"|. c #4C4842",
|
||||
"1. c #383632",
|
||||
"2. c #99968F",
|
||||
"3. c #ECE8DE",
|
||||
"4. c #7C7972",
|
||||
"5. c #CCC6BB",
|
||||
"6. c #E9E4D9",
|
||||
"7. c #EDE8DF",
|
||||
"8. c #E1D9C9",
|
||||
"9. c #BFB8A9",
|
||||
"0. c #1A1A1A",
|
||||
"a. c #C3BFB8",
|
||||
"b. c #CFCCC4",
|
||||
"c. c #85827C",
|
||||
"d. c #56514A",
|
||||
"e. c #A69C8D",
|
||||
"f. c #BFB3A2",
|
||||
"g. c #C2B7A6",
|
||||
"h. c #B4AA9A",
|
||||
"i. c #757168",
|
||||
"j. c #706D68",
|
||||
"k. c #918E88",
|
||||
"l. c #464441",
|
||||
"m. c #97948E",
|
||||
"n. c #C9C6BF",
|
||||
"o. c #8C8A85",
|
||||
"p. c #8E897F",
|
||||
"q. c #999488",
|
||||
"r. c #817E77",
|
||||
"s. c #C1BEB7",
|
||||
"t. c #807D75",
|
||||
"u. c #8A8377",
|
||||
"v. c #6E6A63",
|
||||
"w. c #A8A49C",
|
||||
"x. c #EAE4D9",
|
||||
"y. c #E4DDCF",
|
||||
"z. c #D8D0C0",
|
||||
"A. c #AFA99C",
|
||||
"B. c #848076",
|
||||
"C. c #BFBBB4",
|
||||
"D. c #B1AEA8",
|
||||
"E. c #47443F",
|
||||
"F. c #5C5851",
|
||||
"G. c #686259",
|
||||
"H. c #B0A595",
|
||||
"I. c #B7AC9B",
|
||||
"J. c #817A6F",
|
||||
"K. c #7E7A70",
|
||||
"L. c #AEA99D",
|
||||
"M. c #9A9791",
|
||||
"N. c #EEE9E1",
|
||||
"O. c #E6E2DA",
|
||||
"P. c #CCC8BF",
|
||||
"Q. c #E3DCCE",
|
||||
"R. c #86827A",
|
||||
"S. c #C6C3BC",
|
||||
"T. c #7C7974",
|
||||
"U. c #4A4642",
|
||||
"V. c #6E685F",
|
||||
"W. c #89837A",
|
||||
"X. c #7B7873",
|
||||
"Y. c #9A9892",
|
||||
"Z. c #827D73",
|
||||
"`. c #56534C",
|
||||
" + c #6A675E",
|
||||
".+ c #E2DBCC",
|
||||
"++ c #EDE9DF",
|
||||
"@+ c #DED8CC",
|
||||
"#+ c #DDD5C4",
|
||||
"$+ c #C4BDAE",
|
||||
"%+ c #6F6B62",
|
||||
"&+ c #312F2B",
|
||||
"*+ c #6D6960",
|
||||
"=+ c #A19B8F",
|
||||
"-+ c #E5E1DA",
|
||||
";+ c #7F7D79",
|
||||
">+ c #CFCBC3",
|
||||
",+ c #ACA9A2",
|
||||
"'+ c #B6B1A8",
|
||||
")+ c #B4B0AA",
|
||||
"!+ c #827F7A",
|
||||
"~+ c #444340",
|
||||
"{+ c #262524",
|
||||
"]+ c #C1BEB8",
|
||||
"^+ c #9A968D",
|
||||
"/+ c #242322",
|
||||
"(+ c #CEC7B7",
|
||||
"_+ c #DFD8C7",
|
||||
":+ c #E6E0D3",
|
||||
"<+ c #747067",
|
||||
"[+ c #D3CCBC",
|
||||
"}+ c #857F74",
|
||||
"|+ c #595856",
|
||||
"1+ c #CCC8C2",
|
||||
"2+ c #D4D1C9",
|
||||
"3+ c #ECE8DF",
|
||||
"4+ c #CFCBC4",
|
||||
"5+ c #93918C",
|
||||
"6+ c #2F2E2C",
|
||||
"7+ c #312F2C",
|
||||
"8+ c #969185",
|
||||
"9+ c #BAB3A5",
|
||||
"0+ c #B1AB9D",
|
||||
"a+ c #363532",
|
||||
"b+ c #E2DED5",
|
||||
"c+ c #676360",
|
||||
"d+ c #4C4B4A",
|
||||
"e+ c #767471",
|
||||
"f+ c #75736D",
|
||||
"g+ c #5B5956",
|
||||
"h+ c #928D81",
|
||||
"i+ c #E5DFD2",
|
||||
"j+ c #EEE9E0",
|
||||
"k+ c #EBE6DB",
|
||||
"l+ c #C0B9AB",
|
||||
"m+ c #A7A195",
|
||||
"n+ c #8D887E",
|
||||
"o+ c #C4BCAD",
|
||||
"p+ c #BCB8B1",
|
||||
"q+ c #D5D1C9",
|
||||
"r+ c #7A746D",
|
||||
"s+ c #AEABA4",
|
||||
"t+ c #B2AFA8",
|
||||
"u+ c #98948D",
|
||||
"v+ c #7D7A76",
|
||||
"w+ c #69655D",
|
||||
"x+ c #9B9589",
|
||||
"y+ c #A9A396",
|
||||
"z+ c #A7A49F",
|
||||
"A+ c #D8D2C9",
|
||||
"B+ c #948F83",
|
||||
"C+ c #454340",
|
||||
"D+ c #D7D3CC",
|
||||
"E+ c #63615E",
|
||||
"F+ c #141414",
|
||||
"G+ c #000000",
|
||||
"H+ c #53504A",
|
||||
"I+ c #EBE7DC",
|
||||
"J+ c #E4DDD0",
|
||||
"K+ c #898479",
|
||||
"L+ c #ADA79A",
|
||||
"M+ c #CBC3B4",
|
||||
"N+ c #89847A",
|
||||
"O+ c #CDC6B6",
|
||||
"P+ c #AAA59C",
|
||||
"Q+ c #9F9D98",
|
||||
"R+ c #E6E2D9",
|
||||
"S+ c #AFACA7",
|
||||
"T+ c #615F5C",
|
||||
"U+ c #201F1D",
|
||||
"V+ c #66625B",
|
||||
"W+ c #AEA89A",
|
||||
"X+ c #AEA89B",
|
||||
"Y+ c #B7B0A2",
|
||||
"Z+ c #070707",
|
||||
"`+ c #E0DED9",
|
||||
" @ c #CFC7B8",
|
||||
".@ c #6B6863",
|
||||
"+@ c #63625E",
|
||||
"@@ c #DBD3C3",
|
||||
"#@ c #534D46",
|
||||
"$@ c #807E7B",
|
||||
"%@ c #DDD9D1",
|
||||
"&@ c #36322E",
|
||||
"*@ c #4B4A49",
|
||||
"=@ c #6E6C67",
|
||||
"-@ c #E5DED1",
|
||||
";@ c #E9E4D8",
|
||||
">@ c #EFEAE2",
|
||||
",@ c #E2DCD0",
|
||||
"'@ c #8F8A7F",
|
||||
")@ c #999387",
|
||||
"!@ c #4E4B45",
|
||||
"~@ c #6B665E",
|
||||
"{@ c #47433D",
|
||||
"]@ c #D4CDC0",
|
||||
"^@ c #E8E3DA",
|
||||
"/@ c #1F1E1E",
|
||||
"(@ c #65615A",
|
||||
"_@ c #ADA699",
|
||||
":@ c #949494",
|
||||
"<@ c #BEBEBC",
|
||||
"[@ c #DAD2C2",
|
||||
"}@ c #7F7B74",
|
||||
"|@ c #4D4D4D",
|
||||
"1@ c #959084",
|
||||
"2@ c #DAD5C9",
|
||||
"3@ c #B9B1A2",
|
||||
"4@ c #3C3934",
|
||||
"5@ c #989693",
|
||||
"6@ c #B1ADA5",
|
||||
"7@ c #76746F",
|
||||
"8@ c #4C4A44",
|
||||
"9@ c #DCD4C3",
|
||||
"0@ c #E9E3D8",
|
||||
"a@ c #DCD8CE",
|
||||
"b@ c #A6A49E",
|
||||
"c@ c #9C9890",
|
||||
"d@ c #7B776D",
|
||||
"e@ c #55534E",
|
||||
"f@ c #B5B3AD",
|
||||
"g@ c #474440",
|
||||
"h@ c #D0C9B9",
|
||||
"i@ c #E7E2D7",
|
||||
"j@ c #65635D",
|
||||
"k@ c #4F4E4C",
|
||||
"l@ c #B7B1A3",
|
||||
"m@ c #B7B3A9",
|
||||
"n@ c #96948E",
|
||||
"o@ c #BCBBBB",
|
||||
"p@ c #BCB6A9",
|
||||
"q@ c #ABA6A1",
|
||||
"r@ c #8E8C87",
|
||||
"s@ c #161514",
|
||||
"t@ c #545350",
|
||||
"u@ c #B9B1A1",
|
||||
"v@ c #958F84",
|
||||
"w@ c #8C867B",
|
||||
"x@ c #81796E",
|
||||
"y@ c #BFB4A3",
|
||||
"z@ c #C6BBAA",
|
||||
"A@ c #5E5B53",
|
||||
"B@ c #96938D",
|
||||
"C@ c #696762",
|
||||
"D@ c #DFD7C7",
|
||||
"E@ c #C6C2B9",
|
||||
"F@ c #817C72",
|
||||
"G@ c #B3AC9F",
|
||||
"H@ c #B5AFA4",
|
||||
"I@ c #6C6964",
|
||||
"J@ c #DFD8C9",
|
||||
"K@ c #9C9C9B",
|
||||
"L@ c #716E6A",
|
||||
"M@ c #B8B1A3",
|
||||
"N@ c #2A2926",
|
||||
"O@ c #625F58",
|
||||
"P@ c #E0D8C9",
|
||||
"Q@ c #C1BAAB",
|
||||
"R@ c #252321",
|
||||
"S@ c #E1DDD5",
|
||||
"T@ c #7B7977",
|
||||
"U@ c #625E57",
|
||||
"V@ c #322F2A",
|
||||
"W@ c #C4B9A8",
|
||||
"X@ c #D1C7B6",
|
||||
"Y@ c #C1B5A4",
|
||||
"Z@ c #C8BEAC",
|
||||
"`@ c #9A9387",
|
||||
" # c #2D2C28",
|
||||
".# c #595752",
|
||||
"+# c #A29D94",
|
||||
"@# c #D5CEBD",
|
||||
"## c #CBC4B4",
|
||||
"$# c #DBD3C2",
|
||||
"%# c #A09C94",
|
||||
"&# c #C1C1C1",
|
||||
"*# c #95938E",
|
||||
"=# c #7F7A70",
|
||||
"-# c #8B867C",
|
||||
";# c #D6D0C4",
|
||||
"># c #C9C2B3",
|
||||
",# c #7C7B78",
|
||||
"'# c #BEBBB5",
|
||||
")# c #D1CABA",
|
||||
"!# c #44423F",
|
||||
"~# c #D6D2CA",
|
||||
"{# c #3A3835",
|
||||
"]# c #262421",
|
||||
"^# c #33302C",
|
||||
"/# c #69645B",
|
||||
"(# c #8B8478",
|
||||
"_# c #5F5951",
|
||||
":# c #605C53",
|
||||
"<# c #67635B",
|
||||
"[# c #BFB8AA",
|
||||
"}# c #928D82",
|
||||
"|# c #B8B2A4",
|
||||
"1# c #938F85",
|
||||
"2# c #989287",
|
||||
"3# c #89857C",
|
||||
"4# c #706E6A",
|
||||
"5# c #DED7C6",
|
||||
"6# c #928F88",
|
||||
"7# c #979797",
|
||||
"8# c #B4AEA2",
|
||||
"9# c #918C81",
|
||||
"0# c #68645C",
|
||||
"a# c #979286",
|
||||
"b# c #4A4741",
|
||||
"c# c #5E5D5A",
|
||||
"d# c #B2AFAA",
|
||||
"e# c #47453F",
|
||||
"f# c #C2BBAC",
|
||||
"g# c #B5AEA0",
|
||||
"h# c #D4CDBC",
|
||||
"i# c #CAC7C0",
|
||||
"j# c #B5AEA1",
|
||||
"k# c #CCC4B5",
|
||||
"l# c #ACABA7",
|
||||
"m# c #797979",
|
||||
"n# c #757169",
|
||||
"o# c #BDB6A7",
|
||||
"p# c #68655D",
|
||||
"q# c #A09B92",
|
||||
"r# c #D1CABB",
|
||||
"s# c #8D887D",
|
||||
"t# c #80807F",
|
||||
"u# c #C5BEAF",
|
||||
"v# c #1E1D1B",
|
||||
"w# c #A3A099",
|
||||
"x# c #888681",
|
||||
"y# c #6A6864",
|
||||
"z# c #B3AEA3",
|
||||
"A# c #4D4A44",
|
||||
"B# c #D6CFBE",
|
||||
"C# c #A29E95",
|
||||
"D# c #C1BAAC",
|
||||
"E# c #918C82",
|
||||
"F# c #6D6961",
|
||||
"G# c #B9B3A5",
|
||||
"H# c #979084",
|
||||
"I# c #3A3836",
|
||||
"J# c #BDBBB7",
|
||||
"K# c #C7C0B1",
|
||||
"L# c #6C6860",
|
||||
"M# c #D2CBBB",
|
||||
"N# c #393836",
|
||||
"O# c #66635D",
|
||||
"P# c #A19D94",
|
||||
"Q# c #656461",
|
||||
"R# c #32302C",
|
||||
"S# c #CCC5B5",
|
||||
"T# c #DEDAD1",
|
||||
"U# c #B1ACA3",
|
||||
"V# c #7C7C7C",
|
||||
"W# c #B5B4B1",
|
||||
"X# c #5A5853",
|
||||
"Y# c #4F4C46",
|
||||
"Z# c #A09A8E",
|
||||
"`# c #76726A",
|
||||
" $ c #88857F",
|
||||
".$ c #4B4843",
|
||||
"+$ c #DAD2C1",
|
||||
"@$ c #B4ADA0",
|
||||
"#$ c #B7B4AF",
|
||||
"$$ c #CCC9C2",
|
||||
"%$ c #282623",
|
||||
"&$ c #888378",
|
||||
"*$ c #262522",
|
||||
"=$ c #A8A194",
|
||||
"-$ c #9A9388",
|
||||
";$ c #BEB7A8",
|
||||
">$ c #E3DCCD",
|
||||
",$ c #D1CEC6",
|
||||
"'$ c #ACA699",
|
||||
")$ c #AFA99B",
|
||||
"!$ c #B2ADA2",
|
||||
"~$ c #A09D97",
|
||||
"{$ c #C0BCB5",
|
||||
"]$ c #B0A99C",
|
||||
"^$ c #7A776F",
|
||||
"/$ c #99958E",
|
||||
"($ c #8A8681",
|
||||
"_$ c #777068",
|
||||
":$ c #B3AB9D",
|
||||
"<$ c #131211",
|
||||
"[$ c #5D5A53",
|
||||
"}$ c #090908",
|
||||
"|$ c #8C877C",
|
||||
"1$ c #C7C1B4",
|
||||
"2$ c #D3CEC5",
|
||||
"3$ c #EAE5DA",
|
||||
"4$ c #83817D",
|
||||
"5$ c #C7C0B0",
|
||||
"6$ c #484743",
|
||||
"7$ c #C3BFB7",
|
||||
"8$ c #C7C1B3",
|
||||
"9$ c #9E998F",
|
||||
"0$ c #CCC9C1",
|
||||
"a$ c #C3C0B8",
|
||||
"b$ c #817E78",
|
||||
"c$ c #7F786E",
|
||||
"d$ c #AFA494",
|
||||
"e$ c #ABA396",
|
||||
"f$ c #474645",
|
||||
"g$ c #BCB9B3",
|
||||
"h$ c #9B9893",
|
||||
"i$ c #2B2926",
|
||||
"j$ c #070706",
|
||||
"k$ c #74716D",
|
||||
"l$ c #B7B4AD",
|
||||
"m$ c #484641",
|
||||
"n$ c #504D47",
|
||||
"o$ c #DBD6CC",
|
||||
"p$ c #65615B",
|
||||
"q$ c #DCD5C6",
|
||||
"r$ c #B3ADA1",
|
||||
"s$ c #A8A296",
|
||||
"t$ c #949086",
|
||||
"u$ c #999690",
|
||||
"v$ c #AAA6A0",
|
||||
"w$ c #6D675F",
|
||||
"x$ c #A09789",
|
||||
"y$ c #C2B6A5",
|
||||
"z$ c #6C6259",
|
||||
"A$ c #66645F",
|
||||
"B$ c #2D2D2D",
|
||||
"C$ c #64615B",
|
||||
"D$ c #2F2D2A",
|
||||
"E$ c #8B8781",
|
||||
"F$ c #64625D",
|
||||
"G$ c #0A0908",
|
||||
"H$ c #393733",
|
||||
"I$ c #C2BAAB",
|
||||
"J$ c #D9D5CD",
|
||||
"K$ c #9C978C",
|
||||
"L$ c #CFC8B8",
|
||||
"M$ c #9C968A",
|
||||
"N$ c #928D83",
|
||||
"O$ c #98958E",
|
||||
"P$ c #CBC8C0",
|
||||
"Q$ c #B1ADA7",
|
||||
"R$ c #8D8A84",
|
||||
"S$ c #878177",
|
||||
"T$ c #B4AA9B",
|
||||
"U$ c #B3A898",
|
||||
"V$ c #7A7368",
|
||||
"W$ c #706E6B",
|
||||
"X$ c #292826",
|
||||
"Y$ c #A9A499",
|
||||
"Z$ c #3F3E3C",
|
||||
"`$ c #1B1A18",
|
||||
" % c #9F9C96",
|
||||
".% c #2D2A27",
|
||||
"+% c #C8C1B1",
|
||||
"@% c #E6DFD2",
|
||||
"#% c #C0BDB7",
|
||||
"$% c #8C8982",
|
||||
"%% c #C7C3BC",
|
||||
"&% c #8E8B84",
|
||||
"*% c #958E86",
|
||||
"=% c #837B6F",
|
||||
"-% c #AFA595",
|
||||
";% c #80796E",
|
||||
">% c #31302D",
|
||||
",% c #8F8C87",
|
||||
"'% c #74726E",
|
||||
")% c #5E5C57",
|
||||
"!% c #393430",
|
||||
"~% c #413F3B",
|
||||
"{% c #413C37",
|
||||
"]% c #605E5A",
|
||||
"^% c #22201D",
|
||||
"/% c #0C0B0A",
|
||||
"(% c #E9E4DA",
|
||||
"_% c #D6CFC2",
|
||||
":% c #7E766A",
|
||||
"<% c #C0B4A3",
|
||||
"[% c #C1B6A5",
|
||||
"}% c #605B52",
|
||||
"|% c #97938B",
|
||||
"1% c #181817",
|
||||
"2% c #0A0A0A",
|
||||
"3% c #8D8981",
|
||||
"4% c #787369",
|
||||
"5% c #D4CFC6",
|
||||
"6% c #DCD6C9",
|
||||
"7% c #CAC6BC",
|
||||
"8% c #A5A096",
|
||||
"9% c #78756E",
|
||||
"0% c #726E65",
|
||||
"a% c #4A4742",
|
||||
"b% c #605E59",
|
||||
"c% c #363433",
|
||||
"d% c #0B0A0A",
|
||||
"e% c #BFB5A5",
|
||||
"f% c #C3B8A6",
|
||||
"g% c #6C6359",
|
||||
"h% c #7C786E",
|
||||
"i% c #46433D",
|
||||
"j% c #55534F",
|
||||
"k% c #BAB5AB",
|
||||
"l% c #E1DACA",
|
||||
"m% c #B1AA9C",
|
||||
"n% c #928B80",
|
||||
"o% c #ACA598",
|
||||
"p% c #CCC5B8",
|
||||
"q% c #E1DACB",
|
||||
"r% c #CFC9BE",
|
||||
"s% c #44413C",
|
||||
"t% c #23221F",
|
||||
"u% c #AFA89B",
|
||||
"v% c #D5CCBB",
|
||||
"w% c #BEB2A1",
|
||||
"x% c #A59A8B",
|
||||
"y% c #5C564D",
|
||||
"z% c #0F0F0E",
|
||||
"A% c #65625C",
|
||||
"B% c #B8B4AE",
|
||||
"C% c #AAA498",
|
||||
"D% c #55514B",
|
||||
"E% c #332F2A",
|
||||
"F% c #47443E",
|
||||
"G% c #252320",
|
||||
"H% c #3A3833",
|
||||
"I% c #6B665C",
|
||||
"J% c #857D71",
|
||||
"K% c #90887B",
|
||||
"L% c #CBC1B0",
|
||||
"M% c #CBC1AF",
|
||||
"N% c #DED7CA",
|
||||
"O% c #9B968A",
|
||||
"P% c #59554E",
|
||||
"Q% c #B5AB9C",
|
||||
"R% c #7B7469",
|
||||
"S% c #57524A",
|
||||
"T% c #040303",
|
||||
"U% c #2F2D29",
|
||||
"V% c #BEBBB4",
|
||||
"W% c #D2CEC3",
|
||||
"X% c #1D1C1A",
|
||||
"Y% c #292827",
|
||||
"Z% c #1C1A18",
|
||||
"`% c #090807",
|
||||
" & c #181613",
|
||||
".& c #807A6E",
|
||||
"+& c #DCD5C7",
|
||||
"@& c #B8B2A5",
|
||||
"#& c #191815",
|
||||
"$& c #B8B0A2",
|
||||
"%& c #C9C1B2",
|
||||
"&& c #6A6259",
|
||||
"*& c #AEA393",
|
||||
"=& c #625D54",
|
||||
"-& c #010100",
|
||||
";& c #353431",
|
||||
">& c #76736C",
|
||||
",& c #C8C5BD",
|
||||
"'& c #979287",
|
||||
")& c #3A3733",
|
||||
"!& c #413E39",
|
||||
"~& c #8A8680",
|
||||
"{& c #BFB8AB",
|
||||
"]& c #3A3631",
|
||||
"^& c #494440",
|
||||
"/& c #3C3731",
|
||||
"(& c #28231F",
|
||||
"_& c #181715",
|
||||
":& c #040404",
|
||||
"<& c #3D3933",
|
||||
"[& c #B9B1A3",
|
||||
"}& c #85827B",
|
||||
"|& c #080807",
|
||||
"1& c #645F57",
|
||||
"2& c #8F897E",
|
||||
"3& c #71675D",
|
||||
"4& c #B5AB9A",
|
||||
"5& c #766E63",
|
||||
"6& c #38342F",
|
||||
"7& c #0D0C0B",
|
||||
"8& c #0D0B0A",
|
||||
"9& c #33312D",
|
||||
"0& c #D5CFC4",
|
||||
"a& c #DBD4C5",
|
||||
"b& c #534E48",
|
||||
"c& c #030303",
|
||||
"d& c #5E5D5E",
|
||||
"e& c #535153",
|
||||
"f& c #666460",
|
||||
"g& c #3D3B39",
|
||||
"h& c #79756B",
|
||||
"i& c #43413B",
|
||||
"j& c #B9B4A9",
|
||||
"k& c #D5D0C6",
|
||||
"l& c #CEC8BC",
|
||||
"m& c #BDB6A9",
|
||||
"n& c #97948F",
|
||||
"o& c #D5CEC0",
|
||||
"p& c #B2AC9E",
|
||||
"q& c #ADA293",
|
||||
"r& c #797166",
|
||||
"s& c #151412",
|
||||
"t& c #76736D",
|
||||
"u& c #DBD4C8",
|
||||
"v& c #D9D2C1",
|
||||
"w& c #2E2B28",
|
||||
"x& c #171615",
|
||||
"y& c #454243",
|
||||
"z& c #2C2B2A",
|
||||
"A& c #68655E",
|
||||
"B& c #807C75",
|
||||
"C& c #BAB5AA",
|
||||
"D& c #D0CABD",
|
||||
"E& c #D9D1C0",
|
||||
"F& c #E1DACD",
|
||||
"G& c #DCD3C3",
|
||||
"H& c #D0C7B7",
|
||||
"I& c #D6CEBE",
|
||||
"J& c #A8A299",
|
||||
"K& c #54524D",
|
||||
"L& c #0B0A09",
|
||||
"M& c #5E5A53",
|
||||
"N& c #9C9486",
|
||||
"O& c #948C7E",
|
||||
"P& c #544F47",
|
||||
"Q& c #0D0C0A",
|
||||
"R& c #DDD7CC",
|
||||
"S& c #E4DFD3",
|
||||
"T& c #AFAA9F",
|
||||
"U& c #847F76",
|
||||
"V& c #BFB7AB",
|
||||
"W& c #E5DFD1",
|
||||
"X& c #E8E3D7",
|
||||
"Y& c #C6BBA9",
|
||||
"Z& c #C8BDAC",
|
||||
"`& c #B8AE9F",
|
||||
" * c #756F65",
|
||||
".* c #46413B",
|
||||
"+* c #6A665D",
|
||||
"@* c #B0AA9C",
|
||||
"#* c #D7CFBF",
|
||||
"$* c #E0D8C8",
|
||||
"%* c #B8B2A7",
|
||||
"&* c #5B5851",
|
||||
"** c #272623",
|
||||
"=* c #191513",
|
||||
"-* c #413F3A",
|
||||
";* c #4B4842",
|
||||
">* c #87837B",
|
||||
",* c #B7B2A9",
|
||||
"'* c #A6A199",
|
||||
")* c #E7E1D4",
|
||||
"!* c #D7CEBD",
|
||||
"~* c #D9D1C2",
|
||||
"{* c #CDC4B3",
|
||||
"]* c #B1A89A",
|
||||
"^* c #837D73",
|
||||
"/* c #534F48",
|
||||
"(* c #373531",
|
||||
"_* c #22211F",
|
||||
":* c #C7BFB0",
|
||||
"<* c #3F3D38",
|
||||
"[* c #A8A295",
|
||||
"}* c #BAB5A9",
|
||||
"|* c #3B3935",
|
||||
"1* c #706C63",
|
||||
"2* c #91887C",
|
||||
"3* c #C1B7A7",
|
||||
"4* c #B7AD9D",
|
||||
"5* c #69645C",
|
||||
"6* c #74716B",
|
||||
"7* c #A19D95",
|
||||
"8* c #918B82",
|
||||
"9* c #484640",
|
||||
"0* c #636058",
|
||||
"a* c #68635B",
|
||||
"b* c #38332F",
|
||||
"c* c #0E0C0B",
|
||||
"d* c #837E73",
|
||||
"e* c #34322E",
|
||||
"f* c #050505",
|
||||
"g* c #060606",
|
||||
"h* c #060505",
|
||||
"i* c #12100E",
|
||||
"j* c #78746C",
|
||||
"k* c #C5C0B5",
|
||||
"l* c #AFABA1",
|
||||
"m* c #44433F",
|
||||
"n* c #100E0C",
|
||||
"o* c #21201D",
|
||||
"p* c #6C6963",
|
||||
"q* c #D0CBBF",
|
||||
"r* c #53504B",
|
||||
"s* c #4E4B44",
|
||||
"t* c #CCC5B6",
|
||||
"u* c #72716C",
|
||||
"v* c #6E6C66",
|
||||
"w* c #43403B",
|
||||
"x* c #B0AA9F",
|
||||
"y* c #85817A",
|
||||
"z* c #D5CFC3",
|
||||
"A* c #8C887E",
|
||||
"B* c #2D2C2A",
|
||||
"C* c #2A2723",
|
||||
"D* c #65635E",
|
||||
"E* c #BCB7AC",
|
||||
"F* c #66625A",
|
||||
"G* c #7F796F",
|
||||
"H* c #96928A",
|
||||
"I* c #CCC7BE",
|
||||
"J* c #B5B1A9",
|
||||
"K* c #938F86",
|
||||
"L* c #CCC8BE",
|
||||
"M* c #1E1C1A",
|
||||
"N* c #817D73",
|
||||
"O* c #191715",
|
||||
"P* c #726D64",
|
||||
"Q* c #747069",
|
||||
"R* c #E8E2D6",
|
||||
"S* c #99958B",
|
||||
"T* c #E5E0D3",
|
||||
"U* c #7F7C73",
|
||||
"V* c #666159",
|
||||
"W* c #1A1917",
|
||||
"X* c #131110",
|
||||
"Y* c #726E66",
|
||||
"Z* c #45433E",
|
||||
"`* c #D9D1C1",
|
||||
" = c #1E1B19",
|
||||
".= c #CDC5B5",
|
||||
"+= c #A7A194",
|
||||
"@= c #242220",
|
||||
"#= c #42403B",
|
||||
"$= c #060605",
|
||||
"%= c #484540",
|
||||
" ",
|
||||
" . + @ # $ % & % * = ",
|
||||
" - ; > , ' ) ! ~ { ] { ] { ~ ^ / ",
|
||||
" ( _ : < ~ ^ ~ ^ [ } | 1 2 3 4 5 6 7 8 9 ",
|
||||
" 0 a b ^ ^ ~ c d e f g h i j k l m n o p q r s ",
|
||||
" t u v { ] { w x y z A B C m D E F G H I J K L M N O P ",
|
||||
" Q R S T U V W X Y Z ` ...+.@.C #.$.%.&.*.=.O -.{ ;.O O >. ",
|
||||
" ,.'.^ { ).!.~.{.].#.^./.(._.:.<.[.}.|.1.O 2.3.4.5.6.] 7.-.8.9. ",
|
||||
" 0.a.{ ^ b.c.d.e.f.g.h.i.j.c k.l.m.n.o.p.q.O r.s.t.u.v.w.x.y.O z. ",
|
||||
" A.B.C.D.9 E.F.G.H.I.J.K.L.] M.).N.] { O.P.Q.R.S.T.U.V.W.X.Y.R.Z.`. ",
|
||||
" +O .+++@+O O #+$+%+&+*+=+p.-+;+{ ] ^ ~ ^ ^ ^ U >+,+'+)+!+~+{+]+^+ ",
|
||||
" /+(+_+U N.:+O O O O <+[+O }+|+1+^ ~ [ 2+^ ^ 3+4+5+@ 6+7+8+9+0+a+b+c+ ",
|
||||
" d+e+f+g+h+i+j+k+j+:+O O l+m+n+O o+p+q+M.r+s+t+u+v+y w+x+y+8+z+A+O O B+C+D+E+ ",
|
||||
" d+u F+G+H+#+;.I+^ ] J+O K+L+M+N+O O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@O O @@#@$@%@&@ ",
|
||||
" *@=@G+ B+-@;@] >@{ ,@'@)@O M+!@~@{@]@^@/@(@_@O y.:@<@[@}@|@[@Y+1@2@O O 3@4@5@6@ ",
|
||||
" 7@ 8@9@0@a@b@c@d@O O O e@f@g@h@O i@j@O O O h@_ k@l@O m@n@Q.H o@p@O O O &+q@r@ ",
|
||||
" s@t@ G+u@v@w@x@y@z@O O A@B@C@(+O O D@E@F@O O O G@H@I@r J@K@L@M@N@O@P@O O Q@R@S@T@ ",
|
||||
" U@<+ V@W@X@Y@Z@:.`@ #.#+#@#O O O O Q.1 ##O O $#%#&#*#$+=#-#;#>#,#'#)#O O K+!#~#{# ",
|
||||
" w+i.]# ^#/#(#_#:#<#[#}#|#O O O O O O q 1#O O O $#2#3#4#5#6#7#8#9#0#a#O O O b#c#d# ",
|
||||
" e#f# e#>#g#h#O O O O O O O O O O y.i#j#O O O k#l#m#n#o#p#q#r#s#t#5.O O u#v#w#x# ",
|
||||
" y#z# A#B#O O O O O O O O O O O O O y.C#O+O O O D#E#F#G#H#I#J#K#T+L#M#O O Y+N#4+O# ",
|
||||
" P#Q# R#S#O O O O O O O O O O O O O T#/ #+O O O U#V#W#9+X#Y#Z#`# $.$+$#+@$.@#$$$ ",
|
||||
" %$&$ *$=$O O -$8+;$O O O O O O O >$,$'$O O O O 8@i.)$!$~${$L i+]$^$/$: ($_$:$G+",
|
||||
" <$[$U@ }$|$1$s+2$=.O O O O O O O O 3$4$Q@O O O 5$6$7${ 3$8$9$u+0$a$b$c$d$@.e$G+",
|
||||
" f$g$h$i$ j$k$l$m$n$9#O O O O O O O O 5#o$p$)#O O O q$r$s$t$u$b+v$w$x$n Y@Y@y$z$A$",
|
||||
" B$C$D$ E$F$G$H$I$9#O O O O O O O O O N J$K$L$M$N$O$P$Q$R$S$T$U$m D Y@D D Y@V$W$",
|
||||
" X$Y$Z$ `$ % .%+%w+O O O O O O O O O O @%#%$%%%0$&%*%=%-%D Y@D Y@D Y@D D Y@;%4#",
|
||||
" >%,%'%)% !%~%{% R@]% ^%/%S$[@O O O O O O O O D@(%_%&$:%d$Y@D D m y$<%C m D Y@Y@[%}%F$",
|
||||
" |%1% 2%`$3%4%5%;@N 6%7%8%9%0%a%b%c%d%H+K#O O O O O O O O e% .f. .<%y$D m C @.f%@.C m D D U$g% ",
|
||||
" [$h%i%j%k%l%O m%k#n%o%p%-@++q%0@:+r%h%s%t%u%O O O O O O O v%..:.f.g.m D y$B f%w%+.@.C x%y%z% ",
|
||||
" A%B%C%l%$+D%E%F%G%H%H%I%J%K%L%M%N%;.y.O%<$P%5$O O O O +$Q%+.w%f%B y$D m g.f.:...R%S%T%G+ ",
|
||||
" U%V%W%z.s#X%Y%Z%G+G+G+G+G+G+j$`% &.&+&3$N @&#&v#$&O O O %&&&@.f%@.C m D y$<%*&=&}$-& ",
|
||||
" ;&>&,&'&)&!&Q ~&{&]&G+ ^&/&(&_&:&<&[&:+D@}&G+|&1&z.O 2&3&C <%y$m D 4&5&6&7&8& ",
|
||||
" 9&0&a&b&c&d&e&f&g&h&Z%i&a+j&k&l&>+m&n&>%P%L%O o&G+ G+^#p&h%{.Y@D q&r&6&s&G+ ",
|
||||
" t&u&v&w&x&y&z&A&B&C&D&E&8 F&G&H&I&y.-.3$J&b#O K&G+ L&M&N&O&P&Q&G+ ",
|
||||
"n$R&S&T&U&u#V&]@W&X&;.+$Y&Z&`& *.*+*@*#*$*%*&*=#**G+ =*G+G+ ",
|
||||
"-*;*>*,*'*)*!*-@~*{*]*^*/*(*_*H%M$:*<*U@[*#+}***G+ ",
|
||||
" |*1*=$2*3*4*5*.$G+6*7*8*8&v#9*0*a*H+b*c*M@+$d*e* ",
|
||||
" f*g*h*i* U+-#E#N j*G+G+ k*l*m*n* ",
|
||||
" o*u%p*q*r*G+ s*t*u*v*G+ ",
|
||||
" w*x*y*z*A*B*C* D*E*[*}$G+ ",
|
||||
" L#F*G*H*I*J*p@K*L*M#M*N*O* ",
|
||||
" b#P*(+Q*R*S*T*U*l+1.V*W* ",
|
||||
" X*Y*Z*`* =.=X%+=@=G+ ",
|
||||
" #=$=%=G+ "};
|
||||
|
Before Width: | Height: | Size: 961 B After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
pixmaps/red.png
|
Before Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1,020 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
|
@ -20,7 +20,6 @@ gtk/loginframe.c
|
|||
[type: gettext/glade]gtk/call_logs.ui
|
||||
[type: gettext/glade]gtk/main.ui
|
||||
[type: gettext/glade]gtk/sip_account.ui
|
||||
[type: gettext/glade]gtk/chatroom.ui
|
||||
[type: gettext/glade]gtk/parameters.ui
|
||||
[type: gettext/glade]gtk/buddylookup.ui
|
||||
[type: gettext/glade]gtk/waiting.ui
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ AM_CPPFLAGS=\
|
|||
|
||||
COMMON_CFLAGS=\
|
||||
-DIN_LINPHONE \
|
||||
$(LIBXML2_CFLAGS) \
|
||||
$(ORTP_CFLAGS) \
|
||||
$(STRICT_OPTIONS)
|
||||
$(STRICT_OPTIONS) \
|
||||
$(LIBXML2_CFLAGS)
|
||||
|
||||
if BUILD_TOOLS
|
||||
|
||||
|
|
@ -21,8 +21,8 @@ libxml2lpc_la_SOURCES=\
|
|||
|
||||
libxml2lpc_la_CFLAGS=$(COMMON_CFLAGS)
|
||||
libxml2lpc_la_LIBADD=\
|
||||
$(LIBXML2_LIBS) \
|
||||
$(top_builddir)/coreapi/liblinphone.la
|
||||
$(top_builddir)/coreapi/liblinphone.la \
|
||||
$(LIBXML2_LIBS)
|
||||
|
||||
libxml2lpc_la_LDFLAGS=-no-undefined
|
||||
|
||||
|
|
@ -33,7 +33,8 @@ xml2lpc_test_SOURCES=\
|
|||
|
||||
xml2lpc_test_CFLAGS=$(COMMON_CFLAGS)
|
||||
xml2lpc_test_LDADD=\
|
||||
libxml2lpc.la
|
||||
$(top_builddir)/coreapi/liblinphone.la \
|
||||
libxml2lpc.la
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
|||