summaryrefslogtreecommitdiff
path: root/src/ui/messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/messenger.c')
-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,
return;
}
- // TODO: switch to selected profile
+ struct GNUNET_CHAT_Account *account = (struct GNUNET_CHAT_Account*) (
+ g_hash_table_lookup(app->ui.bindings, row)
+ );
+
+ if (!account)
+ return;
+
+ GNUNET_CHAT_connect(app->chat.messenger.handle, account);
}
static void
@@ -497,4 +504,6 @@ ui_messenger_cleanup(UI_MESSENGER_Handle *handle)
if (handle->chat_entries)
g_list_free(handle->chat_entries);
+
+ memset(handle, 0, sizeof(*handle));
}