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.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index c20a77e4..0d1120fb 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -39,7 +39,7 @@
39 39
40 40
41 41
42/* 42/**
43 * macro's 43 * macro's
44 */ 44 */
45 45
@@ -62,7 +62,7 @@ get_object (const char *name)
62 return GNUNET_GTK_main_loop_get_object (ml, name); 62 return GNUNET_GTK_main_loop_get_object (ml, name);
63} 63}
64 64
65/* 65/**
66 * log a message to gtk log textbuffer 66 * log a message to gtk log textbuffer
67 * @param Message to be logged 67 * @param Message to be logged
68 */ 68 */
@@ -92,7 +92,7 @@ log_message (const char *message)
92 92
93} 93}
94 94
95/* 95/**
96 * does nothing 96 * does nothing
97 */ 97 */
98 98
@@ -102,7 +102,7 @@ update_state ()
102// LOG('update_state called',NULL); 102// LOG('update_state called',NULL);
103} 103}
104 104
105/* 105/**
106 * update status 106 * update status
107 * 107 *
108 * @param message Message to put in statusbar 108 * @param message Message to put in statusbar
@@ -1095,7 +1095,6 @@ GNUNET_GTK_conversation_quit_cb (GObject * object, gpointer user_data)
1095 speaker = NULL; 1095 speaker = NULL;
1096 GNUNET_MICROPHONE_destroy (mic); 1096 GNUNET_MICROPHONE_destroy (mic);
1097 mic = NULL; 1097 mic = NULL;
1098 GNUNET_free (ego_name);
1099 ego_name = NULL; 1098 ego_name = NULL;
1100 GNUNET_free_non_null (peer_name); 1099 GNUNET_free_non_null (peer_name);
1101 phone_state = PS_ERROR; 1100 phone_state = PS_ERROR;
@@ -1135,6 +1134,15 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1135 GTK_WIDGET (GNUNET_GTK_plug_me 1134 GTK_WIDGET (GNUNET_GTK_plug_me
1136 ("GNUNET_CONVERSATION_GTK_PLUG", GTK_WIDGET (main_window))); 1135 ("GNUNET_CONVERSATION_GTK_PLUG", GTK_WIDGET (main_window)));
1137 gtk_window_set_default_size (main_window, 300, 700); 1136 gtk_window_set_default_size (main_window, 300, 700);
1137
1138 // active calls
1139 active_liststore =
1140 GTK_LIST_STORE (get_object ("gnunet_conversation_gtk_active_calls_liststore"));
1141 active_treeview =
1142 GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_active_calls_treeview"));
1143
1144
1145 // contacts
1138 contacts_liststore = 1146 contacts_liststore =
1139 GTK_LIST_STORE (get_object 1147 GTK_LIST_STORE (get_object
1140 ("gnunet_conversation_gtk_contacts_liststore")); 1148 ("gnunet_conversation_gtk_contacts_liststore"));
@@ -1145,6 +1153,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1145 ("gnunet_conversation_gtk_contacts_treestore")); 1153 ("gnunet_conversation_gtk_contacts_treestore"));
1146 contacts_treemodel = GTK_TREE_MODEL (contacts_treestore); 1154 contacts_treemodel = GTK_TREE_MODEL (contacts_treestore);
1147 1155
1156 // call history
1148 history_liststore = 1157 history_liststore =
1149 GTK_LIST_STORE (get_object ("gnunet_conversation_gtk_history_liststore")); 1158 GTK_LIST_STORE (get_object ("gnunet_conversation_gtk_history_liststore"));
1150 history_treeview = 1159 history_treeview =
@@ -1661,8 +1670,11 @@ set_status_icon (const char *icon_name)
1661 1670
1662 gtk_image_set_from_icon_name (status_icon, icon_name, GTK_ICON_SIZE_BUTTON); 1671 gtk_image_set_from_icon_name (status_icon, icon_name, GTK_ICON_SIZE_BUTTON);
1663 1672
1664 GNUNET_GTK_tray_icon_change (ml, GTK_WINDOW (main_window), icon_name, 1673 LOG (_("Tray icon changed to: `%s' "), icon_name);
1665 "gnunet-conversation-gtk-status"); 1674
1675
1676
1677 GNUNET_GTK_tray_icon_change (icon_name, "gnunet-conversation-gtk-status");
1666} 1678}
1667 1679
1668 1680
@@ -1676,4 +1688,22 @@ GNUNET_contact_test ()
1676 history_add (2, "test"); 1688 history_add (2, "test");
1677 history_add (3, "test"); 1689 history_add (3, "test");
1678 history_add (4, "test"); 1690 history_add (4, "test");
1691
1692 GtkTreeIter iter;
1693 char *caller_id = "testje";
1694 int caller_num = 10;
1695
1696 /*
1697 * active_liststore:
1698 * 0: *gchar caller_id
1699 * 1: pointer caller
1700 * 2: gint caller_num
1701 */
1702
1703 gtk_list_store_append (active_liststore, &iter);
1704
1705 gtk_list_store_set (active_liststore, &iter, 2, caller_num, 0, caller_id, -1);
1706
1707
1708
1679} 1709}