diff options
author | hark <hark@puscii.nl> | 2014-01-30 21:38:04 +0000 |
---|---|---|
committer | hark <hark@puscii.nl> | 2014-01-30 21:38:04 +0000 |
commit | ad46fabf3c871bb68af7262015d0bd030704613d (patch) | |
tree | b00a995e486b86235ad22786c43d9f223309297a | |
parent | 4847e8ae6e1b024850185af252f2d3d892cc1190 (diff) | |
download | gnunet-gtk-ad46fabf3c871bb68af7262015d0bd030704613d.tar.gz gnunet-gtk-ad46fabf3c871bb68af7262015d0bd030704613d.zip |
fixed 3289 and some stuff for active call list
-rw-r--r-- | src/conversation/gnunet-conversation-gtk.c | 44 | ||||
-rw-r--r-- | src/conversation/gnunet-conversation-gtk.h | 13 |
2 files changed, 50 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 | } |
diff --git a/src/conversation/gnunet-conversation-gtk.h b/src/conversation/gnunet-conversation-gtk.h index e4907361..e4e007e0 100644 --- a/src/conversation/gnunet-conversation-gtk.h +++ b/src/conversation/gnunet-conversation-gtk.h | |||
@@ -304,10 +304,23 @@ enum CONVERSATION_ModelColumns | |||
304 | }; | 304 | }; |
305 | 305 | ||
306 | /** | 306 | /** |
307 | * List of active calls | ||
308 | */ | ||
309 | static GtkListStore *active_liststore; | ||
310 | |||
311 | /** | ||
312 | * List of active calls | ||
313 | */ | ||
314 | static GtkTreeView *active_treeview; | ||
315 | |||
316 | |||
317 | |||
318 | /** | ||
307 | * List of all known zones/egos. | 319 | * List of all known zones/egos. |
308 | */ | 320 | */ |
309 | static GtkListStore *contacts_liststore; | 321 | static GtkListStore *contacts_liststore; |
310 | 322 | ||
323 | |||
311 | /** | 324 | /** |
312 | * List of contacts. | 325 | * List of contacts. |
313 | */ | 326 | */ |