From ac588c4835769e6aa340be0858c22ee9191daa1a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 18 Oct 2010 11:43:30 +0000 Subject: [PATCH] (trunk gtk) #3644 'about dialog keeps reappearing' - fixed. --- gtk/main.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/gtk/main.c b/gtk/main.c index c79829975..0f7cea19f 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1407,41 +1407,39 @@ onUriClicked( GtkAboutDialog * u UNUSED, const gchar * uri, gpointer u2 UNUSED ) } static void -about( GtkWindow * parent ) +about( GtkWindow * parent UNUSED ) { - const char *authors[] = - { + GtkWidget * d; + const char * website_uri = "http://www.transmissionbt.com/"; + const char * authors[] = { "Charles Kerr (Backend; GTK+)", "Mitchell Livingston (Backend; OS X)", - "Kevin Glowacz (Web client)", NULL }; - const char * website_uri = "http://www.transmissionbt.com/"; - gtk_about_dialog_set_url_hook( onUriClicked, NULL, NULL ); - gtk_show_about_dialog( parent, - "name", g_get_application_name( ), - "comments", - _( "A fast and easy BitTorrent client" ), - "version", LONG_VERSION_STRING, - "website", website_uri, - "website-label", website_uri, - "copyright", - _( "Copyright (c) The Transmission Project" ), - "logo-icon-name", MY_CONFIG_NAME, + d = g_object_new( GTK_TYPE_ABOUT_DIALOG, + "authors", authors, + "comments", _( "A fast and easy BitTorrent client" ), + "copyright", _( "Copyright (c) The Transmission Project" ), + "logo-icon-name", MY_CONFIG_NAME, + "name", g_get_application_name( ), + /* Translators: translate "translator-credits" as your name + to have it appear in the credits in the "About" + dialog */ + "translator-credits", _( "translator-credits" ), + "version", LONG_VERSION_STRING, + "website", website_uri, + "website-label", website_uri, #ifdef SHOW_LICENSE - "license", LICENSE, - "wrap-license", TRUE, + "license", LICENSE, + "wrap-license", TRUE, #endif - "authors", authors, - /* Translators: translate "translator-credits" as - your name - to have it appear in the credits in the "About" - dialog */ - "translator-credits", _( "translator-credits" ), - NULL ); + NULL ); + + gtk_dialog_run( GTK_DIALOG( d ) ); + gtk_widget_destroy( d ); } static void