aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2022-02-13 18:49:00 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2022-02-13 18:49:00 +0100
commite06b57b58d500c09986b69180ed539ef8290cda0 (patch)
tree07ea1eaa52a786acc3ac0a0af12c2968ea10295c /src/ui
parent42e5473c0c1d82ffa161b928f25c1461de16c2b3 (diff)
downloadmessenger-gtk-e06b57b58d500c09986b69180ed539ef8290cda0.tar.gz
messenger-gtk-e06b57b58d500c09986b69180ed539ef8290cda0.zip
Implemented account selection
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/messenger.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c
index 7fdb60e..a5a64e0 100644
--- a/src/ui/messenger.c
+++ b/src/ui/messenger.c
@@ -94,7 +94,14 @@ handle_accounts_listbox_row_activated(UNUSED GtkListBox* listbox,
94 return; 94 return;
95 } 95 }
96 96
97 // TODO: switch to selected profile 97 struct GNUNET_CHAT_Account *account = (struct GNUNET_CHAT_Account*) (
98 g_hash_table_lookup(app->ui.bindings, row)
99 );
100
101 if (!account)
102 return;
103
104 GNUNET_CHAT_connect(app->chat.messenger.handle, account);
98} 105}
99 106
100static void 107static void
@@ -497,4 +504,6 @@ ui_messenger_cleanup(UI_MESSENGER_Handle *handle)
497 504
498 if (handle->chat_entries) 505 if (handle->chat_entries)
499 g_list_free(handle->chat_entries); 506 g_list_free(handle->chat_entries);
507
508 memset(handle, 0, sizeof(*handle));
500} 509}