Re: patch update 1.1, was: Re: draw applet without theme

Hi again, Karl
It's Predatory Kangaroo, from my preferred e-mail address.
I just went back over the code I was using to test size_request on my
laptop, rewrote it and it worked just fine. I can't be certain, but I
assume my segfaults were due to me declaring "GtkRequisition *req" and
passing that into size_request without assigning anything to it first.

Simple mistake, but the test program and your patch work just fine on my
box now :)

Lachlan Pease

P.S. Thanks for the compliment on the name ;)
Sorry for the spam, Karl. Forgot to change it to the list.

On Thu, 2006-01-05 at 21:22 +0100, Karl H. Beckers wrote:
> Hi all,
> on a hint from Predatory Kangaroo (nice name btw.) I've mananged to make
> the left-click menu with my patch behave a little more like it does in
> the original version.
> In other words:
> The patch now looks at the position of the applet. If it's in the upper
> half of the screen, it will position the menu below the applet. If it's
> in the lower half, it will try to position the menu above the applet. In
> both cases will it try to align the menu's left edge with the applet's.
> Of course this may all not work because there may not be enough space
> for the menu in the determined position. In this case the menu will be
> moved to fit on screen automatically by GTK as required ... that can
> probably be regarded as standard behaviour and as desirable.
> The other thing is that positioning relies on getting the menu height
> with gtk_widget_size_requisition. This seems to work decently for me
> here (though it causes segfaults for P.K.). However, I also remember
> having encountered problems elsewhere because gtk_widget_size_request
> returns the widget's DESIRED dimensions. Now, the dimensions actually
> allocated may be quite different. Don't think this is problematic
> because it will worst case make the positioning above the applet a
> little inaccurate. I'm just elaborating in case somebody has an idea for
> determining the menu's size accurately and deterministically before
> actually showing it.
> If you also experience segfaults with this version, go back to the
> previous one and leave positioning to GTK. On my ubuntu breezy machine
> it works alright.
> Karl.
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org

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