Skip to content
Snippets Groups Projects
Commit 854fd19b authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2474] Basic call info display function

parent 4dd47998
Branches
Tags
No related merge requests found
......@@ -253,6 +253,7 @@ row_activated(GtkTreeView *tree_view UNUSED,
}
/* Catch cursor-activated signal. That is, when the entry is single clicked */
void
row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED)
......@@ -336,6 +337,51 @@ button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUS
return FALSE;
}
gchar*
calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type)
{
gchar * description;
if(c->_state_code == 0) {
if(g_strcmp0("", c->_peer_name) == 0) {
description = g_markup_printf_escaped("<b>%s</b> <i>%s</i>",
c->_peer_name,
c->_peer_number);
}
else {
description = g_markup_printf_escaped("<b>%s</b> <i>%s</i>",
c->_peer_name,
c->_peer_number);
}
}
else {
if(g_strcmp0("", c->_peer_name) == 0) {
description = g_markup_printf_escaped("<b>%s</b> <i>%s</i>\n<i>%s (%d)</i>",
c->_peer_number,
c->_peer_name,
c->_state_code_description,
c->_state_code);
}
else {
description = g_markup_printf_escaped("<b>%s</b> <i>%s</i>\n<i>%s (%d)</i>",
c->_peer_name,
c->_peer_number,
c->_state_code_description,
c->_state_code);
}
}
return description;
}
/**
* Reset call tree
*/
......
......@@ -34,12 +34,22 @@
* @brief The GtkTreeView that list calls in the main window.
*/
enum
{
enum {
A_CALL,
A_CONFERENCE
};
/**
* Tags used to identify display type in calltree
*/
typedef enum {
DISPLAY_TYPE_CALL_TRANSFER,
DISPLAY_TYPE_CALL,
DISPLAY_TYPE_SAS,
DISPLAY_TYPE_STATE_CODE
} CallDisplayType;
/**
* Create a new widget calltree
* @return GtkWidget* A new widget
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment