From f87eca637e86c6aefebad7941477e16123b9c290 Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Mon, 21 Jan 2008 22:08:42 +0000 Subject: [PATCH] Fixed a few misfeatures of the about box. Bug: The 'Close' button didn't close it. Bug: Closing the window destroyed the about box so attempting to reshow it didn't work. --- .gitignore | 1 + src/callbacks.c | 7 +++++++ src/callbacks.h | 5 +++++ src/interface.c | 8 ++++++++ 4 files changed, 21 insertions(+) diff --git a/.gitignore b/.gitignore index c3238c0..9bdffef 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,6 @@ pkg depcomp .deps stamp-h1 +.*.sw? diff --git a/src/callbacks.c b/src/callbacks.c index a0aa001..f12679f 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -206,3 +206,10 @@ on_button5_clicked (GtkButton *button, gssmp_ui_lastfm_close (); } +void +on_about_response (GtkDialog *dialog, + gint arg1, + gpointer user_data) +{ + gtk_widget_hide( GTK_WIDGET(dialog) ); +} diff --git a/src/callbacks.h b/src/callbacks.h index efb2e89..52aca24 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -125,3 +125,8 @@ on_lastfmwindow_delete_event (GtkWidget *widget, void on_button5_clicked (GtkButton *button, gpointer user_data); + +void +on_about_response (GtkDialog *dialog, + gint arg1, + gpointer user_data); diff --git a/src/interface.c b/src/interface.c index ea44f3d..17534e7 100644 --- a/src/interface.c +++ b/src/interface.c @@ -385,6 +385,14 @@ create_aboutdialog1 (void) /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog1, aboutdialog1, "aboutdialog1"); + g_signal_connect ((gpointer) aboutdialog1, "response", + G_CALLBACK (on_about_response), + NULL); + + g_signal_connect ((gpointer) aboutdialog1, "delete_event", + G_CALLBACK (gtk_widget_hide_on_delete), + NULL); + return aboutdialog1; } -- 2.11.4.GIT