Use a GtkVBox to do TLW layout. Rework some of the remaining sizing code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-10-24 18:07:24 +00:00
parent a2d3826500
commit cca410b336
16 changed files with 343 additions and 900 deletions

View File

@@ -26,10 +26,6 @@
#include "wx/stockitem.h"
#include "wx/gtk/private.h"
#ifdef __WXGTK20__
#include <gdk/gdktypes.h>
#endif
// FIXME: is this right? somehow I don't think so (VZ)
#define gtk_accel_group_attach(g, o) gtk_window_add_accel_group((o), (g))
@@ -390,21 +386,8 @@ bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title, int pos)
// m_invokingWindow is set after wxFrame::SetMenuBar(). This call enables
// addings menu later on.
if (m_invokingWindow)
{
wxMenubarSetInvokingWindow( menu, m_invokingWindow );
// OPTIMISE ME: we should probably cache this, or pass it
// directly, but for now this is a minimal
// change to validate the new dynamic sizing.
// see (and refactor :) similar code in Remove
// below.
wxFrame *frame = wxDynamicCast( m_invokingWindow, wxFrame );
if( frame )
frame->UpdateMenuBarSize();
}
return true;
}
@@ -447,16 +430,7 @@ wxMenu *wxMenuBar::Remove(size_t pos)
menu->m_owner = NULL;
if (m_invokingWindow)
{
// OPTIMISE ME: see comment in GtkAppend
wxFrame *frame = wxDynamicCast( m_invokingWindow, wxFrame );
if( frame )
frame->UpdateMenuBarSize();
wxMenubarUnsetInvokingWindow( menu, m_invokingWindow );
}
return menu;
}