]> git.saurik.com Git - wxWidgets.git/commitdiff
Small code cleanup in wxWindowGTK::PostCreation().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:54:55 +0000 (22:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:54:55 +0000 (22:54 +0000)
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

index b73603f108a8040424feea2fc5e96fa8d5b0a590..e73b3ebb826074d2434e6eed4f68b06987f9ffdb 100644 (file)
@@ -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() )
     {