static gboolean history_is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED) { /* Skip conferences */ if (is_conference(model, iter)) return TRUE; // Fetch the call description const gchar *text = NULL; const gchar *id = NULL; gtk_tree_model_get(model, iter, COLUMN_ACCOUNT_DESC, &text, COLUMN_ID, &id, -1); callable_obj_t *history_entry = calllist_get_call(history_tab, id); gboolean ret = TRUE; if (text && history_entry) { // Filter according to the type of call // MISSED, INCOMING, OUTGOING, ALL const gchar* search = gtk_entry_get_text(history_searchbar_widget); if (!search || !*search) return TRUE; SearchType search_type = get_current_history_search_type(); ret = g_regex_match_simple(search, text, G_REGEX_CASELESS, 0); if (search_type == SEARCH_ALL) return ret; else // We need a match on the history_state and the current search type ret = ret && search_type_matches_state(search_type, history_entry->_history_state); } return ret; }
void sflphone_add_participant(const gchar* callID, const gchar* confID) { g_debug("Add participant %s to conference %s", callID, confID); callable_obj_t *call = calllist_get_call(current_calls_tab, callID); if (call == NULL) { g_warning("Could not find call"); return; } dbus_add_participant(callID, confID); }
void sflphone_detach_participant(const gchar* callID) { callable_obj_t * selectedCall; if (callID == NULL) selectedCall = calltab_get_selected_call(current_calls_tab); else selectedCall = calllist_get_call(current_calls_tab, callID); g_debug("Detach participant %s", selectedCall->_callID); /*TODO elepage(2012) correct IM conversation*/ calltree_remove_call(current_calls_tab, selectedCall->_callID); calltree_add_call(current_calls_tab, selectedCall, NULL); dbus_detach_participant(selectedCall->_callID); }
void sflphone_fill_call_list(void) { gchar **call_list = dbus_get_call_list(); for (gchar **callp = call_list; callp && *callp; ++callp) { const gchar *callID = *callp; if (!calllist_get_call(current_calls_tab, callID)) { callable_obj_t *call = create_new_call_from_details(callID, dbus_get_call_details(callID)); call->_zrtp_confirmed = FALSE; calllist_add_call(current_calls_tab, call); // only add in treeview if this call is NOT in a conference gchar *confID = dbus_get_conference_id(call->_callID); if (g_strcmp0(confID, "") == 0) calltree_add_call(current_calls_tab, call, NULL); g_free(confID); } } g_strfreev(call_list); }