Mercurial > hg > xemacs-beta
comparison src/frame-gtk.c @ 5126:2a462149bd6a ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 24 Feb 2010 19:04:27 -0600 |
parents | b5df3737028a 07dcc7000bbf |
children | a9c41067dd88 |
comparison
equal
deleted
inserted
replaced
5125:b5df3737028a | 5126:2a462149bd6a |
---|---|
1 /* Functions for the GTK toolkit. | 1 /* Functions for the GTK toolkit. |
2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. |
3 Copyright (C) 1995, 1996, 2002, 2003 Ben Wing. | 3 Copyright (C) 1995, 1996, 2002, 2003, 2010 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
369 | 369 |
370 if (GTK_IS_WINDOW (shell)) | 370 if (GTK_IS_WINDOW (shell)) |
371 { | 371 { |
372 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; | 372 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; |
373 /* Deal with the cell size */ | 373 /* Deal with the cell size */ |
374 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); | 374 default_face_width_and_height (wrap_frame (f), &geometry.width_inc, &geometry.height_inc); |
375 | 375 |
376 gtk_window_set_geometry_hints (GTK_WINDOW (shell), | 376 gtk_window_set_geometry_hints (GTK_WINDOW (shell), |
377 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); | 377 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); |
378 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS); | 378 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS); |
379 gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, FALSE); | 379 gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, FALSE); |
380 } | 380 } |
381 | 381 |
382 FRAME_HEIGHT (f) = h; | 382 FRAME_HEIGHT (f) = h; |
383 FRAME_WIDTH (f) = w; | 383 FRAME_WIDTH (f) = w; |
384 | 384 |
385 change_frame_size (f, h, w, 0); | 385 change_frame_size (f, w, h, 0); |
386 { | 386 { |
387 GtkRequisition req; | 387 GtkRequisition req; |
388 | 388 |
389 gtk_widget_size_request (FRAME_GTK_SHELL_WIDGET (f), &req); | 389 gtk_widget_size_request (FRAME_GTK_SHELL_WIDGET (f), &req); |
390 gtk_widget_set_usize (FRAME_GTK_SHELL_WIDGET (f), req.width, req.height); | 390 gtk_widget_set_usize (FRAME_GTK_SHELL_WIDGET (f), req.width, req.height); |
1187 if (GTK_IS_WINDOW (shell)) | 1187 if (GTK_IS_WINDOW (shell)) |
1188 { | 1188 { |
1189 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; | 1189 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; |
1190 | 1190 |
1191 /* Update the cell size */ | 1191 /* Update the cell size */ |
1192 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); | 1192 default_face_width_and_height (wrap_frame (f), &geometry.width_inc, |
1193 &geometry.height_inc); | |
1193 | 1194 |
1194 gtk_window_set_geometry_hints (GTK_WINDOW (shell), | 1195 gtk_window_set_geometry_hints (GTK_WINDOW (shell), |
1195 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); | 1196 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); |
1196 } | 1197 } |
1197 | 1198 |
1198 change_frame_size (f, rows, cols, 0); | 1199 change_frame_size (f, cols, rows, 0); |
1199 | 1200 |
1200 { | 1201 { |
1201 GtkRequisition req; | 1202 GtkRequisition req; |
1202 | 1203 |
1203 gtk_widget_size_request (FRAME_GTK_SHELL_WIDGET (f), &req); | 1204 gtk_widget_size_request (FRAME_GTK_SHELL_WIDGET (f), &req); |
1368 GdkGeometry geometry; | 1369 GdkGeometry geometry; |
1369 GdkWindowHints geometry_mask; | 1370 GdkWindowHints geometry_mask; |
1370 gint width_inc = 10; | 1371 gint width_inc = 10; |
1371 gint height_inc = 10; | 1372 gint height_inc = 10; |
1372 | 1373 |
1373 default_face_height_and_width (wrap_frame (frm), &height_inc, &width_inc); | 1374 default_face_width_and_height (wrap_frame (frm), &width_inc, &height_inc); |
1374 geometry_mask = GDK_HINT_RESIZE_INC; | 1375 geometry_mask = GDK_HINT_RESIZE_INC; |
1375 geometry.width_inc = width_inc; | 1376 geometry.width_inc = width_inc; |
1376 geometry.height_inc = height_inc; | 1377 geometry.height_inc = height_inc; |
1377 | 1378 |
1378 gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm), &geometry, geometry_mask); | 1379 gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm), &geometry, geometry_mask); |