From abdb05c57263d1d591308132aa98c9928996a2c8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 29 Jun 2009 06:21:59 +0000 Subject: [PATCH] (trunk gtk) possible fix for https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/388348 --- gtk/tr-prefs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/tr-prefs.c b/gtk/tr-prefs.c index 578ec0b76..04593d7ef 100644 --- a/gtk/tr-prefs.c +++ b/gtk/tr-prefs.c @@ -1266,9 +1266,11 @@ onCorePrefsChanged( TrCore * core UNUSED, const char * key, gpointer gdata ) if( !strcmp( key, TR_PREFS_KEY_PEER_PORT ) ) { struct network_page_data * data = gdata; + gdk_threads_enter(); gtk_label_set_text( GTK_LABEL( data->portLabel ), _( "Status unknown" ) ); gtk_widget_set_sensitive( data->portButton, TRUE ); gtk_widget_set_sensitive( data->portSpin, TRUE ); + gdk_threads_leave(); } } @@ -1288,9 +1290,11 @@ onPortTested( TrCore * core UNUSED, gboolean isOpen, gpointer vdata ) { struct network_page_data * data = vdata; const char * markup = isOpen ? _( "Port is open" ) : _( "Port is closed" ); + gdk_threads_enter(); gtk_label_set_markup( GTK_LABEL( data->portLabel ), markup ); gtk_widget_set_sensitive( data->portButton, TRUE ); gtk_widget_set_sensitive( data->portSpin, TRUE ); + gdk_threads_leave(); } static void