Commit 166dac9e authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6860: refactor uimanager, also fixes #6865

More pervasive changes were just to fix "transfert" typo
parent b5637b1a
......@@ -117,7 +117,7 @@
</arg>
</method>
<method name="transfert" tp:name-for-bindings="transfert">
<method name="transfer" tp:name-for-bindings="transfer">
<tp:docstring>
Transfer a call to given phone number.
</tp:docstring>
......
......@@ -167,9 +167,9 @@ CallManager::unhold (const std::string& callID)
}
void
CallManager::transfert (const std::string& callID, const std::string& to)
CallManager::transfer (const std::string& callID, const std::string& to)
{
_debug ("CallManager::transfert received");
_debug ("CallManager::transfer received");
Manager::instance().transferCall (callID, to);
}
......
......@@ -80,7 +80,7 @@ class CallManager
void hangUp (const std::string& callID);
void hold (const std::string& callID);
void unhold (const std::string& callID);
void transfert (const std::string& callID, const std::string& to);
void transfer (const std::string& callID, const std::string& to);
void attendedTransfer(const std::string& transferID, const std::string& targetID);
std::map< std::string, std::string > getCallDetails (const std::string& callID);
std::vector< std::string > getCallList (void);
......
......@@ -3,7 +3,7 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.svg
buttons_DATA = current.svg \
transfert.svg \
transfer.svg \
hold.svg \
unhold.svg \
refuse.svg \
......
......@@ -416,7 +416,7 @@ sflphone_hang_up()
DEBUG ("from sflphone_hang_up : ");
stop_notification();
break;
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
dbus_hang_up (selectedCall);
call_remove_all_errors (selectedCall);
time (&selectedCall->_time_stop);
......@@ -467,8 +467,8 @@ sflphone_pick_up()
dbus_accept (selectedCall);
stop_notification();
break;
case CALL_STATE_TRANSFERT:
dbus_transfert (selectedCall);
case CALL_STATE_TRANSFER:
dbus_transfer (selectedCall);
time (&selectedCall->_time_stop);
calltree_remove_call(current_calls, selectedCall, NULL);
calllist_remove_call(current_calls, selectedCall->_callID);
......@@ -574,12 +574,12 @@ sflphone_record (callable_obj_t * c)
}
void
sflphone_set_transfert()
sflphone_set_transfer()
{
callable_obj_t * c = calltab_get_selected_call (current_calls);
if (c) {
c->_state = CALL_STATE_TRANSFERT;
c->_state = CALL_STATE_TRANSFER;
g_free(c->_trsft_to);
c->_trsft_to = g_strdup ("");
calltree_update_call (current_calls, c, NULL);
......@@ -589,7 +589,7 @@ sflphone_set_transfert()
}
void
sflphone_unset_transfert()
sflphone_unset_transfer()
{
callable_obj_t * c = calltab_get_selected_call (current_calls);
......@@ -643,7 +643,7 @@ void
process_dialing (callable_obj_t *c, guint keyval, gchar *key)
{
// We stop the tone
if (!*c->_peer_number && c->_state != CALL_STATE_TRANSFERT)
if (!*c->_peer_number && c->_state != CALL_STATE_TRANSFER)
dbus_start_tone (FALSE, 0);
switch (keyval) {
......@@ -655,7 +655,7 @@ process_dialing (callable_obj_t *c, guint keyval, gchar *key)
sflphone_hang_up ();
break;
case GDK_BackSpace:
if (c->_state == CALL_STATE_TRANSFERT) {
if (c->_state == CALL_STATE_TRANSFER) {
truncate_last_char(&c->_trsft_to);
calltree_update_call (current_calls, c, NULL);
} else {
......@@ -678,7 +678,7 @@ process_dialing (callable_obj_t *c, guint keyval, gchar *key)
if (keyval < 127 /* ascii */ ||
(keyval >= GDK_Mode_switch && keyval <= GDK_KP_9) /* num keypad */) {
if (c->_state == CALL_STATE_TRANSFERT) {
if (c->_state == CALL_STATE_TRANSFER) {
gchar *new_trsft = g_strconcat (c->_trsft_to, key, NULL);
g_free (c->_trsft_to);
c->_trsft_to = new_trsft;
......@@ -775,19 +775,19 @@ sflphone_keypad (guint keyval, gchar * key)
}
break;
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
switch (keyval) {
case GDK_Return:
case GDK_KP_Enter:
dbus_transfert (c);
dbus_transfer (c);
time (&c->_time_stop);
calltree_remove_call(current_calls, c, NULL);
break;
case GDK_Escape:
sflphone_unset_transfert ();
sflphone_unset_transfer ();
break;
default: // When a call is on transfert, typing new numbers will add it to c->_peer_number
default: // When a call is on transfer, typing new numbers will add it to c->_peer_number
process_dialing (c, keyval, key);
break;
}
......
......@@ -93,12 +93,12 @@ void sflphone_notify_voice_mail (const gchar* accountID , guint count);
* Prepare SFLphone to transfer a call and wait for the user to dial the number to transfer to
* Put the selected call in Transfer state
*/
void sflphone_set_transfert();
void sflphone_set_transfer();
/**
* Cancel the transfer and puts back the selected call to Current state
*/
void sflphone_unset_transfert();
void sflphone_unset_transfer();
/**
* Accept / dial the current call
......
......@@ -80,7 +80,7 @@ typedef enum {
CALL_STATE_HOLD,
CALL_STATE_FAILURE,
CALL_STATE_BUSY,
CALL_STATE_TRANSFERT,
CALL_STATE_TRANSFER,
CALL_STATE_RECORD,
} call_state_t;
......
......@@ -721,21 +721,21 @@ select_audio_manager (void)
if (!must_show_alsa_conf() && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
dbus_set_audio_manager (ALSA_API_STR);
alsabox = alsa_box();
gtk_container_add (GTK_CONTAINER (alsa_conf) , alsabox);
gtk_widget_show (alsa_conf);
gtk_widget_set_sensitive (GTK_WIDGET (alsa_conf), TRUE);
gtk_action_set_sensitive (GTK_ACTION (volumeToggle), TRUE);
gtk_container_add (GTK_CONTAINER(alsa_conf), alsabox);
gtk_widget_show(alsa_conf);
gtk_widget_set_sensitive (alsa_conf, TRUE);
gtk_action_set_sensitive (volumeToggle_, TRUE);
} else if (must_show_alsa_conf() && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
dbus_set_audio_manager (PULSEAUDIO_API_STR);
gtk_container_remove (GTK_CONTAINER (alsa_conf) , alsabox);
gtk_widget_hide (alsa_conf);
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (volumeToggle))) {
main_window_volume_controls (FALSE);
eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, FALSE);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (volumeToggle), FALSE);
gtk_widget_hide(alsa_conf);
if (gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(volumeToggle_))) {
main_window_volume_controls(FALSE);
eel_gconf_set_integer(SHOW_VOLUME_CONTROLS, FALSE);
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION (volumeToggle_), FALSE);
}
gtk_action_set_sensitive (GTK_ACTION (volumeToggle), FALSE);
gtk_action_set_sensitive(volumeToggle_, FALSE);
}
}
......
......@@ -692,7 +692,7 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
gchar * description = NULL;
gchar * audio_codec = call_get_audio_codec (c);
if (c->_state == CALL_STATE_TRANSFERT)
if (c->_state == CALL_STATE_TRANSFER)
description = calltree_display_call_info (c, DISPLAY_TYPE_CALL_TRANSFER, "");
else {
if (c->_sas && display_sas && c->_srtp_state == SRTP_STATE_ZRTP_SAS_UNCONFIRMED && !c->_zrtp_confirmed)
......@@ -727,8 +727,8 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
case CALL_STATE_BUSY:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/busy.svg", NULL);
break;
case CALL_STATE_TRANSFERT:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/transfert.svg", NULL);
case CALL_STATE_TRANSFER:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/transfer.svg", NULL);
break;
case CALL_STATE_RECORD:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/icon_rec.svg", NULL);
......@@ -1294,27 +1294,26 @@ void calltree_display (calltab_t *tab)
DEBUG ("CallTree: Display main tab");
if (active_calltree==contacts)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton_, FALSE);
else
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton_, FALSE);
}
/* case 2: we want to display the history */
else if (tab == history) {
DEBUG ("ConferenceList: Display history tab");
if (active_calltree == contacts)
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) contactButton_, FALSE);
if (active_calltree==contacts)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, TRUE);
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) historyButton_, TRUE);
}
else if (tab==contacts) {
DEBUG ("CallTree: Display contact tab");
if (active_calltree==history)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
if (active_calltree == history)
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) historyButton_, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, TRUE);
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) contactButton_, TRUE);
set_focus_on_addressbook_searchbar();
}
......@@ -1392,7 +1391,7 @@ static void drag_end_cb (GtkWidget * widget UNUSED, GdkDragContext * context UNU
calltree_selected_call->_state == CALL_STATE_INVALID ||
calltree_selected_call->_state == CALL_STATE_FAILURE ||
calltree_selected_call->_state == CALL_STATE_BUSY ||
calltree_selected_call->_state == CALL_STATE_TRANSFERT) {
calltree_selected_call->_state == CALL_STATE_TRANSFER) {
DEBUG ("CallTree: Selected an invalid call");
......@@ -1412,7 +1411,7 @@ static void drag_end_cb (GtkWidget * widget UNUSED, GdkDragContext * context UNU
calltree_dragged_call->_state == CALL_STATE_INVALID ||
calltree_dragged_call->_state == CALL_STATE_FAILURE ||
calltree_dragged_call->_state == CALL_STATE_BUSY ||
calltree_dragged_call->_state == CALL_STATE_TRANSFERT) {
calltree_dragged_call->_state == CALL_STATE_TRANSFER) {
DEBUG ("CallTree: Dragged on an invalid call");
......
......@@ -117,7 +117,7 @@
</arg>
</method>
<method name="transfert" tp:name-for-bindings="transfert">
<method name="transfer" tp:name-for-bindings="transfer">
<tp:docstring>
Transfer a call to given phone number.
</tp:docstring>
......
......@@ -835,13 +835,13 @@ dbus_hang_up_conference (const conference_obj_t * c)
}
void
dbus_transfert (const callable_obj_t * c)
dbus_transfer (const callable_obj_t * c)
{
GError *error = NULL;
org_sflphone_SFLphone_CallManager_transfert (callManagerProxy, c->_callID, c->_trsft_to, &error);
org_sflphone_SFLphone_CallManager_transfer (callManagerProxy, c->_callID, c->_trsft_to, &error);
if (error) {
ERROR ("Failed to call transfert() on CallManager: %s", error->message);
ERROR ("Failed to call transfer() on CallManager: %s", error->message);
g_error_free (error);
}
}
......
......@@ -79,7 +79,7 @@ void dbus_hang_up (const callable_obj_t * c);
* CallManager - Transfer a call
* @param c The call to transfer
*/
void dbus_transfert (const callable_obj_t * c);
void dbus_transfer (const callable_obj_t * c);
/**
* CallManager - Perform an attended transfer on two calls
......
......@@ -116,7 +116,7 @@ toggle_pick_up_hang_up_callback ()
if (selectedCall) {
switch (selectedCall->_state) {
case CALL_STATE_INCOMING:
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
sflphone_pick_up ();
break;
case CALL_STATE_DIALING:
......
......@@ -56,305 +56,275 @@
#include <sys/stat.h>
void show_edit_number (callable_obj_t *call);
static GtkWidget *toolbar;
static guint transfertButtonConnId; //The button toggled signal connection ID
static guint recordButtonConnId; //The button toggled signal connection ID
static GtkAction * pickUpAction;
static GtkWidget * pickUpWidget;
static GtkAction * newCallAction;
static GtkWidget * newCallWidget;
static GtkAction * hangUpAction;
static GtkWidget * hangUpWidget;
static GtkWidget * holdMenu;
static GtkWidget * holdToolbar;
static GtkWidget * offHoldToolbar;
static GtkWidget * transferToolbar;
static GtkAction * copyAction;
static GtkAction * pasteAction;
static GtkAction * recordAction;
static GtkWidget * recordWidget;
static GtkAction * voicemailAction;
static GtkWidget * voicemailToolbar;
static GtkWidget * imToolbar;
static GtkAction * imAction;
static GtkWidget * playRecordWidget;
static GtkWidget * stopRecordWidget;
static GtkWidget * editable_num;
static GtkDialog * edit_dialog;
void show_edit_number(callable_obj_t *call);
static GtkWidget *toolbar_;
static guint transferButtonConnId_; //The button toggled signal connection ID
static guint recordButtonConnId_; //The button toggled signal connection ID
static GtkAction * pickUpAction_;
static GtkWidget * pickUpWidget_;
static GtkAction * newCallAction_;
static GtkWidget * newCallWidget_;
static GtkAction * hangUpAction_;
static GtkWidget * hangUpWidget_;
static GtkWidget * holdMenu_;
static GtkWidget * holdToolbar_;
static GtkWidget * offHoldToolbar_;
static GtkWidget * transferToolbar_;
static GtkAction * copyAction_;
static GtkAction * pasteAction_;
static GtkAction * recordAction_;
static GtkWidget * recordWidget_;
static GtkAction * voicemailAction_;
static GtkWidget * voicemailToolbar_;
static GtkWidget * imToolbar_;
static GtkAction * imAction_;
static GtkWidget * playRecordWidget_;
static GtkWidget * stopRecordWidget_;
static GtkWidget * editable_num_;
static GtkWidget * edit_dialog_;
enum {
CALLTREE_CALLS, CALLTREE_HISTORY, CALLTREE_CONTACTS
};
static gboolean
is_inserted (GtkWidget* button, GtkWidget *current_toolbar)
static void
remove_from_toolbar(GtkWidget *widget)
{
return (GTK_WIDGET (button)->parent == GTK_WIDGET (current_toolbar));
/* We must ensure that a widget is a child of a container
* before removing it. */
if (widget->parent == toolbar_)
gtk_container_remove(GTK_CONTAINER(toolbar_), widget);
}
void
update_actions()
{
DEBUG ("UIManager: Update action");
gtk_action_set_sensitive (GTK_ACTION (newCallAction), TRUE);
gtk_action_set_sensitive (GTK_ACTION (pickUpAction), FALSE);
gtk_action_set_sensitive (GTK_ACTION (hangUpAction), FALSE);
gtk_action_set_sensitive (GTK_ACTION (imAction), FALSE);
g_object_ref (hangUpWidget);
g_object_ref (recordWidget);
g_object_ref (holdToolbar);
g_object_ref (offHoldToolbar);
if(abookfactory_is_addressbook_loaded()) {
g_object_ref (contactButton);
}
g_object_ref (historyButton);
g_object_ref (transferToolbar);
g_object_ref (voicemailToolbar);
g_object_ref (imToolbar);
if (is_inserted (GTK_WIDGET (hangUpWidget), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (hangUpWidget));
}
if (is_inserted (GTK_WIDGET (recordWidget), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (recordWidget));
}
if (is_inserted (GTK_WIDGET (transferToolbar), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (transferToolbar));
}
if (is_inserted (GTK_WIDGET (historyButton), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (historyButton));
}
if(abookfactory_is_addressbook_loaded()) {
if (is_inserted (GTK_WIDGET (contactButton), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (contactButton));
}
}
if (is_inserted (GTK_WIDGET (voicemailToolbar), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar),
GTK_WIDGET (voicemailToolbar));
}
if (is_inserted (GTK_WIDGET (imToolbar), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar),
GTK_WIDGET (imToolbar));
}
gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), FALSE);
gtk_action_set_sensitive (GTK_ACTION (recordAction), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (recordWidget), FALSE);
gtk_action_set_sensitive (GTK_ACTION (copyAction), FALSE);
if(abookfactory_is_addressbook_loaded()) {
gtk_widget_set_sensitive (GTK_WIDGET (contactButton), FALSE);
}
gtk_widget_set_sensitive (GTK_WIDGET (historyButton), FALSE);
if(abookfactory_is_addressbook_loaded()) {
gtk_widget_set_tooltip_text (GTK_WIDGET (contactButton),_("No address book selected"));
}
if (is_inserted (GTK_WIDGET (holdToolbar), GTK_WIDGET (toolbar)))
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (holdToolbar));
if (is_inserted (GTK_WIDGET (offHoldToolbar), GTK_WIDGET (toolbar)))
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (offHoldToolbar));
if (is_inserted (GTK_WIDGET (newCallWidget), GTK_WIDGET (toolbar)))
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget));
if (is_inserted (GTK_WIDGET (pickUpWidget), GTK_WIDGET (toolbar)))
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (pickUpWidget));
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (newCallWidget), 0);
if(is_inserted(GTK_WIDGET (playRecordWidget), GTK_WIDGET(toolbar)))
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(playRecordWidget));
if(is_inserted(GTK_WIDGET (stopRecordWidget), GTK_WIDGET(toolbar)))
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(stopRecordWidget));
if (eel_gconf_get_integer (HISTORY_ENABLED)) {
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (historyButton), -1);
gtk_widget_set_sensitive (GTK_WIDGET (historyButton), TRUE);
DEBUG("UIManager: Update action");
gtk_action_set_sensitive(newCallAction_, TRUE);
gtk_action_set_sensitive(pickUpAction_, FALSE);
gtk_action_set_sensitive(hangUpAction_, FALSE);
gtk_action_set_sensitive(imAction_, FALSE);
g_object_ref(hangUpWidget_);
g_object_ref(recordWidget_);
g_object_ref(holdToolbar_);
g_object_ref(offHoldToolbar_);
if (abookfactory_is_addressbook_loaded())
g_object_ref(contactButton_);
g_object_ref(historyButton_);
g_object_ref(transferToolbar_);
g_object_ref(voicemailToolbar_);
g_object_ref(imToolbar_);
remove_from_toolbar(hangUpWidget_);
remove_from_toolbar(recordWidget_);
remove_from_toolbar(transferToolbar_);
remove_from_toolbar(historyButton_);
if (abookfactory_is_addressbook_loaded())
remove_from_toolbar(contactButton_);
remove_from_toolbar(voicemailToolbar_);
remove_from_toolbar(imToolbar_);
gtk_widget_set_sensitive(holdMenu_, FALSE);
gtk_widget_set_sensitive(holdToolbar_, FALSE);
gtk_widget_set_sensitive(offHoldToolbar_, FALSE);
gtk_action_set_sensitive(recordAction_, FALSE);
gtk_widget_set_sensitive(recordWidget_, FALSE);
gtk_action_set_sensitive(copyAction_, FALSE);
if (abookfactory_is_addressbook_loaded())
gtk_widget_set_sensitive(contactButton_, FALSE);
gtk_widget_set_sensitive(historyButton_, FALSE);
if (abookfactory_is_addressbook_loaded())
gtk_widget_set_tooltip_text(contactButton_, _("No address book selected"));
remove_from_toolbar(holdToolbar_);
remove_from_toolbar(offHoldToolbar_);
remove_from_toolbar(newCallWidget_);
remove_from_toolbar(pickUpWidget_);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(newCallWidget_), 0);
remove_from_toolbar(playRecordWidget_);
remove_from_toolbar(stopRecordWidget_);
if (eel_gconf_get_integer(HISTORY_ENABLED)) {
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(historyButton_), -1);
gtk_widget_set_sensitive(historyButton_, TRUE);
}
// If addressbook support has been enabled and all addressbooks are loaded, display the icon
if(abookfactory_is_addressbook_loaded()) {
if (abookfactory_is_addressbook_loaded()) {
AddrBookFactory *bookFactory = abookfactory_get_factory();
AddressBook_Config *addressbook_config;
addressbook_config_load_parameters(&addressbook_config);
addressbook_config_load_parameters(&addressbook_config);
if (addressbook_config->enable && bookFactory->addrbook->is_ready()) {
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (contactButton), -1);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), GTK_TOOL_ITEM(contactButton_), -1);
// Make the icon clickable only if at least one address book is active
if (bookFactory->addrbook->is_active()) {
gtk_widget_set_sensitive (GTK_WIDGET (contactButton), TRUE);
gtk_widget_set_tooltip_text (GTK_WIDGET (contactButton),_ ("Address book"));
gtk_widget_set_sensitive(contactButton_, TRUE);
gtk_widget_set_tooltip_text(contactButton_, _("Address book"));
}
}
}
callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree);
conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree);
conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
gboolean instant_messaging_enabled = TRUE;
if (eel_gconf_key_exists (INSTANT_MESSAGING_ENABLED)) {
instant_messaging_enabled = eel_gconf_get_integer (INSTANT_MESSAGING_ENABLED);
}
if (selectedCall) {
if (eel_gconf_key_exists(INSTANT_MESSAGING_ENABLED))
instant_messaging_enabled = eel_gconf_get_integer(INSTANT_MESSAGING_ENABLED);
DEBUG("UIManager: Update actions for call %s", selectedCall->_callID);
if (selectedCall) {
DEBUG("UIManager: Update actions for call %s", selectedCall->_callID);
// update icon in systray
show_status_hangup_icon();
gtk_action_set_sensitive (GTK_ACTION (copyAction), TRUE);
gtk_action_set_sensitive(copyAction_, TRUE);
switch (selectedCall->_state) {
case CALL_STATE_INCOMING:
DEBUG("UIManager: Call State Incoming");
DEBUG("UIManager: Call State Incoming");
// Make the button toolbar clickable
gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE);
gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
gtk_action_set_sensitive(pickUpAction_, TRUE);
gtk_action_set_sensitive(hangUpAction_, TRUE);
// Replace the dial button with the hangup button
g_object_ref (newCallWidget);
gtk_container_remove