[Glade-devel] Window mess with glade-3
Owen Taylor
otaylor@redhat.com
Wed, 30 Jun 2004 01:54:12 +0200
--=-1WET6twVrhAzRy2ZqM1U
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
The GTK+ team discourages the use of GTK_WIN_POS_CENTER. The GTK+
team *strongly* discourages the use of GTK_WIN_POS_CENTER_ALWAYS.
What window manager are you using? It should be able to see
that the window will be positioned offscreen and take corrective
action.
Regards,
Owen
On Wed, 2004-06-30 at 01:13, Micha=C5=82 Byrecki wrote:
> Hello.
> I've downloaded a glade-3 from cvs, to check out.
> It compiles fine, but...
> The main window is displayed in a left upper corner of my crt. The
> position of a dialogs, i.e. like glade_util_file_chooser_new are
> probably set to display over the main window, which is smaller than
> dialogs. The result is - that i can only see about 1/3 of the dialog
> window.
> I think, that the gtk+ should take care of that, correct me, if i'm
> wrong.
> For now to avoid this i've changed:
>=20
> --- ./glade-utils.c 2004-05-21 22:17:19.000000000 +0200
> +++ ./glade-utils-ok.c 2004-06-30 00:31:50.000000000 +0200
> @@ -306,12 +306,15 @@
> glade_util_file_chooser_new (const gchar *title, GtkWindow *parent,=20
> GtkFileChooserAction action)
> {
> + GtkWidget *filechoose;
> g_assert (action =3D=3D GTK_FILE_CHOOSER_ACTION_OPEN || action =
=3D=3D
> GTK_FILE_CHOOSER_ACTION_SAVE);- return gtk_file_chooser_dialog_new
> (title, parent, action,+ filechoose=3Dgtk_file_chooser_dialog_new
> (title, parent, action, =20
> GTK_STOCK_CANCEL, =20
> GTK_RESPONSE_CANCEL, action
> =3D=3D GTK_FILE_CHOOSER_ACTION_OPEN ? GTK_STOCK_OPEN : GTK_STOCK_SAVE,
> GTK_RESPONSE_OK, NULL);
> + gtk_window_set_position((GtkWindow
> *)filechoose,GTK_WIN_POS_CENTER_ALWAYS);+ return filechoose;
> }
> =20
> /**
--=-1WET6twVrhAzRy2ZqM1U
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQBA4gEjS+2LB0B90LERAom4AKDNxczIaIUt26AlfvvUEiZkrXAjawCdELkn
CcPY8thilGrW9q0t75fJ+pM=
=6TBz
-----END PGP SIGNATURE-----
--=-1WET6twVrhAzRy2ZqM1U--