fix gtklayout so that it removes children properly. add a few more debugging

messages to nsWidget and nsWindow
This commit is contained in:
pavlov%pavlov.net 1998-11-14 01:42:42 +00:00
parent aa0fd8d09a
commit fbe9c5461a
3 changed files with 6 additions and 7 deletions

View File

@ -538,6 +538,7 @@ gtk_layout_remove (GtkContainer *container,
child = tmp_list->data;
if (child->widget == widget)
break;
tmp_list=tmp_list->next;
}
if (tmp_list)

View File

@ -87,7 +87,8 @@ nsIWidget *nsWidget::GetParent(void)
NS_METHOD nsWidget::Show(PRBool bState)
{
g_print("nsWidget::Show(%6d) - %s %p\n", bState, mWidget->name, this);
g_print("nsWidget::Show(%6d) - %s %p\n", bState, mWidget->name, this);
if (bState) {
if (mWidget) {
gtk_widget_show(mWidget);
@ -348,10 +349,8 @@ void *nsWidget::GetNativeData(PRUint32 aDataType)
{
switch(aDataType) {
case NS_NATIVE_WINDOW:
if (GTK_IS_LAYOUT(mWidget))
return (void *)GTK_LAYOUT(mWidget)->bin_window;
else
return (void *)mWidget->window;
// return (void *)GTK_LAYOUT(mWidget)->bin_window;
return (void *)mWidget->parent->window;
case NS_NATIVE_DISPLAY:
return (void *)GDK_DISPLAY();
case NS_NATIVE_WIDGET:

View File

@ -146,10 +146,9 @@ NS_METHOD nsWindow::CreateNative(GtkWidget *parentWidget)
mVBox = gtk_vbox_new(FALSE, 0);
gtk_widget_show (mVBox);
gtk_container_add(GTK_CONTAINER(mainWindow), mVBox);
gtk_widget_show (mWidget);
gtk_box_pack_start(GTK_BOX(mVBox), mWidget, TRUE, TRUE, 0);
}
gtk_widget_show(mWidget);
// Force cursor to default setting
gtk_widget_set_name(mWidget, "nsWindow");
mCursor = eCursor_select;