From bb8afd6543a0301574120fbe2552e15144d85ccb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Oct 2009 22:54:55 +0000 Subject: [PATCH] Small code cleanup in wxWindowGTK::PostCreation(). No real changes, just check for 2.8.0 GTK+ version once instead of doing it twice in a row. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b73603f..e73b3eb 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2341,29 +2341,23 @@ void wxWindowGTK::PostCreation() G_CALLBACK(size_allocate), this); } - if (m_wxwindow) - { #if GTK_CHECK_VERSION(2, 8, 0) - if (!gtk_check_version(2,8,0)) + if ( gtk_check_version(2,8,0) == NULL ) + { + // Make sure we can notify the app when mouse capture is lost + if ( m_wxwindow ) { - // Make sure we can notify the app when mouse capture is lost g_signal_connect (m_wxwindow, "grab_broken_event", G_CALLBACK (gtk_window_grab_broken), this); } -#endif - } - if ( connect_widget != m_wxwindow ) - { -#if GTK_CHECK_VERSION(2, 8, 0) - if (!gtk_check_version(2,8,0)) + if ( connect_widget != m_wxwindow ) { - // Make sure we can notify app code when mouse capture is lost g_signal_connect (connect_widget, "grab_broken_event", G_CALLBACK (gtk_window_grab_broken), this); } -#endif } +#endif // GTK+ >= 2.8 if ( GTKShouldConnectSizeRequest() ) { -- 2.7.4