From f48c1519f35f44f488813b959afcdd2fdd9793e5 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.net> Date: Fri, 18 Sep 2009 10:15:20 -0400 Subject: [PATCH] [#2176] Add conference lock --- sflphone-client-gnome/src/conference_obj.h | 1 + sflphone-client-gnome/src/contacts/calltree.c | 36 ++++++++++++++++++- sflphone-client-gnome/src/contacts/calltree.h | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/sflphone-client-gnome/src/conference_obj.h b/sflphone-client-gnome/src/conference_obj.h index 0a5a5e6d2b..f8f6148527 100644 --- a/sflphone-client-gnome/src/conference_obj.h +++ b/sflphone-client-gnome/src/conference_obj.h @@ -47,6 +47,7 @@ typedef struct { conference_state_t _state; // The state of the call gchar* _confID; // The call ID + gboolean _conference_secured // the security state of the conference } conference_obj_t; diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index c53c19b661..4249b9703c 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -876,7 +876,7 @@ void calltree_add_history_entry (callable_obj_t * c) } -void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf) +void calltree_add_conference (calltab_t* tab, conference_obj_t* conf) { DEBUG("calltree_add_conference conf->_confID %s\n", conf->_confID); @@ -927,6 +927,8 @@ void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf) WARN ("Conferences cannot be added in this widget - This is a bug in the application."); } + + DEBUG("PIXWITH: %i\n", gdk_pixbuf_get_width(pixbuf)); //Resize it if(pixbuf) @@ -936,6 +938,37 @@ void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf) pixbuf = gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR); } } + + /* + conf->_conference_secured = TRUE; + + if(participant) + { + + for (pl = participant; *participant; participant++) + { + + call_id = (gchar*)(*participant); + call = calllist_get (tab, call_id); + + if(call->_srtp_state == 0) + { + conf->_conference_secured = FALSE; + break; + } + } + } + + if(conf->_conference_secured) + { + pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL); + } + else + { + pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL); + } + + */ gtk_tree_store_set(tab->store, &iter, 0, pixbuf, // Icon @@ -954,6 +987,7 @@ void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf) for (pl = participant; *participant; participant++) { + call_id = (gchar*)(*participant); call = calllist_get (tab, call_id); // create_new_call_from_details (conf_id, conference_details, &c); diff --git a/sflphone-client-gnome/src/contacts/calltree.h b/sflphone-client-gnome/src/contacts/calltree.h index 77c3e3ebfc..a01565bc4b 100644 --- a/sflphone-client-gnome/src/contacts/calltree.h +++ b/sflphone-client-gnome/src/contacts/calltree.h @@ -72,7 +72,7 @@ void calltree_add_history_entry (callable_obj_t * c); void -calltree_add_conference (calltab_t* tab, const conference_obj_t* conf); +calltree_add_conference (calltab_t* tab, conference_obj_t* conf); void calltree_update_conference (calltab_t* tab, const gchar* confID); -- GitLab