From ceb235786a323fa4da56d008b97369c44dcdaa0e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 30 Sep 2022 17:10:46 +0300 Subject: [PATCH 32/32] gtk: Drop worklist_response() See osdn #43309 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/wldlg.c | 13 +++---------- client/gui-gtk-4.0/wldlg.c | 10 +--------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/client/gui-gtk-3.22/wldlg.c b/client/gui-gtk-3.22/wldlg.c index 2970b96ee4..3407072d67 100644 --- a/client/gui-gtk-3.22/wldlg.c +++ b/client/gui-gtk-3.22/wldlg.c @@ -378,14 +378,6 @@ static void delete_worklist(int global_worklist_id) } } -/************************************************************************//** - User responded to worklist report -****************************************************************************/ -static void worklist_response(GtkWidget *shell, gint response) -{ - gtk_widget_destroy(shell); -} - /************************************************************************//** Worklist editor window used by the global worklist report. ****************************************************************************/ @@ -404,14 +396,15 @@ static void popup_worklist(struct global_worklist *pgwl) NULL); gtk_window_set_role(GTK_WINDOW(shell), "worklist"); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_MOUSE); - g_signal_connect(shell, "response", G_CALLBACK(worklist_response), NULL); + g_signal_connect(shell, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_window_set_default_size(GTK_WINDOW(shell), 500, 400); editor = create_worklist(); reset_global_worklist(editor, pgwl); insert_worklist(global_worklist_id(pgwl), editor); - gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(shell))), editor); + gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(shell))), + editor); gtk_widget_show(editor); refresh_worklist(editor); diff --git a/client/gui-gtk-4.0/wldlg.c b/client/gui-gtk-4.0/wldlg.c index 55517179dc..e76c29b802 100644 --- a/client/gui-gtk-4.0/wldlg.c +++ b/client/gui-gtk-4.0/wldlg.c @@ -385,14 +385,6 @@ static void delete_worklist(int global_worklist_id) } } -/************************************************************************//** - User responded to worklist report -****************************************************************************/ -static void worklist_response(GtkWidget *shell, gint response) -{ - gtk_window_destroy(GTK_WINDOW(shell)); -} - /************************************************************************//** Worklist editor window used by the global worklist report. ****************************************************************************/ @@ -409,7 +401,7 @@ static void popup_worklist(struct global_worklist *pgwl) _("_Close"), GTK_RESPONSE_CLOSE, NULL); - g_signal_connect(shell, "response", G_CALLBACK(worklist_response), NULL); + g_signal_connect(shell, "response", G_CALLBACK(gtk_window_destroy), NULL); gtk_window_set_default_size(GTK_WINDOW(shell), 500, 400); editor = create_worklist(); -- 2.35.1