Commit 5430a889 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2006] Add atached/detached conference icons

parent ea9dfb44
......@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.svg
buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history2.svg sflphone.svg sflphone_small.svg stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg wait-on.gif
buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history2.svg sflphone.svg sflphone_small.svg stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg usersActive.svg home.svg wait-on.gif
buttonsdir = $(datadir)/sflphone
EXTRA_DIST = $(buttons_DATA) $(icon_DATA)
This diff is collapsed.
......@@ -32,7 +32,8 @@
*/
typedef enum
{
CONFERENCE_STATE_ACTIVE = 0,
CONFERENCE_STATE_ACTIVE_ATACHED = 0,
CONFERENCE_STATE_ACTIVE_DETACHED,
CONFERENCE_STATE_HOLD
} conference_state_t;
......
......@@ -205,9 +205,11 @@ void row_activated(GtkTreeView *tree_view UNUSED,
{
switch(selectedConf->_state)
{
case CONFERENCE_STATE_ACTIVE:
case CONFERENCE_STATE_ACTIVE_ATACHED:
sflphone_add_main_participant(selectedConf);
break;
case CONFERENCE_STATE_ACTIVE_DETACHED:
break;
case CONFERENCE_STATE_HOLD:
sflphone_conference_off_hold(selectedConf);
break;
......@@ -728,6 +730,19 @@ void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf)
if( tab == current_calls )
{
switch(conf->_state)
{
case CONFERENCE_STATE_ACTIVE_ATACHED:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/usersActive.svg", NULL);
break;
case CONFERENCE_STATE_ACTIVE_DETACHED:
case CONFERENCE_STATE_HOLD:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL);
break;
default:
WARN("Update conference add - Should not happen!");
}
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL);
}
......
......@@ -135,6 +135,7 @@
<signal name="conferenceChanged">
<arg type="s" name="confID" direction="out"/>
<arg type="s" name="state" direction="out"/>
</signal>
<method name="getParticipantList">
......
......@@ -206,14 +206,34 @@ call_state_cb (DBusGProxy *proxy UNUSED,
static void
conference_changed_cb (DBusGProxy *proxy UNUSED,
const gchar* confID,
const gchar* state,
void * foo UNUSED )
{
DEBUG ("Conference changed\n");
// sflphone_display_transfer_status("Transfer successfull");
conference_obj_t* changed_conf = conferencelist_get(confID);
calltree_remove_conference (current_calls, changed_conf, NULL);
calltree_add_conference (current_calls, changed_conf);
DEBUG(" %s\n", state);
if(changed_conf)
{
calltree_remove_conference (current_calls, changed_conf, NULL);
if ( strcmp(state, "ACTIVE_ATACHED") == 0 )
{
changed_conf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
}
else if ( strcmp(state, "ACTIVE_DTACHED") == 0 )
{
changed_conf->_state = CONFERENCE_STATE_ACTIVE_DETACHED;
}
else if ( strcmp(state, "HOLD") == 0 )
{
changed_conf->_state = CONFERENCE_STATE_HOLD;
}
calltree_add_conference (current_calls, changed_conf);
}
}
......@@ -226,7 +246,7 @@ conference_created_cb (DBusGProxy *proxy UNUSED,
conference_obj_t* new_conf;
create_new_conference(CONFERENCE_STATE_ACTIVE, confID, &new_conf);
create_new_conference(CONFERENCE_STATE_ACTIVE_ATACHED, confID, &new_conf);
new_conf->_confID = g_strdup(confID);
conferencelist_add(new_conf);
calltree_add_conference (current_calls, new_conf);
......@@ -407,7 +427,7 @@ dbus_connect ()
dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__STRING,
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID);
dbus_g_proxy_add_signal (callManagerProxy,
"conferenceChanged", G_TYPE_STRING, G_TYPE_INVALID);
"conferenceChanged", G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
dbus_g_proxy_connect_signal (callManagerProxy,
"conferenceChanged", G_CALLBACK(conference_changed_cb), NULL, NULL);
......
......@@ -235,20 +235,26 @@ conference_hold (void* foo UNUSED)
{
conference_obj_t * selectedConf = calltab_get_selected_conf();
if(selectedConf)
switch(selectedConf->_state)
{
if(selectedConf->_state == CONFERENCE_STATE_HOLD)
{
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg"));
selectedConf->_state = CONFERENCE_STATE_ACTIVE;
sflphone_conference_off_hold(selectedConf);
}
else
{
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg"));
selectedConf->_state = CONFERENCE_STATE_HOLD;
sflphone_conference_on_hold(selectedConf);
}
case CONFERENCE_STATE_HOLD:
{
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg"));
selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
sflphone_conference_off_hold(selectedConf);
}
break;
case CONFERENCE_STATE_ACTIVE_ATACHED:
case CONFERENCE_STATE_ACTIVE_DETACHED:
{
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg"));
selectedConf->_state = CONFERENCE_STATE_HOLD;
sflphone_conference_on_hold(selectedConf);
}
break;
default:
break;
}
}
......@@ -782,10 +788,12 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
{
switch(selectedConf->_state)
{
case CONFERENCE_STATE_ACTIVE:
case CONFERENCE_STATE_ACTIVE_ATACHED:
hangup_conf = TRUE;
hold_conf = TRUE;
break;
case CONFERENCE_STATE_ACTIVE_DETACHED:
break;
case CONFERENCE_STATE_HOLD:
hangup_conf = TRUE;
hold_conf = TRUE;
......
......@@ -120,8 +120,12 @@ std::string Conference::getStateStr()
switch(_confState) {
case Active:
state_str = "ACTIVE";
case Active_Atached:
state_str = "ACTIVE_ATACHED";
break;
case Active_Detached:
state_str = "ACTIVE_DETACHED";
break;
case Hold:
......
......@@ -34,7 +34,7 @@ class Conference{
public:
enum ConferenceState {Active, Hold};
enum ConferenceState {Active_Atached, Active_Detached, Hold};
static int count;
......
......@@ -135,6 +135,7 @@
<signal name="conferenceChanged">
<arg type="s" name="confID" direction="out"/>
<arg type="s" name="state" direction="out"/>
</signal>
<method name="getParticipantList">
......
......@@ -4,6 +4,7 @@
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
* Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
* Author: Guillaume Carmel-Archambault <guillaume.carmel-archambault@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -878,9 +879,15 @@ ManagerImpl::holdConference(const CallID& id)
}
conf->setState(Conference::Hold);
_dbus->getCallManager()->conferenceChanged(conf->getConfID(), conf->getStateStr());
}
}
......@@ -916,6 +923,10 @@ ManagerImpl::unHoldConference(const CallID& id)
}
conf->setState(Conference::Active_Atached);
_dbus->getCallManager()->conferenceChanged(conf->getConfID(), conf->getStateStr());
}
}
......@@ -1009,7 +1020,7 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id)
call = getAccountLink (currentAccountId)->getCall (call_id);
call->setConfId (conf->getConfID());
_dbus->getCallManager()->conferenceChanged(conference_id);
_dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment