Skip to content
Snippets Groups Projects
Commit 77397ac5 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Add an arrow beside the call button

parent e356a2da
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,10 @@ 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
*/
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment