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.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 4ae137d5..d3e1954f 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -74,22 +74,6 @@ static int tray_only;
74 * phone * 74 * phone *
75 *************/ 75 *************/
76 76
77/**
78 * Current state of iterating elements for the client.
79 * NULL if we are not currently iterating.
80 */
81static struct GNUNET_CONTAINER_MultiHashMapIterator *iter;
82
83/**
84 *name of the incomming caller pkey or record name if known
85 */
86static char *callerName;
87
88/**
89 * peer id of a contact
90 */
91static char *peer_id;
92
93/** 77/**
94 * List of active calls 78 * List of active calls
95 */ 79 */
@@ -103,7 +87,7 @@ static GtkTreeView *active_treeview;
103/** 87/**
104 * List of incoming calls 88 * List of incoming calls
105 */ 89 */
106static struct CallList 90struct CallList
107{ 91{
108 92
109 /** 93 /**
@@ -242,6 +226,11 @@ static GtkListStore *zone_liststore;
242 */ 226 */
243static struct GNUNET_IDENTITY_Ego *caller_id; 227static struct GNUNET_IDENTITY_Ego *caller_id;
244 228
229
230void GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed ();
231
232void set_status_icon (const char *icon_name);
233
245/************ 234/************
246 * extern's * 235 * extern's *
247 * **********/ 236 * **********/
@@ -713,6 +702,7 @@ enable_button (const char *button_name)
713/** 702/**
714 * set state of outgoing call 703 * set state of outgoing call
715 */ 704 */
705void
716set_outgoing_call_state(struct GNUNET_CONVERSATION_Call *call, int state) 706set_outgoing_call_state(struct GNUNET_CONVERSATION_Call *call, int state)
717{ 707{
718 LOG("set state to: %u", state); 708 LOG("set state to: %u", state);
@@ -1276,8 +1266,14 @@ do_accept (struct GNUNET_CONVERSATION_Caller *sel_caller)
1276 phone_state = PS_ACCEPTED; 1266 phone_state = PS_ACCEPTED;
1277 set_incoming_call_state(sel_caller,CT_active); 1267 set_incoming_call_state(sel_caller,CT_active);
1278 1268
1279 1269 for (cl = cl_head; cl; cl = cl->next)
1280 cl = sel_caller; 1270 {
1271 /* FIXME: this may not be unique enough to identify the right item!
1272 * Why not store CallList items in treeview instead of just callers?
1273 */
1274 if (cl->caller == sel_caller)
1275 break;
1276 }
1281 GNUNET_CONVERSATION_caller_pick_up (sel_caller, &caller_event_handler, cl, 1277 GNUNET_CONVERSATION_caller_pick_up (sel_caller, &caller_event_handler, cl,
1282 speaker, mic); 1278 speaker, mic);
1283 1279
@@ -1463,13 +1459,13 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx,
1463{ 1459{
1464 1460
1465 struct GNUNET_CRYPTO_EcdsaPublicKey pk; 1461 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
1466 char *s; 1462
1467 GtkTreeIter iter; 1463 GtkTreeIter iter;
1468 1464
1469 if (NULL != ego) 1465 if (NULL != ego)
1470 { 1466 {
1471 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 1467 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
1472 s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); 1468
1473 fprintf (stderr, "main identity_cb: %s \n", name); 1469 fprintf (stderr, "main identity_cb: %s \n", name);
1474 1470
1475 1471
@@ -1519,6 +1515,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx,
1519const struct GNUNET_CONFIGURATION_Handle * 1515const struct GNUNET_CONFIGURATION_Handle *
1520GIG_get_configuration () 1516GIG_get_configuration ()
1521{ 1517{
1518 /* FIXME: Configuration handle returned is const, but we DO alter the config */
1522 return GNUNET_GTK_main_loop_get_configuration (ml); 1519 return GNUNET_GTK_main_loop_get_configuration (ml);
1523} 1520}
1524 1521
@@ -1674,8 +1671,8 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1674 1671
1675 cfg = GIG_get_configuration (); 1672 cfg = GIG_get_configuration ();
1676 1673
1677 speaker = GNUNET_SPEAKER_create_from_hardware (GIG_get_configuration ()); 1674 speaker = GNUNET_SPEAKER_create_from_hardware (cfg);
1678 mic = GNUNET_MICROPHONE_create_from_hardware (GIG_get_configuration ()); 1675 mic = GNUNET_MICROPHONE_create_from_hardware (cfg);
1679 1676
1680 b_contact = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_use_current_button")); 1677 b_contact = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_use_current_button"));
1681 b_accept = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_accept_button")); 1678 b_accept = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_accept_button"));