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.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 1fe4076c..d5af1bea 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -1308,7 +1308,7 @@ GNUNET_GTK_conversation_quit_cb (GObject * object, gpointer user_data)
1308static void 1308static void
1309run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 1309run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1310{ 1310{
1311 //GtkTreeIter iter; 1311 GtkTreeIter iterContactsInit;
1312 GtkWindow *main_window; 1312 GtkWindow *main_window;
1313 1313
1314 //line = 0; 1314 //line = 0;
@@ -1400,6 +1400,9 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1400 1400
1401 id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); 1401 id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
1402 1402
1403 gtk_tree_model_get_iter_first(zone_treemodel, &iterContactsInit);
1404 gtk_tree_model_iter_next(zone_treemodel, &iterContactsInit);
1405 gtk_combo_box_set_active_iter(GTK_WIDGET (get_object ("gnunet_conversation_gtk_contacts_zone_combobox")), &iterContactsInit);
1403// zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id); 1406// zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id);
1404 1407
1405} 1408}
@@ -1624,10 +1627,22 @@ add_contact (const gchar * name, const gchar * address)
1624 static void *data; 1627 static void *data;
1625 static size_t data_size; 1628 static size_t data_size;
1626 struct GNUNET_CRYPTO_EcdsaPublicKey pkey; 1629 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
1630
1631 struct GNUNET_IDENTITY_Ego *tempEgo;
1632 char *tempName;
1633 GtkTreeIter testIter;
1634 gtk_combo_box_get_active_iter(GTK_WIDGET (get_object ("gnunet_conversation_gtk_contacts_zone_combobox")), &testIter);
1627 1635
1636 gtk_tree_model_get (GTK_TREE_MODEL (zone_liststore),
1637 &testIter,
1638 0, &tempName,
1639 1, &tempEgo,
1640 -1);
1641
1642
1628 GNUNET_CRYPTO_ecdsa_public_key_from_string (address, strlen (address), &pkey); 1643 GNUNET_CRYPTO_ecdsa_public_key_from_string (address, strlen (address), &pkey);
1629 rde = &rd; 1644 rde = &rd;
1630 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (currentAddressBookEgo); 1645 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (tempEgo);
1631 rd.data = &pkey; 1646 rd.data = &pkey;
1632 rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); 1647 rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
1633 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; 1648 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
@@ -1726,10 +1741,11 @@ GNUNET_CONVERSATION_GTK_on_current_clicked (GtkButton * button,
1726 gpointer * user_data) 1741 gpointer * user_data)
1727{ 1742{
1728 GtkEntry *addressEntry; 1743 GtkEntry *addressEntry;
1729 FPRINTF(stderr,"on current clicked %s\n",callerName); 1744// FPRINTF(stderr,"on current clicked %s\n",callerName);
1730 1745 char *strippedAddress;
1731 addressEntry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_addressAdd")); 1746 addressEntry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_addressAdd"));
1732 gtk_entry_set_text(addressEntry, callerName); 1747 currentlySelectedCallAddress[52] = '\0';
1748 gtk_entry_set_text(addressEntry, currentlySelectedCallAddress);
1733 1749
1734} 1750}
1735 1751
@@ -1921,7 +1937,9 @@ print_call_info()
1921 if (caller_selected == cl_caller) 1937 if (caller_selected == cl_caller)
1922 { 1938 {
1923 // LOG (_("info for active call:%s number: %u row: %u"), str_data,int_data,row_count); 1939 // LOG (_("info for active call:%s number: %u row: %u"), str_data,int_data,row_count);
1924 //break ; 1940 currentlySelectedCallAddress = str_data;
1941 FPRINTF(stderr,"cal addr: %s\n",currentlySelectedCallAddress);
1942 break ;
1925 } 1943 }
1926 g_free (str_data); 1944 g_free (str_data);
1927 row_count++; 1945 row_count++;