From a384179816de9c33df5a03a0b7272be0c115b050 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 17 Aug 2022 12:58:08 +0200 Subject: Implement chat to roster transition --- gtk.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gtk.c') diff --git a/gtk.c b/gtk.c index d4b1cfc..c84534c 100644 --- a/gtk.c +++ b/gtk.c @@ -179,6 +179,12 @@ void gui_run(void) { } +static void to_roster(void) { + + gtk_stack_set_visible_child(GTK_STACK(stack), roster_layout_box); + +} + void* gui_add_chat(void) { // create chat page (GtkBox) and add it to the stack @@ -188,7 +194,7 @@ void* gui_add_chat(void) { // create and add back button GtkWidget* back = gtk_button_new_with_label("back"); gtk_box_append(GTK_BOX(chat_layout_box), back); - //g_signal_connect_swapped(back, "clicked", G_CALLBACK(to_roster), NULL); TODO + g_signal_connect_swapped(back, "clicked", G_CALLBACK(to_roster), NULL); // create and add scrolled window GtkWidget* scrolled = gtk_scrolled_window_new(); -- cgit v1.2.3-70-g09d2