From 1f89513ceae97a9ba7029b983f89e893ed4d6abd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 25 Aug 2022 05:49:44 +0300 Subject: [PATCH 44/44] gtk: Fix setup_widgets() dead assignment of 'hpaned' See osdn #45445 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/gui_main.c | 6 ++++-- client/gui-gtk-4.0/gui_main.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index 59a7805488..0e671bac2b 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -1152,7 +1152,7 @@ static void setup_canvas_color_for_state(GtkStateFlags state) static void setup_widgets(void) { GtkWidget *page, *ebox, *hgrid, *hgrid2, *label; - GtkWidget *frame, *table, *table2, *paned, *hpaned, *sw, *text; + GtkWidget *frame, *table, *table2, *paned, *sw, *text; GtkWidget *button, *view, *vgrid, *right_vbox = NULL; int i; char buf[256]; @@ -1592,9 +1592,11 @@ static void setup_widgets(void) /* *** The message window -- this is a detachable widget *** */ if (GUI_GTK_OPTION(message_chat_location) == GUI_GTK_MSGCHAT_MERGED) { - bottom_hpaned = hpaned = paned; + bottom_hpaned = paned; right_notebook = bottom_notebook = top_notebook; } else { + GtkWidget *hpaned; + dtach_lowbox = detached_widget_new(); gtk_paned_pack2(GTK_PANED(paned), dtach_lowbox, FALSE, TRUE); avbox = detached_widget_fill(dtach_lowbox); diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c index 5a6dd109b3..45864b39e3 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -1092,7 +1092,7 @@ bool terminate_signal_processing(void) static void setup_widgets(void) { GtkWidget *page, *hgrid, *hgrid2, *label; - GtkWidget *frame, *table, *table2, *paned, *hpaned, *sw, *text; + GtkWidget *frame, *table, *table2, *paned, *sw, *text; GtkWidget *button, *view, *vgrid, *vbox, *right_vbox = NULL; int i; char buf[256]; @@ -1552,9 +1552,11 @@ static void setup_widgets(void) /* *** The message window -- this is a detachable widget *** */ if (GUI_GTK_OPTION(message_chat_location) == GUI_GTK_MSGCHAT_MERGED) { - bottom_hpaned = hpaned = paned; + bottom_hpaned = paned; right_notebook = bottom_notebook = top_notebook; } else { + GtkWidget *hpaned; + dtach_lowbox = detached_widget_new(); gtk_paned_set_end_child(GTK_PANED(paned), dtach_lowbox); avbox = detached_widget_fill(dtach_lowbox); -- 2.35.1