| 
      
      
      From: <kr_...@us...> - 2003-10-20 22:03:50
      
     | 
| Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv29266/src/cbits/GTK
Modified Files:
	LayoutContainer.c LayoutContainer.h Window.c 
Log Message:
Implementation for dialogs with minimal size
Index: LayoutContainer.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/LayoutContainer.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LayoutContainer.c	1 Oct 2003 21:47:15 -0000	1.1
--- LayoutContainer.c	20 Oct 2003 18:19:22 -0000	1.2
***************
*** 456,459 ****
--- 456,461 ----
    layout->scroll_y = 0;
    layout->visibility = GDK_VISIBILITY_PARTIAL;
+   layout->requisition.width = 0;
+   layout->requisition.height = 0;
  }
  
***************
*** 596,600 ****
  {
    GList *tmp_list;
!   GtkLayout *layout;
  
    g_return_if_fail (PORT_IS_LAYOUT (widget));
--- 598,602 ----
  {
    GList *tmp_list;
!   PortLayout *layout;
  
    g_return_if_fail (PORT_IS_LAYOUT (widget));
***************
*** 602,607 ****
    layout = PORT_LAYOUT (widget);
  
!   requisition->width = 0;
!   requisition->height = 0;
  
    tmp_list = layout->children;
--- 604,609 ----
    layout = PORT_LAYOUT (widget);
  
!   requisition->width = layout->requisition.width;
!   requisition->height = layout->requisition.height;
  
    tmp_list = layout->children;
Index: LayoutContainer.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/LayoutContainer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LayoutContainer.h	1 Oct 2003 21:47:15 -0000	1.1
--- LayoutContainer.h	20 Oct 2003 18:19:23 -0000	1.2
***************
*** 34,37 ****
--- 34,38 ----
    gint scroll_x;
    gint scroll_y;
+   GtkRequisition requisition;
  };
  
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** Window.c	20 Oct 2003 18:11:34 -0000	1.41
--- Window.c	20 Oct 2003 18:19:23 -0000	1.42
***************
*** 922,924 ****
--- 922,929 ----
  void osSetDialogMinSize(WindowHandle dialog, int w, int h)
  {
+ 	if (gtk_widget_get_toplevel(dialog) != gFrameWidget)
+ 	{
+ 		PORT_LAYOUT(GTK_BIN(dialog)->child)->requisition.width = w;
+ 		PORT_LAYOUT(GTK_BIN(dialog)->child)->requisition.height = h;
+ 	}
  }
 |