Skip to content
Snippets Groups Projects
Commit 401a1d92 authored by alexandresavard's avatar alexandresavard
Browse files

Record button added

parent 477ec6f4
Branches
Tags
No related merge requests found
...@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps ...@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.png icon_DATA = sflphone.png
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 history.svg history2.svg sflphone.png stock_person.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 history.svg history2.svg sflphone.png stock_person.svg rec_call.svg record.svg
buttonsdir = $(datadir)/sflphone buttonsdir = $(datadir)/sflphone
EXTRA_DIST = $(buttons_DATA) $(icon_DATA) EXTRA_DIST = $(buttons_DATA) $(icon_DATA)
...@@ -702,6 +702,13 @@ sflphone_place_call ( call_t * c ) ...@@ -702,6 +702,13 @@ sflphone_place_call ( call_t * c )
} }
} }
void
sflphone_rec_call()
{
}
/* Internal to action - set the __CURRENT_ACCOUNT variable */ /* Internal to action - set the __CURRENT_ACCOUNT variable */
void void
sflphone_set_current_account() sflphone_set_current_account()
......
...@@ -39,6 +39,7 @@ GtkToolItem * transfertButton; ...@@ -39,6 +39,7 @@ GtkToolItem * transfertButton;
GtkToolItem * unholdButton; GtkToolItem * unholdButton;
GtkToolItem * historyButton; GtkToolItem * historyButton;
GtkToolItem * mailboxButton; GtkToolItem * mailboxButton;
GtkToolItem * recButton;
guint transfertButtonConnId; //The button toggled signal connection ID guint transfertButtonConnId; //The button toggled signal connection ID
gboolean history_shown; gboolean history_shown;
...@@ -219,6 +220,18 @@ call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED) ...@@ -219,6 +220,18 @@ call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED)
if( active_calltree == history ) switch_tab(); if( active_calltree == history ) switch_tab();
} }
/**
* Static rec_button
*/
static void
rec_button( GtkWidget *widget UNUSED, gpointer data UNUSED)
{
sflphone_rec_call();
}
void void
toolbar_update_buttons () toolbar_update_buttons ()
{ {
...@@ -228,6 +241,7 @@ toolbar_update_buttons () ...@@ -228,6 +241,7 @@ toolbar_update_buttons ()
gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , FALSE); gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE);
gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE);
g_object_ref(holdButton); g_object_ref(holdButton);
g_object_ref(unholdButton); g_object_ref(unholdButton);
if( is_inserted( GTK_WIDGET(holdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); if( is_inserted( GTK_WIDGET(holdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton));
...@@ -238,6 +252,7 @@ toolbar_update_buttons () ...@@ -238,6 +252,7 @@ toolbar_update_buttons ()
if( is_inserted( GTK_WIDGET(callButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); if( is_inserted( GTK_WIDGET(callButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
if( is_inserted( GTK_WIDGET(pickupButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton)); if( is_inserted( GTK_WIDGET(pickupButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton));
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), callButton, 0); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), callButton, 0);
//gtk_toolbar_insert(GTK_TOOLBAR(toolbar), recButton, 0);
gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId); gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId);
...@@ -267,6 +282,7 @@ toolbar_update_buttons () ...@@ -267,6 +282,7 @@ toolbar_update_buttons ()
case CALL_STATE_RINGING: case CALL_STATE_RINGING:
gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE);
break; break;
case CALL_STATE_DIALING: case CALL_STATE_DIALING:
if( active_calltree != history ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); if( active_calltree != history ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE);
...@@ -280,6 +296,7 @@ toolbar_update_buttons () ...@@ -280,6 +296,7 @@ toolbar_update_buttons ()
gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE);
break; break;
case CALL_STATE_BUSY: case CALL_STATE_BUSY:
case CALL_STATE_FAILURE: case CALL_STATE_FAILURE:
...@@ -312,6 +329,9 @@ toolbar_update_buttons () ...@@ -312,6 +329,9 @@ toolbar_update_buttons ()
} }
} }
} }
/* Call back when the user click on a call in the list */ /* Call back when the user click on a call in the list */
static void static void
selected(GtkTreeSelection *sel, void* data UNUSED ) selected(GtkTreeSelection *sel, void* data UNUSED )
...@@ -487,6 +507,17 @@ create_toolbar () ...@@ -487,6 +507,17 @@ create_toolbar ()
G_CALLBACK (call_mailbox), NULL); G_CALLBACK (call_mailbox), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(mailboxButton), -1); gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(mailboxButton), -1);
image = gtk_image_new_from_file( ICONS_DIR "/record.svg");
recButton = gtk_tool_button_new (image, _("Record a call"));
#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text(GTK_WIDGET(recButton), _("Record a call"));
#endif
g_signal_connect (G_OBJECT (recButton), "clicked",
G_CALLBACK (rec_button), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(recButton), -1);
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment