diff options
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk.c')
-rw-r--r-- | src/conversation/gnunet-conversation-gtk.c | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c index fd19f33d..4dbc8ba0 100644 --- a/src/conversation/gnunet-conversation-gtk.c +++ b/src/conversation/gnunet-conversation-gtk.c | |||
@@ -481,7 +481,7 @@ do_call (const char *arg) | |||
481 | call_state = CS_RESOLVING; | 481 | call_state = CS_RESOLVING; |
482 | GNUNET_assert (NULL == call); | 482 | GNUNET_assert (NULL == call); |
483 | call = | 483 | call = |
484 | GNUNET_CONVERSATION_call_start (cfg, caller_id, arg, speaker, mic, | 484 | GNUNET_CONVERSATION_call_start (cfg, caller_id, arg, speaker, mic, |
485 | &call_event_handler, NULL); | 485 | &call_event_handler, NULL); |
486 | UPDATE_STATUS (_("We are calling `%s', his phone should be ringing."), | 486 | UPDATE_STATUS (_("We are calling `%s', his phone should be ringing."), |
487 | peer_name); | 487 | peer_name); |
@@ -841,7 +841,7 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | |||
841 | const char *ets; | 841 | const char *ets; |
842 | struct GNUNET_TIME_Absolute at; | 842 | struct GNUNET_TIME_Absolute at; |
843 | struct GNUNET_TIME_Relative rt; | 843 | struct GNUNET_TIME_Relative rt; |
844 | GtkTreeIter iter; | 844 | GtkTreeIter display_iter; |
845 | 845 | ||
846 | if (NULL == rname) | 846 | if (NULL == rname) |
847 | { | 847 | { |
@@ -893,8 +893,8 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | |||
893 | // FPRINTF (stdout, "%s", rname); | 893 | // FPRINTF (stdout, "%s", rname); |
894 | if (rd[i].record_type == 65536 || rd[i].record_type == 65542) | 894 | if (rd[i].record_type == 65536 || rd[i].record_type == 65542) |
895 | { | 895 | { |
896 | gtk_list_store_append (contacts_liststore, &iter); | 896 | gtk_list_store_append (contacts_liststore, &display_iter); |
897 | gtk_list_store_set (contacts_liststore, &iter, 1, type, 0, rname, -1); | 897 | gtk_list_store_set (contacts_liststore, &display_iter, 1, type, 0, rname, -1); |
898 | } | 898 | } |
899 | 899 | ||
900 | /* FPRINTF (stdout, | 900 | /* FPRINTF (stdout, |
@@ -983,7 +983,8 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, | |||
983 | { | 983 | { |
984 | struct GNUNET_CRYPTO_EcdsaPublicKey pk; | 984 | struct GNUNET_CRYPTO_EcdsaPublicKey pk; |
985 | char *s; | 985 | char *s; |
986 | 986 | // GtkTreeIter iter; | |
987 | |||
987 | if (NULL != ego) | 988 | if (NULL != ego) |
988 | { | 989 | { |
989 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 990 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
@@ -992,9 +993,11 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, | |||
992 | gtk_list_store_insert_with_values (zone_liststore, | 993 | gtk_list_store_insert_with_values (zone_liststore, |
993 | &iter, -1, | 994 | &iter, -1, |
994 | 0, name, | 995 | 0, name, |
996 | 1, ego, | ||
995 | -1); | 997 | -1); |
996 | } | 998 | } |
997 | 999 | ||
1000 | |||
998 | if (NULL == name) | 1001 | if (NULL == name) |
999 | return; | 1002 | return; |
1000 | if (ego == caller_id) | 1003 | if (ego == caller_id) |
@@ -1168,10 +1171,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1168 | ("gnunet_conversation_gtk_contacts_liststore")); | 1171 | ("gnunet_conversation_gtk_contacts_liststore")); |
1169 | contacts_treeview = | 1172 | contacts_treeview = |
1170 | GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_treeview")); | 1173 | GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_treeview")); |
1171 | contacts_treestore = | 1174 | contacts_treemodel = GTK_TREE_MODEL (contacts_liststore); |
1172 | GTK_TREE_STORE (get_object | ||
1173 | ("gnunet_conversation_gtk_contacts_treestore")); | ||
1174 | contacts_treemodel = GTK_TREE_MODEL (contacts_treestore); | ||
1175 | 1175 | ||
1176 | // call history | 1176 | // call history |
1177 | history_liststore = | 1177 | history_liststore = |
@@ -1184,11 +1184,11 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1184 | 1184 | ||
1185 | // zone list | 1185 | // zone list |
1186 | zone_liststore = | 1186 | zone_liststore = |
1187 | GTK_LIST_STORE (get_object ("gnunet_conversation_gtk_zone_liststore")); | 1187 | GTK_LIST_STORE (get_object ("gnunet_conversation_gtk_contacts_zone_liststore")); |
1188 | zone_treeview = | 1188 | //zone_treeview = |
1189 | GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_zone_treeview")); | 1189 | // GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_zone_treeview")); |
1190 | zone_treestore = | 1190 | zone_treestore = |
1191 | GTK_TREE_STORE (get_object ("gnunet_conversation_gtk_zone_treestore")); | 1191 | GTK_TREE_STORE (get_object ("gnunet_conversation_gtk_contacts_zone_treestore")); |
1192 | zone_treemodel = GTK_TREE_MODEL (zone_treestore); | 1192 | zone_treemodel = GTK_TREE_MODEL (zone_treestore); |
1193 | 1193 | ||
1194 | //gtk_tree_view_set_activate_on_single_click(contacts_treeview, TRUE); | 1194 | //gtk_tree_view_set_activate_on_single_click(contacts_treeview, TRUE); |
@@ -1697,8 +1697,8 @@ GNUNET_contact_test () | |||
1697 | // GNUNET_IDENTITY_disconnect (id); | 1697 | // GNUNET_IDENTITY_disconnect (id); |
1698 | // &print_ego; | 1698 | // &print_ego; |
1699 | //sh = GNUNET_IDENTITY_connect (cfg, &print_ego, NULL); | 1699 | //sh = GNUNET_IDENTITY_connect (cfg, &print_ego, NULL); |
1700 | 1700 | // GNUNET_NAMESTORE_zone_iterator_next(list_it); | |
1701 | } | 1701 | } |
1702 | 1702 | ||
1703 | /** | 1703 | /** |
1704 | * A different zone was selected in the zone toggle bar. Load the | 1704 | * A different zone was selected in the zone toggle bar. Load the |
@@ -1708,27 +1708,32 @@ GNUNET_contact_test () | |||
1708 | * @param user_data builder, unused | 1708 | * @param user_data builder, unused |
1709 | */ | 1709 | */ |
1710 | void | 1710 | void |
1711 | gnunet_conversation_gtk_zone_combobox_changed_cb (GtkComboBox *widget, | 1711 | gnunet_conversation_gtk_contacts_zone_combobox_changed_cb (GtkComboBox *widget, |
1712 | gpointer user_data) | 1712 | gpointer user_data) |
1713 | { | 1713 | { |
1714 | GtkTreeIter iter; | 1714 | GtkTreeIter contacts_zone_iter; |
1715 | struct GNUNET_IDENTITY_Ego *ego; | 1715 | struct GNUNET_IDENTITY_Ego *tempEgo; |
1716 | // char *name; | 1716 | char *tempName; |
1717 | 1717 | struct GNUNET_CRYPTO_EcdsaPrivateKey temp_zone_pkey; | |
1718 | // if (! gtk_combo_box_get_active_iter (widget, | 1718 | |
1719 | // &iter)) | 1719 | |
1720 | // { | 1720 | gtk_combo_box_get_active_iter(widget, &contacts_zone_iter); |
1721 | // load_zone (NULL, NULL); | 1721 | |
1722 | // return; | 1722 | gtk_tree_model_get (GTK_TREE_MODEL (zone_liststore), |
1723 | // } | 1723 | &contacts_zone_iter, |
1724 | gtk_tree_model_get (zone_liststore, | 1724 | 0, &tempName, |
1725 | &iter, | 1725 | 1, &tempEgo, |
1726 | 0, name, | ||
1727 | -1); | 1726 | -1); |
1728 | GNUNET_IDENTITY_disconnect (id); | 1727 | FPRINTF(stderr,"blat: %s\n", tempName); |
1729 | // ego_name = name; | 1728 | temp_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (tempEgo); |
1730 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); | 1729 | gtk_list_store_clear(contacts_liststore); |
1731 | // load_zone (name, ego); | 1730 | |
1731 | list_it = | ||
1732 | GNUNET_NAMESTORE_zone_iteration_start (ns, &temp_zone_pkey, &display_record, | ||
1733 | NULL); | ||
1734 | |||
1735 | // GNUNET_IDENTITY_disconnect (id); | ||
1736 | |||
1732 | } | 1737 | } |
1733 | 1738 | ||
1734 | 1739 | ||