[Glade-users] Glade dialogs



On Wed, 2004-01-14 at 22:40, Greg Hamilton wrote:
set_transient_for() does ensure the dialog is over the window, but it's 
not positioned correctly (it should be centred over the window, instead 
it's usually just below the menu bar) and the window is not the parent 
window. Checking dialog.get_parent() returns None, ie. the dialog has 
no parent window.

The parent widget is usually the parent widget within the window.
Windows themselves don't have parents.


When I construct a dialog manually in code one of the arguments to the 
function which creates the dialog is the parent window. There doesn't 
seem to be a way to set this using Glade.

Yes, the parent window is used in the call to set_transient_for().
You can't do that in Glade since Glade doesn't know what the parent
window will be. (There may be multiple instances of each window).


It looks like GTK+ added new settings for window positions, 'center on
parent' and 'center always'. I need to add support for these to Glade.

For now you will have to call:
   gtk_window_set_position (window, GTK_WIN_POS_CENTER_ON_PARENT);
manually after creating the window.

Damon






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]