mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
fix gtklayout so that it removes children properly. add a few more debugging
messages to nsWidget and nsWindow
This commit is contained in:
parent
aa0fd8d09a
commit
fbe9c5461a
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user