diff options
Diffstat (limited to 'battstat/battstat-upower.c')
-rw-r--r-- | battstat/battstat-upower.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c index f42de3fd..b0838176 100644 --- a/battstat/battstat-upower.c +++ b/battstat/battstat-upower.c @@ -325,9 +325,15 @@ error_dialog( const char *fmt , ...) dialog = gtk_message_dialog_new( NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", str); +#if GTK_CHECK_VERSION (3, 0, 0) + g_signal_connect_swapped( G_OBJECT (dialog), "response", + G_CALLBACK (gtk_widget_destroy), + G_OBJECT (dialog) ); +#else g_signal_connect_swapped( GTK_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (dialog) ); +#endif gtk_widget_show_all( dialog ); } |