Re: BonoboView sizing problems
- From: Martin Baulig <martin home-of-linux org>
- To: Michael Meeks <michael helixcode com>
- Cc: gnome-components-list gnome org
- Subject: Re: BonoboView sizing problems
- Date: 29 Nov 2000 21:51:14 +0100
Michael Meeks <michael helixcode com> writes:
> Hi Martin,
>
> On 29 Nov 2000, Martin Baulig wrote:
> > After creating the BonoboViewFrame and connecting it to its BonoboView
> > In my container application I want to ask the View for its desired
> > size (since I want to use it as the default size for the ViewFrame).
> >
> > But there is no way to do this - the BonoboSocket will get its size at
> > some point when gtk_container_idle_sizer() is run next time and there's
> > no way to get a callback.
Hi Michael,
> Why can you not just listen on the CHECK_RESIZE signal ?
Because this doesn't help me in any way.
The ControlFrame gets its size from its container, not from its BonoboSocket.
This means that listening on CHECK_RESIZE or SIZE_ALLOCATE doesn't help me,
I'd get the signal when the container assigns the ControlFrame a size.
What may work is listening on the SIZE_ALLOCATE signal on the BonoboSocket,
but I cannot do this in my container application since there's not way to
get the BonoboSocket, it's private to the ControlFrame.
Calling gtk_widget_size_request() on the ControlFrame's wrapper widget works,
but only after the Socket got the CreateNotify event.
So I think the ideal (but not binary compatible) solution is to add a new
signal to the ControlFrame (btw. am I only dreaming or was there such a signal
some time ago which got removed?), something like XID_RECEIVED or SOCKET_CREATED
and then emit that signal when ge get the CreateNotify event in the socket.
How does that sound ?
> > However, there is a simple way to fix this without breaking any existing
> > API - all we need to do is to implement BonoboControl::getDesiredSize()
> > which currently does nothing.
>
> The thing is; that these APIs are left as a throw back to the old
> and broken way of sizing Gtk widgets, which instead of going through the
> plug / socket queue tried to do it synchrnonously and directly. I really
> want to discourage people doing this again. Hmm.
>
> Still; I suppose it's an easy solution, we can do it if you like,
> but do it quickly so I don't feel the pain.
>
> Regards,
>
> Michael.
>
> --
> mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
>
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]