fix for menu separator

wxGlCanvas works again (but flickers)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-05 20:05:26 +00:00
parent a55268db33
commit 08fc17448a
5 changed files with 41 additions and 22 deletions

View File

@@ -597,9 +597,23 @@ void wxMenu::AppendSeparator()
wxMenuItem *mitem = new wxMenuItem();
mitem->SetId(ID_SEPARATOR);
#if (GTK_MINOR_VERSION > 0)
GtkItemFactoryEntry entry;
entry.path = "/sep";
entry.callback = (GtkItemFactoryCallback) NULL;
entry.callback_action = 0;
entry.item_type = "<Separator>";
entry.accelerator = (gchar*) NULL;
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
/* this will be wrong for more than one separator. do we care? */
GtkWidget *menuItem = gtk_item_factory_get_widget( m_factory, "<main>/sep" );
#else
GtkWidget *menuItem = gtk_menu_item_new();
gtk_menu_append( GTK_MENU(m_menu), menuItem );
gtk_widget_show( menuItem );
#endif
mitem->SetMenuItem(menuItem);
m_items.Append( mitem );

View File

@@ -2002,9 +2002,6 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
}
else
{
int old_width = m_width;
int old_height = m_height;
if ((sizeFlags & wxSIZE_USE_EXISTING) == wxSIZE_USE_EXISTING)
{
if (x != -1) m_x = x;