aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk.c')
-rw-r--r--src/conversation/gnunet-conversation-gtk.c273
1 files changed, 122 insertions, 151 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index c717fa00..f9126097 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -129,6 +129,8 @@ update_status (const gchar * message)
129 gtk_statusbar_push (GTK_STATUSBAR (status_bar), 129 gtk_statusbar_push (GTK_STATUSBAR (status_bar),
130 GPOINTER_TO_INT (status_bar_context), buff); 130 GPOINTER_TO_INT (status_bar_context), buff);
131 g_free (buff); 131 g_free (buff);
132
133 GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed();
132 134
133 135
134} 136}
@@ -153,8 +155,6 @@ set_status_icon (const char *icon_name)
153 GtkWindow *main_window; 155 GtkWindow *main_window;
154 GtkImage *status_icon; 156 GtkImage *status_icon;
155 157
156
157
158 main_window = GTK_WINDOW (get_object ("GNUNET_GTK_conversation_window")); 158 main_window = GTK_WINDOW (get_object ("GNUNET_GTK_conversation_window"));
159 159
160 status_icon = GTK_IMAGE (get_object ("GNUNET_GTK_status_icon")); 160 status_icon = GTK_IMAGE (get_object ("GNUNET_GTK_status_icon"));
@@ -163,8 +163,6 @@ set_status_icon (const char *icon_name)
163 163
164 //LOG (_("Tray icon changed to: `%s' "), icon_name); 164 //LOG (_("Tray icon changed to: `%s' "), icon_name);
165 165
166
167
168 GNUNET_GTK_tray_icon_change (icon_name, "gnunet-conversation-gtk-status"); 166 GNUNET_GTK_tray_icon_change (icon_name, "gnunet-conversation-gtk-status");
169} 167}
170 168
@@ -267,7 +265,7 @@ set_incoming_call_state(struct GNUNET_CONVERSATION_Caller *caller, int state)
267 gint valid = 0; 265 gint valid = 0;
268 //FPRINTF (stderr,"set incoming call state:%u caller: ",state); 266 //FPRINTF (stderr,"set incoming call state:%u caller: ",state);
269 267
270 LOG (_("set incoming call state:%u caller: "),state); 268// LOG (_("set incoming call state:%u caller: "),state);
271 269
272 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter ); 270 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter );
273 271
@@ -304,15 +302,14 @@ set_incoming_call_state(struct GNUNET_CONVERSATION_Caller *caller, int state)
304 switch (state) 302 switch (state)
305 { 303 {
306 case CT_hangup: 304 case CT_hangup:
307 LOG("remove line cause hangup"); 305 //LOG("remove line cause hangup");
308 gtk_list_store_remove(active_liststore,&gtkiter); 306 gtk_list_store_remove(active_liststore,&gtkiter);
309 break; 307 break;
310 308
311 case CT_rejected: 309 case CT_rejected:
312 LOG("remove line cause rejected"); 310 //LOG("remove line cause rejected");
313 gtk_list_store_remove(active_liststore,&gtkiter); 311 gtk_list_store_remove(active_liststore,&gtkiter);
314 break; 312 break;
315
316 default: 313 default:
317 314
318 gtk_list_store_set(active_liststore, &gtkiter, 315 gtk_list_store_set(active_liststore, &gtkiter,
@@ -329,6 +326,8 @@ set_incoming_call_state(struct GNUNET_CONVERSATION_Caller *caller, int state)
329 326
330 }//end while 327 }//end while
331 328
329 //update statsbar
330 update_status("");
332 331
333 332
334} 333}
@@ -386,19 +385,9 @@ phone_event_handler (void *cls, enum GNUNET_CONVERSATION_PhoneEventCode code,
386 ,-1); 385 ,-1);
387 386
388 387
389 //What is this callername thing?
390// strncpy (&callerName, &caller_id, 50);
391// callerName[52] = '\0';
392
393 //TODO:new call notification, should be passed a reference to the call
394 //TODO: rename: quick_message to call_notification(caller);
395// quick_message ("der is een beller", caller_id);
396 // TODO: make sound
397
398 break; 388 break;
399 389
400 case GNUNET_CONVERSATION_EC_PHONE_HUNG_UP: 390 case GNUNET_CONVERSATION_EC_PHONE_HUNG_UP:
401 //FPRINTF(stderr,"GNUNET_CONVERSATION_EC_PHONE_HUNG_UP:");
402 //gtk 391 //gtk
403 392
404 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter1 ); 393 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter1 );
@@ -408,8 +397,7 @@ phone_event_handler (void *cls, enum GNUNET_CONVERSATION_PhoneEventCode code,
408 397
409 while (valid) 398 while (valid)
410 { 399 {
411 /* Walk through the list, reading each row */ 400 //FPRINTF(stderr,"GNUNET_CONVERSATION_EC_PHONE_HUNG_UP: while valid");
412 //FPRINTF(stderr,"GNUNET_CONVERSATION_EC_PHONE_HUNG_UP: while valid");
413 401
414 gchar *str_data; 402 gchar *str_data;
415 gint int_data; 403 gint int_data;
@@ -432,42 +420,10 @@ phone_event_handler (void *cls, enum GNUNET_CONVERSATION_PhoneEventCode code,
432 420
433 421
434 422
435 //gcl_active = NULL;
436 phone_state = PS_LISTEN; 423 phone_state = PS_LISTEN;
437 //add to call history list 424 //add to call history list
438 //history_add(CH_HANGUP, cl->caller_id); 425 //history_add(CH_HANGUP, cl->caller_id);
439 426
440
441 ///END gtk
442
443 //old
444 /*
445 for (cl = cl_head; NULL != cl; cl = cl->next)
446 if (caller == cl->caller)
447 break;
448
449 if (NULL == cl)
450 {
451 GNUNET_break (0);
452 return;
453 }
454
455 LOG (_("Call from `%s' terminated\n"), cl->caller_id);
456
457
458 GNUNET_CONTAINER_DLL_remove (cl_head, cl_tail, cl);
459 GNUNET_free (cl->caller_id);
460
461 //
462 if (cl == cl_active)
463 {
464 cl_active = NULL;
465 phone_state = PS_LISTEN;
466 }
467 GNUNET_free (cl);
468 */
469 //destroy call accept dialog
470 //gtk_widget_destroy (GTK_WIDGET (dialog));
471 break; 427 break;
472 428
473 } 429 }
@@ -488,12 +444,10 @@ caller_event_handler (void *cls, enum GNUNET_CONVERSATION_CallerEventCode code)
488 switch (code) 444 switch (code)
489 { 445 {
490 case GNUNET_CONVERSATION_EC_CALLER_SUSPEND: 446 case GNUNET_CONVERSATION_EC_CALLER_SUSPEND:
491 update_state ();
492 set_incoming_call_state(cls,CT_suspended); 447 set_incoming_call_state(cls,CT_suspended);
493 LOG (_("Call from `%s' suspended by other user\n"), cl->caller_id); 448 LOG (_("Call from `%s' suspended by other user\n"), cl->caller_id);
494 break; 449 break;
495 case GNUNET_CONVERSATION_EC_CALLER_RESUME: 450 case GNUNET_CONVERSATION_EC_CALLER_RESUME:
496 update_state ();
497 set_incoming_call_state(cls,CT_active); 451 set_incoming_call_state(cls,CT_active);
498 LOG (_("Call from `%s' resumed by other user\n"), cl->caller_id); 452 LOG (_("Call from `%s' resumed by other user\n"), cl->caller_id);
499 break; 453 break;
@@ -791,7 +745,7 @@ do_status ()
791 if (cl == cl_active) 745 if (cl == cl_active)
792 continue; 746 continue;
793 //UPDATE_STATUS (_("#%u: `%s'"), cl->caller_num, cl->caller_id); 747 //UPDATE_STATUS (_("#%u: `%s'"), cl->caller_num, cl->caller_id);
794 LOG ("%s", _("Calls waiting:")); 748// LOG ("%s", _("Calls waiting:"));
795 } 749 }
796 } 750 }
797} 751}
@@ -857,7 +811,7 @@ do_resume (struct GNUNET_CONVERSATION_Caller *sel_caller)
857{ 811{
858 struct CallList *cl; 812 struct CallList *cl;
859 char buf[32]; 813 char buf[32];
860 814/*
861 if (NULL != call) 815 if (NULL != call)
862 { 816 {
863 switch (call_state) 817 switch (call_state)
@@ -873,6 +827,7 @@ do_resume (struct GNUNET_CONVERSATION_Caller *sel_caller)
873 return; 827 return;
874 } 828 }
875 } 829 }
830*/
876 switch (phone_state) 831 switch (phone_state)
877 { 832 {
878 case PS_LOOKUP_EGO: 833 case PS_LOOKUP_EGO:
@@ -880,14 +835,13 @@ do_resume (struct GNUNET_CONVERSATION_Caller *sel_caller)
880 LOG ("%s", _("There is no call that could be resumed right now.")); 835 LOG ("%s", _("There is no call that could be resumed right now."));
881 return; 836 return;
882 case PS_LISTEN: 837 case PS_LISTEN:
883 /* expected state, do resume logic */
884 break; 838 break;
885 case PS_ACCEPTED: 839 case PS_ACCEPTED:
886 LOG (_("Already talking with `%s', cannot resume a call right now."), 840 LOG (_("Already talking with `%s', cannot resume a call right now."),
887 peer_name); 841 peer_name);
888 return; 842 return;
889 } 843 }
890 844 /*
891 GNUNET_assert (NULL == cl_active); 845 GNUNET_assert (NULL == cl_active);
892 cl = cl_head; 846 cl = cl_head;
893 if (NULL == cl) 847 if (NULL == cl)
@@ -908,10 +862,10 @@ do_resume (struct GNUNET_CONVERSATION_Caller *sel_caller)
908 return; 862 return;
909 } 863 }
910 cl_active = cl; 864 cl_active = cl;
865 */
911 866
912 set_incoming_call_state(sel_caller,CT_active);
913
914 GNUNET_CONVERSATION_caller_resume (sel_caller, speaker, mic); 867 GNUNET_CONVERSATION_caller_resume (sel_caller, speaker, mic);
868 set_incoming_call_state(sel_caller,CT_active);
915 phone_state = PS_ACCEPTED; 869 phone_state = PS_ACCEPTED;
916} 870}
917 871
@@ -926,15 +880,15 @@ do_reject (struct GNUNET_CONVERSATION_Caller *sel_caller)
926{ 880{
927 struct CallList *cl; 881 struct CallList *cl;
928 char buf[32]; 882 char buf[32];
929 LOG("do reject");
930// set_incoming_call_state(sel_caller,CT_rejected);
931 883
884 /*
932 if (NULL != call) 885 if (NULL != call)
933 { 886 {
934 GNUNET_CONVERSATION_call_stop (call); 887 GNUNET_CONVERSATION_call_stop (call);
935 call = NULL; 888 call = NULL;
936 return; 889 return;
937 } 890 }
891 */
938 switch (phone_state) 892 switch (phone_state)
939 { 893 {
940 case PS_LOOKUP_EGO: 894 case PS_LOOKUP_EGO:
@@ -990,7 +944,7 @@ do_reject (struct GNUNET_CONVERSATION_Caller *sel_caller)
990 */ 944 */
991 set_incoming_call_state(sel_caller,CT_hangup); 945 set_incoming_call_state(sel_caller,CT_hangup);
992 GNUNET_CONVERSATION_caller_hang_up(sel_caller); 946 GNUNET_CONVERSATION_caller_hang_up(sel_caller);
993 cl_active = NULL; 947 //cl_active = NULL;
994 phone_state = PS_LISTEN; 948 phone_state = PS_LISTEN;
995 break; 949 break;
996 } 950 }
@@ -1441,86 +1395,18 @@ main (int argc, char *const *argv)
1441// FPRINTF (stderr, "line %i", line); 1395// FPRINTF (stderr, "line %i", line);
1442} 1396}
1443 1397
1444/* gui stuff start */
1445/*
1446 * Accept call window
1447 * TODO: rename this
1448 *
1449 * @param message message in the dialogbox
1450 * @param caller_id
1451 */
1452
1453/*
1454void
1455quick_message (gchar * message, const char *caller_id)
1456{
1457 GtkWidget *caller_name, *notification, *content_area;
1458 GtkWidget *dialog;
1459 GtkWindow *main_window;
1460
1461 main_window = GTK_WINDOW (get_object ("GNUNET_GTK_conversation_window"));
1462 // Create the widgets
1463
1464
1465 dialog =
1466 gtk_dialog_new_with_buttons ("Incoming call!", main_window,
1467 GTK_DIALOG_DESTROY_WITH_PARENT,
1468 _("Accept call"), GTK_RESPONSE_ACCEPT,
1469 _("Reject call"), GTK_RESPONSE_REJECT,
1470 _("Decide later"), GTK_RESPONSE_CANCEL,
1471 NULL);
1472 content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
1473
1474
1475 notification = gtk_label_new ("Incoming call from:");
1476 caller_name = gtk_label_new (caller_id);
1477
1478 // Add the labels, and show everything we've added to the dialog
1479 gtk_container_add (GTK_CONTAINER (content_area), notification);
1480 gtk_container_add (GTK_CONTAINER (content_area), caller_name);
1481 gtk_widget_show_all (GTK_WIDGET (dialog));
1482
1483 switch (gtk_dialog_run (GTK_DIALOG (dialog)))
1484 {
1485 case GTK_RESPONSE_ACCEPT:
1486 do_status ("");
1487 gtk_widget_destroy (GTK_WIDGET (dialog));
1488// do_accept ("0");
1489 break;
1490 case GTK_RESPONSE_REJECT:
1491// do_reject (caller_selected);
1492 do_status ("");
1493 gtk_widget_destroy (GTK_WIDGET (dialog));
1494 break;
1495 case GTK_RESPONSE_CANCEL:
1496 do_status ("");
1497 gtk_widget_destroy (GTK_WIDGET (dialog));
1498 break;
1499 }
1500
1501
1502}
1503*/
1504
1505
1506
1507/** 1398/**
1508 * call clicked 1399 * call clicked
1509 */ 1400 */
1510void 1401void
1511GNUNET_CONVERSATION_GTK_on_call_clicked () 1402GNUNET_CONVERSATION_GTK_on_call_clicked ()
1512{ 1403{
1513// char *to_addr = malloc((MAX_TO_ADDR+1)*sizeof(char));
1514 char *to_addr; 1404 char *to_addr;
1515 GtkEntry *address_entry; 1405 GtkEntry *address_entry;
1516 1406
1517 address_entry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_address")); 1407 address_entry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_address"));
1518 to_addr = gtk_entry_get_text (address_entry); 1408 to_addr = gtk_entry_get_text (address_entry);
1519 1409
1520// strncpy(to_addr, gtk_entry_get_text (address_entry), MAX_TO_ADDR);
1521// to_addr[strlen(to_addr)+1] = '\0';
1522// FPRINTF (stderr, _("calling: %s \n"), to_addr );
1523
1524 do_call (to_addr); 1410 do_call (to_addr);
1525 //disable_button ("GNUNET_GTK_conversation_accept_button"); 1411 //disable_button ("GNUNET_GTK_conversation_accept_button");
1526 do_status (); 1412 do_status ();
@@ -1566,7 +1452,6 @@ GNUNET_CONVERSATION_GTK_on_accept_clicked ()
1566void 1452void
1567GNUNET_CONVERSATION_GTK_on_reject_clicked () 1453GNUNET_CONVERSATION_GTK_on_reject_clicked ()
1568{ 1454{
1569 LOG ("reject clicked \n");
1570 do_reject (caller_selected); 1455 do_reject (caller_selected);
1571} 1456}
1572 1457
@@ -1576,14 +1461,7 @@ GNUNET_CONVERSATION_GTK_on_reject_clicked ()
1576void 1461void
1577GNUNET_CONVERSATION_GTK_on_pause_clicked () 1462GNUNET_CONVERSATION_GTK_on_pause_clicked ()
1578{ 1463{
1579// GtkEntry *entry;
1580 do_suspend (caller_selected); 1464 do_suspend (caller_selected);
1581 //FPRINTF (stderr, "pause clicked \n");
1582 //do_pause("");
1583 // entry = GTK_ENTRY((get_object ("GNUNET_GTK_conversation_address")));
1584 //FPRINTF (stderr, gtk_entry_get_text (entry));
1585// gtk_entry_set_text (entry, "testtextje");
1586// show_infobar ();
1587} 1465}
1588 1466
1589/** 1467/**
@@ -1592,7 +1470,6 @@ GNUNET_CONVERSATION_GTK_on_pause_clicked ()
1592void 1470void
1593GNUNET_CONVERSATION_GTK_on_resume_clicked () 1471GNUNET_CONVERSATION_GTK_on_resume_clicked ()
1594{ 1472{
1595 //FPRINTF (stderr, "reject clicked \n");
1596 do_resume (caller_selected); 1473 do_resume (caller_selected);
1597} 1474}
1598 1475
@@ -1602,11 +1479,7 @@ GNUNET_CONVERSATION_GTK_on_resume_clicked ()
1602void 1479void
1603GNUNET_CONVERSATION_GTK_on_status_clicked () 1480GNUNET_CONVERSATION_GTK_on_status_clicked ()
1604{ 1481{
1605
1606
1607// do_accept("0");
1608 do_status (); 1482 do_status ();
1609 //quick_message('hee blaaat you have a call from blaat');
1610} 1483}
1611 1484
1612 1485
@@ -1881,7 +1754,7 @@ gnunet_conversation_gtk_contacts_zone_combobox_changed_cb (GtkComboBox *widget,
1881 0, &tempName, 1754 0, &tempName,
1882 1, &tempEgo, 1755 1, &tempEgo,
1883 -1); 1756 -1);
1884 FPRINTF(stderr,"blat: %s\n", tempName); 1757// FPRINTF(stderr,"blat: %s\n", tempName);
1885 temp_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (tempEgo); 1758 temp_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (tempEgo);
1886 gtk_list_store_clear(contacts_liststore); 1759 gtk_list_store_clear(contacts_liststore);
1887/* 1760/*
@@ -1945,7 +1818,6 @@ print_call_info()
1945 gboolean valid; 1818 gboolean valid;
1946 gint row_count = 0; 1819 gint row_count = 0;
1947 1820
1948 //LOG("test");
1949 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter ); 1821 valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( active_liststore ), &gtkiter );
1950 1822
1951 if (!valid) 1823 if (!valid)
@@ -1965,7 +1837,7 @@ print_call_info()
1965 { 1837 {
1966 // LOG (_("info for active call:%s number: %u row: %u"), str_data,int_data,row_count); 1838 // LOG (_("info for active call:%s number: %u row: %u"), str_data,int_data,row_count);
1967 currentlySelectedCallAddress = str_data; 1839 currentlySelectedCallAddress = str_data;
1968 FPRINTF(stderr,"cal addr: %s\n",currentlySelectedCallAddress); 1840// FPRINTF(stderr,"cal addr: %s\n",currentlySelectedCallAddress);
1969 break ; 1841 break ;
1970 } 1842 }
1971 g_free (str_data); 1843 g_free (str_data);
@@ -1978,14 +1850,25 @@ print_call_info()
1978} 1850}
1979 1851
1980/* 1852/*
1981 * @brief executed when selecting a call 1853 * @brief executed when selecting a different item in active call list
1982 */ 1854 */
1983 1855
1984void 1856void
1985GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed() 1857GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed()
1986{ 1858{
1859 update_active_call_list_buttons();
1860}
1861
1862/*
1863 * @brief sets caller_selected, and enables or disables the active call list buttons
1864 */
1865void
1866update_active_call_list_buttons()
1867{
1987 gchar *caller_id; 1868 gchar *caller_id;
1988 gpointer cl_caller; 1869 gpointer cl_caller;
1870 gint cl_caller_state;
1871 gint cl_caller_type;
1989 GtkTreeSelection *active_selection; 1872 GtkTreeSelection *active_selection;
1990 GtkTreeIter gcl_selected; 1873 GtkTreeIter gcl_selected;
1991// active_liststore_selection = get_object("GNUNET_CONVERSATION_GTK_active_calls_selection"); 1874// active_liststore_selection = get_object("GNUNET_CONVERSATION_GTK_active_calls_selection");
@@ -1999,15 +1882,103 @@ GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed()
1999 gtk_tree_model_get (GTK_TREE_MODEL(active_liststore), &gcl_selected, 1882 gtk_tree_model_get (GTK_TREE_MODEL(active_liststore), &gcl_selected,
2000 AL_caller, &cl_caller, 1883 AL_caller, &cl_caller,
2001 AL_caller_id, &caller_id, 1884 AL_caller_id, &caller_id,
1885 AL_caller_state, &cl_caller_state,
2002 -1); 1886 -1);
2003 1887
2004 caller_selected = cl_caller; 1888 caller_selected = cl_caller;
2005 1889
2006 //LOG("SELECTION: %s ",caller_id); 1890 gtk_widget_show(get_object("GNUNET_GTK_conversation_active_call_list_buttons" ));
2007 print_call_info(); 1891
1892
1893 // make global?
1894 GtkWidget *b_contact, *b_accept, *b_hangup, *b_suspend, *b_resume;
1895 b_contact = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_use_current_button"));
1896 b_accept = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_accept_button"));
1897 b_hangup = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_hangup_button"));
1898 b_suspend = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_suspend_button"));
1899 b_resume = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_resume_button"));
1900
1901
1902 switch (cl_caller_state)
1903 {
1904 /* buttons:
1905 * contact
1906 * accept
1907 * hangup
1908 * suspend
1909 * resume
1910 *
1911 * TODO: check if there is incoming or outgoing call,
1912 * disable resume and accept buttons.
1913 * or suspend that other call
1914 */
1915
1916 case CT_active:
1917 // hangup, pause
1918 //LOG("CT_active state: %u ",cl_caller_state);
1919 gtk_widget_set_sensitive(b_contact, 1);
1920 gtk_widget_set_sensitive(b_accept, 0);
1921 gtk_widget_set_sensitive(b_hangup, 1);
1922 gtk_widget_set_sensitive(b_suspend, 1);
1923 gtk_widget_set_sensitive(b_resume, 0);
1924 break;
1925 case CT_ringing:
1926 // pickup, phonebook
1927 //LOG("CT_ring show button");
1928 gtk_widget_set_sensitive(b_contact, 1);
1929 if (phone_state == PS_LISTEN)
1930 {
1931 gtk_widget_set_sensitive(b_accept, 1);
1932 }else{
1933 gtk_widget_set_sensitive(b_accept, 0);
1934 }
2008 1935
1936
1937 gtk_widget_set_sensitive(b_hangup, 0);
1938 gtk_widget_set_sensitive(b_suspend, 0);
1939 gtk_widget_set_sensitive(b_resume, 0);
1940 break;
1941 case CT_rejected:
1942 //add to phonebook
1943 //LOG("CT_rejected ");
1944 gtk_widget_set_sensitive(b_contact, 1);
1945 gtk_widget_set_sensitive(b_accept, 0);
1946 gtk_widget_set_sensitive(b_hangup, 0);
1947 gtk_widget_set_sensitive(b_suspend, 0);
1948 gtk_widget_set_sensitive(b_resume, 0);
1949
1950 break;
1951 case CT_suspended:
1952 // resume, hangup
1953 //LOG("CT_suspended ");
1954 gtk_widget_set_sensitive(b_contact, 1 );
1955 gtk_widget_set_sensitive(b_accept, 0);
1956 gtk_widget_set_sensitive(b_hangup, 1);
1957 gtk_widget_set_sensitive(b_suspend, 0);
1958 //gtk_widget_set_sensitive(b_resume, 1);
1959 if (phone_state == PS_LISTEN)
1960 {
1961 gtk_widget_set_sensitive(b_resume, 1);
1962 }else{
1963 gtk_widget_set_sensitive(b_resume, 0);
1964 }
1965 break;
1966 default:
1967 GNUNET_break(0);
1968 break;
1969 }
1970 print_call_info();
2009 } 1971 }
2010} 1972 else
1973 {
1974
1975 LOG("nothing selected");
1976
1977 gtk_widget_hide(get_object("GNUNET_GTK_conversation_active_call_list_buttons" ));
1978
1979 }
1980
1981} //end function
2011/* 1982/*
2012 * @brief active call list type data function 1983 * @brief active call list type data function
2013 */ 1984 */