Skip to content
Snippets Groups Projects
Commit 8dee3ca3 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #7101: more cleanup, but conference still broken

parent 4e05987b
Branches
Tags
No related merge requests found
......@@ -907,12 +907,9 @@ sflphone_detach_participant (const gchar* callID)
void
sflphone_add_participant (const gchar* callID, const gchar* confID)
{
GtkTreeIter iter;
callable_obj_t *call;
DEBUG (">SFLphone: Add participant %s to conference %s", callID, confID);
call = calllist_get_call(current_calls, callID);
callable_obj_t *call = calllist_get_call(current_calls, callID);
if (call == NULL) {
ERROR("SFLphone: Error: Could not find call");
return;
......@@ -920,10 +917,7 @@ sflphone_add_participant (const gchar* callID, const gchar* confID)
time(&call->_time_added);
iter = calltree_get_gtkiter_from_id(history, (gchar *)confID);
calltree_add_call(history, call, &iter);
calltree_add_call_to_conference(history, call, confID);
dbus_add_participant (callID, confID);
}
......@@ -976,7 +970,9 @@ sflphone_rec_call()
WARN ("Should not happen in sflphone_off_hold ()!");
break;
}
calltree_update_conference(current_calls, selectedConf);
DEBUG ("Actions: Remove and add conference %s", selectedConf->_confID);
calltree_remove_conference(current_calls, selectedConf);
calltree_add_conference(current_calls, selectedConf);
}
update_actions();
......
......@@ -35,7 +35,7 @@
#include "contacts/searchbar.h"
#include "logger.h"
calltab_t* calltab_init (gboolean searchbar_type, gchar *name)
calltab_t* calltab_init (gboolean searchbar_type, const gchar * const name)
{
calltab_t* ret = calloc (1, sizeof (calltab_t));
ret->_name = g_strdup (name);
......@@ -51,6 +51,7 @@ calltab_t* calltab_init (gboolean searchbar_type, gchar *name)
void
calltab_select_call (calltab_t* tab, callable_obj_t * c)
{
g_assert(tab);
DEBUG("CallTab: Select call %s", c ? c->_callID : "");
tab->selectedType = A_CALL;
......@@ -62,6 +63,7 @@ calltab_select_call (calltab_t* tab, callable_obj_t * c)
void
calltab_select_conf (calltab_t *tab, conference_obj_t * c)
{
g_assert(tab);
DEBUG("CallTab: Selected conf %s", c ? c->_confID : "");
tab->selectedType = A_CONFERENCE;
......@@ -72,31 +74,32 @@ calltab_select_conf (calltab_t *tab, conference_obj_t * c)
gint
calltab_get_selected_type (calltab_t* tab)
{
g_assert(tab);
return tab->selectedType;
}
callable_obj_t *
calltab_get_selected_call (calltab_t *tab)
{
g_assert(tab);
return tab->selectedCall;
}
conference_obj_t*
calltab_get_selected_conf (calltab_t *tab)
{
g_assert(tab);
return tab->selectedConf;
}
void
calltab_create_searchbar (calltab_t* tab)
{
if (g_strcasecmp (tab->_name, HISTORY) == 0) {
g_assert(tab);
if (g_strcasecmp (tab->_name, HISTORY) == 0)
tab->searchbar = history_searchbar_new ();
}
else if (g_strcasecmp (tab->_name, CONTACTS) == 0) {
else if (g_strcasecmp (tab->_name, CONTACTS) == 0)
tab->searchbar = contacts_searchbar_new ();
}
else {
else
ERROR ("Current calls tab does not need a searchbar\n");
}
}
......@@ -40,9 +40,7 @@ calltab_t* current_calls;
calltab_t* history;
calltab_t* contacts;
calltab_t* calltab_init (gboolean, gchar *);
calltab_t* calltab_init (gboolean, const gchar * const);
/** Mark a call as selected. There can be only one selected call. This call
* is the currently highlighted one in the list.
......
This diff is collapsed.
......@@ -96,9 +96,6 @@ calltree_add_history_entry (callable_obj_t *, GtkTreeIter *);
void
calltree_add_conference (calltab_t *, conference_obj_t *);
void
calltree_update_conference (calltab_t *, const conference_obj_t *);
void
calltree_remove_conference(calltab_t *, const conference_obj_t *);
......@@ -115,12 +112,11 @@ gboolean
calltree_update_clock(gpointer);
/**
* Get the iter to a row provided the callID/confID
* @param The calltab (current_calls, history, contacts)
* @param The call
* @param The callID/confID
* @return The
*/
GtkTreeIter
calltree_get_gtkiter_from_id(calltab_t *, gchar *);
void
calltree_(calltab_t *, callable_obj_t *, const gchar * const);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment