]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/frame.cpp
free old resources in DoLoad(), apparently fixes memory leaks with gstreamer 0.10...
[wxWidgets.git] / src / gtk / frame.cpp
index b7b4fec93ab612832719356164a4c8b17714ec1d..08a0d0e713ebaae7d40af2c2e19894cbd429da16 100644 (file)
@@ -251,7 +251,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
         {
             int x, y;
             m_frameToolBar->GetSize( &x, &y );
-            if ( m_frameToolBar->GetWindowStyle() & wxTB_VERTICAL )
+            if ( m_frameToolBar->IsVertical() )
             {
                 if (width != NULL)
                     *width -= x;
@@ -305,7 +305,7 @@ void wxFrame::DoSetClientSize( int width, int height )
             {
                 int x, y;
                 m_frameToolBar->GetSize( &x, &y );
-                if ( m_frameToolBar->GetWindowStyle() & wxTB_VERTICAL )
+                if ( m_frameToolBar->IsVertical() )
                 {
                     width += x;
                 }
@@ -352,19 +352,6 @@ void wxFrame::GtkOnSize()
 
     if (m_mainWidget)
     {
-        // set size hints
-        gint flag = 0; // GDK_HINT_POS;
-        if ((minWidth != -1) || (minHeight != -1)) flag |= GDK_HINT_MIN_SIZE;
-        if ((maxWidth != -1) || (maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE;
-        GdkGeometry geom;
-        geom.min_width = minWidth;
-        geom.min_height = minHeight;
-        geom.max_width = maxWidth;
-        geom.max_height = maxHeight;
-        gtk_window_set_geometry_hints( GTK_WINDOW(m_widget),
-                                       (GtkWidget*) NULL,
-                                       &geom,
-                                       (GdkWindowHints) flag );
         // TODO
         // Rewrite this terrible code to using GtkVBox
 
@@ -431,6 +418,17 @@ void wxFrame::GtkOnSize()
 
                 client_area_x_offset += ww;
             }
+            else if( m_frameToolBar->HasFlag(wxTB_RIGHT) )
+            {
+               yy += 2;
+               ww = m_toolBarDetached ? wxPLACE_HOLDER
+                                      : m_frameToolBar->m_width;
+               xx = GetClientSize().x - 1;
+               hh = m_height - 2*m_miniEdge;
+               if( hh < 0 )
+                  hh = 0;
+
+            }
             else if( m_frameToolBar->GetWindowStyle() & wxTB_BOTTOM )
             {
                 xx = m_miniEdge;