From 67b9808ed996f173ccd4f56319cb048974732854 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 25 Aug 2022 06:07:11 +0300 Subject: [PATCH 23/23] gtk: Fix setup_widgets() dead assignment of 'hpaned' See osdn #45445 Signed-off-by: Marko Lindqvist --- client/gui-gtk-2.0/gui_main.c | 6 ++++-- client/gui-gtk-3.0/gui_main.c | 6 ++++-- client/gui-gtk-3.22/gui_main.c | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/client/gui-gtk-2.0/gui_main.c b/client/gui-gtk-2.0/gui_main.c index acd3b96b6e..b5c7b29765 100644 --- a/client/gui-gtk-2.0/gui_main.c +++ b/client/gui-gtk-2.0/gui_main.c @@ -1009,7 +1009,7 @@ static gboolean right_notebook_button_release(GtkWidget *widget, static void setup_widgets(void) { GtkWidget *page, *box, *ebox, *hbox, *sbox, *align, *label; - GtkWidget *frame, *table, *table2, *paned, *hpaned, *sw, *text; + GtkWidget *frame, *table, *table2, *paned, *sw, *text; GtkWidget *button, *view, *right_vbox = NULL; int i; char buf[256]; @@ -1389,9 +1389,11 @@ static void setup_widgets(void) /* *** The message window -- this is a detachable widget *** */ if (gui_options.gui_gtk2_message_chat_location == GUI_GTK_MSGCHAT_MERGED) { - bottom_hpaned = hpaned = paned; + bottom_hpaned = paned; right_notebook = bottom_notebook = top_notebook; } else { + GtkWidget *hpaned; + sbox = detached_widget_new(); gtk_paned_pack2(GTK_PANED(paned), sbox, FALSE, TRUE); avbox = detached_widget_fill(sbox); diff --git a/client/gui-gtk-3.0/gui_main.c b/client/gui-gtk-3.0/gui_main.c index a0051ef0d2..55c3a26ea7 100644 --- a/client/gui-gtk-3.0/gui_main.c +++ b/client/gui-gtk-3.0/gui_main.c @@ -1081,7 +1081,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]; @@ -1508,9 +1508,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-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index bb36cf0e22..b79a4b8788 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -1101,7 +1101,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]; @@ -1541,9 +1541,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); -- 2.35.1