Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv25229/src/cbits/GTK
Modified Files:
Frame.c Internals.h Window.c
Log Message:
bugfix
Index: Frame.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Frame.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Frame.c 5 Jul 2003 06:42:38 -0000 1.9
--- Frame.c 5 Jul 2003 11:01:16 -0000 1.10
***************
*** 10,13 ****
--- 10,14 ----
GtkWidget *gClientWidget = NULL;
GtkWidget *gMenuBar = NULL;
+ int gFrameWidth = 0, gFrameHeight = 0;
static void frame_close_page_handler(GtkWidget *client)
***************
*** 290,293 ****
--- 291,301 ----
}
+ static gboolean sdiframe_configure_event_handler(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data)
+ {
+ gFrameWidth = event->width;
+ gFrameHeight = event->height;
+ return FALSE;
+ };
+
void createSDIFrame()
{
***************
*** 312,315 ****
--- 320,328 ----
GTK_SIGNAL_FUNC(sdiframe_focus_out_handler),
NULL);
+ gtk_signal_connect (GTK_OBJECT(gFrameWidget), "configure-event",
+ GTK_SIGNAL_FUNC(sdiframe_configure_event_handler),
+ NULL);
+
+ gtk_window_get_size(GTK_WINDOW(gFrameWidget), &gFrameWidth, &gFrameHeight);
gtk_window_add_accel_group (GTK_WINDOW (gFrameWidget), gtk_accel_group_new());
Index: Internals.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Internals.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Internals.h 4 Jul 2003 15:23:57 -0000 1.3
--- Internals.h 5 Jul 2003 11:01:16 -0000 1.4
***************
*** 9,12 ****
--- 9,14 ----
extern GnomeProgram *gProgram;
+ extern int gFrameWidth, gFrameHeight;
+
extern int gDocumentInterface;
extern char *gAppName, *gAppVersion, *gWindowName;
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Window.c 5 Jul 2003 08:53:36 -0000 1.19
--- Window.c 5 Jul 2003 11:01:16 -0000 1.20
***************
*** 239,243 ****
last_allocation = *allocation;
last_widget = widget;
!
handleWindowResize(widget,allocation->width-4,allocation->height-4);
handleWindowReLayout(widget);
--- 239,243 ----
last_allocation = *allocation;
last_widget = widget;
!
handleWindowResize(widget,allocation->width-4,allocation->height-4);
handleWindowReLayout(widget);
***************
*** 248,252 ****
{
GtkWidget *fixed, *sw, *viewport;
!
/* Create a Scrolled Window */
sw = gtk_scrolled_window_new (NULL, NULL);
--- 248,252 ----
{
GtkWidget *fixed, *sw, *viewport;
!
/* Create a Scrolled Window */
sw = gtk_scrolled_window_new (NULL, NULL);
***************
*** 260,263 ****
--- 260,264 ----
GTK_SIGNAL_FUNC(window_size_allocate_handler),
NULL);
+
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
***************
*** 785,789 ****
{
gtk_window_move(GTK_WINDOW(toplevel), x0, y0);
! gtk_window_resize(GTK_WINDOW(toplevel), abs(x1 - x0), abs(y1 - y0));
}
}
--- 786,793 ----
{
gtk_window_move(GTK_WINDOW(toplevel), x0, y0);
!
! gFrameWidth = abs(x1 - x0);
! gFrameHeight = abs(y1 - y0);
! gtk_window_resize(GTK_WINDOW(toplevel), gFrameWidth, gFrameHeight);
}
}
***************
*** 802,817 ****
else
{
! int x = 0;
int y = 0;
- int w = 0;
- int h = 0;
gtk_window_get_position(GTK_WINDOW(toplevel), &x, &y);
- gtk_window_get_size(GTK_WINDOW(toplevel), &w, &h);
res[0] = x;
res[1] = y;
! res[2] = x+w;
! res[3] = y+h;
}
}
--- 806,818 ----
else
{
! int x = 0;
int y = 0;
gtk_window_get_position(GTK_WINDOW(toplevel), &x, &y);
res[0] = x;
res[1] = y;
! res[2] = x+gFrameWidth;
! res[3] = y+gFrameHeight;
}
}
|