зеркало из https://github.com/mozilla/pjs.git
fix gtklayout so that it removes children properly. add a few more debugging
messages to nsWidget and nsWindow
This commit is contained in:
Родитель
7fc3cc706b
Коммит
a2acc6a448
|
@ -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)
|
||||
|
|
|
@ -88,6 +88,7 @@ nsIWidget *nsWidget::GetParent(void)
|
|||
NS_METHOD nsWidget::Show(PRBool bState)
|
||||
{
|
||||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче