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.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 094b41b2..a475a964 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -804,15 +804,18 @@ do_reject (const char *args)
804 peer_name = GNUNET_strdup (cl->caller_id); 804 peer_name = GNUNET_strdup (cl->caller_id);
805 GNUNET_free (cl->caller_id); 805 GNUNET_free (cl->caller_id);
806 GNUNET_free (cl); 806 GNUNET_free (cl);
807// caller_num_gen--;
807 break; 808 break;
808 case PS_ACCEPTED: 809 case PS_ACCEPTED:
809 /* expected state, do rejection logic */ 810 /* expected state, do rejection logic */
810 history_add (CH_REJECTED, peer_name); 811 history_add (CH_REJECTED, peer_name);
811 GNUNET_assert (NULL != cl_active); 812 GNUNET_assert (NULL != cl_active);
812 GNUNET_CONVERSATION_caller_hang_up (cl_active->caller); 813 GNUNET_CONVERSATION_caller_hang_up (cl_active->caller);
814 GNUNET_free (cl_active->caller_id);
813 GNUNET_free (cl_active); 815 GNUNET_free (cl_active);
814 816 GNUNET_assert (caller_num_gen > 0);
815// cl_active = NULL; 817// caller_num_gen--;
818 cl_active = NULL;
816 phone_state = PS_LISTEN; 819 phone_state = PS_LISTEN;
817 break; 820 break;
818 } 821 }
@@ -1140,7 +1143,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1140 main_window = 1143 main_window =
1141 GTK_WIDGET (GNUNET_GTK_plug_me 1144 GTK_WIDGET (GNUNET_GTK_plug_me
1142 ("GNUNET_CONVERSATION_GTK_PLUG", GTK_WIDGET (main_window))); 1145 ("GNUNET_CONVERSATION_GTK_PLUG", GTK_WIDGET (main_window)));
1143 gtk_window_set_default_size (main_window, 300, 700); 1146 gtk_window_set_default_size (main_window, 700, 700);
1144 1147
1145 // active calls 1148 // active calls
1146 active_liststore = 1149 active_liststore =
@@ -1431,6 +1434,7 @@ add_contact (const gchar * name, const gchar * address)
1431 static size_t data_size; 1434 static size_t data_size;
1432 struct GNUNET_CRYPTO_EcdsaPublicKey pkey; 1435 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
1433 1436
1437
1434 GNUNET_CRYPTO_ecdsa_public_key_from_string (address, strlen (address), &pkey); 1438 GNUNET_CRYPTO_ecdsa_public_key_from_string (address, strlen (address), &pkey);
1435 rde = &rd; 1439 rde = &rd;
1436 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id); 1440 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id);
@@ -1652,3 +1656,24 @@ GNUNET_contact_test ()
1652 1656
1653 1657
1654} 1658}
1659
1660void
1661test_button_clicked()
1662{
1663 FPRINTF(stderr,"testbt click \n");
1664 GtkTreeIter iter;
1665 char *caller_id = "testje";
1666 int caller_num = 10;
1667
1668 /*
1669 * active_liststore:
1670 * 0: *gchar caller_id
1671 * 1: pointer caller
1672 * 2: gint caller_num
1673 */
1674
1675 gtk_list_store_append (active_liststore, &iter);
1676
1677 gtk_list_store_set (active_liststore, &iter, 2, caller_num, 0, caller_id, -1);
1678
1679}