Commit 77397ac5 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Add an arrow beside the call button

parent e356a2da
......@@ -35,10 +35,14 @@ GtkToolItem * transfertButton;
GtkToolItem * unholdButton;
guint transfertButtonConnId; //The button toggled signal connection ID
// list of the accounts to be displayed when the arrow beside the call button is pressed
// should be used to set a default account to make output calls
GtkWidget *accounts_list;
/**
* Make a call
*/
static void
static void
call_button( GtkWidget *widget, gpointer data )
{
sflphone_new_call();
......@@ -47,7 +51,7 @@ call_button( GtkWidget *widget, gpointer data )
/**
* Pick up
*/
static void
static void
pick_up( GtkWidget *widget, gpointer data )
{
sflphone_pick_up();
......@@ -56,7 +60,7 @@ pick_up( GtkWidget *widget, gpointer data )
/**
* Hang up the line
*/
static void
static void
hang_up( GtkWidget *widget, gpointer data )
{
sflphone_hang_up();
......@@ -65,7 +69,7 @@ hang_up( GtkWidget *widget, gpointer data )
/**
* Hold the line
*/
static void
static void
hold( GtkWidget *widget, gpointer data )
{
sflphone_on_hold();
......@@ -74,7 +78,7 @@ hold( GtkWidget *widget, gpointer data )
/**
* Transfert the line
*/
static void
static void
transfert (GtkToggleToolButton *toggle_tool_button,
gpointer user_data)
{
......@@ -92,13 +96,13 @@ transfert (GtkToggleToolButton *toggle_tool_button,
/**
* Unhold call
*/
static void
static void
unhold( GtkWidget *widget, gpointer data )
{
sflphone_off_hold();
}
void
void
toolbar_update_buttons ()
{
gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE);
......@@ -180,7 +184,7 @@ toolbar_update_buttons ()
}
}
/* Call back when the user click on a call in the list */
static void
static void
selected(GtkTreeSelection *sel, GtkTreeModel *model)
{
GtkTreeIter iter;
......@@ -236,16 +240,32 @@ create_toolbar (){
GtkWidget *ret;
GtkWidget *image;
GtkWidget *item1;
GtkWidget *item2;
GtkWidget *item3;
ret = gtk_toolbar_new();
toolbar = ret;
accounts_list = gtk_menu_new();
item1 = gtk_menu_item_new_with_label("Compte A");
gtk_container_add(GTK_CONTAINER(accounts_list), item1);
gtk_widget_show(item1);
item2 = gtk_menu_item_new();
gtk_container_add(GTK_CONTAINER(accounts_list), item2);
item3 = gtk_menu_item_new();
gtk_container_add(GTK_CONTAINER(accounts_list), item3);
image = gtk_image_new_from_file( ICONS_DIR "/call.svg");
callButton = gtk_tool_button_new (image, "Place a Call");
callButton = gtk_menu_tool_button_new (image, "Place a Call");
gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(callButton), GTK_MENU(accounts_list));
g_signal_connect (G_OBJECT (callButton), "clicked",
G_CALLBACK (call_button), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(callButton), -1);
image = gtk_image_new_from_file( ICONS_DIR "/accept.svg");
pickupButton = gtk_tool_button_new (image, "Pick Up");
gtk_widget_set_state( GTK_WIDGET(pickupButton), GTK_STATE_INSENSITIVE);
......@@ -347,7 +367,7 @@ create_call_tree (){
return ret;
}
void
void
update_call_tree_remove (call_t * c)
{
GtkTreeIter iter;
......@@ -378,7 +398,7 @@ update_call_tree_remove (call_t * c)
toolbar_update_buttons();
}
void
void
update_call_tree (call_t * c)
{
GdkPixbuf *pixbuf;
......@@ -470,7 +490,7 @@ update_call_tree (call_t * c)
}
void
void
update_call_tree_add (call_t * c)
{
GdkPixbuf *pixbuf;
......
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