Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Alberto,

On Tue, 2011-02-08 at 17:47 +0000, Alberto Ruiz wrote:
I am working on exporting the menubar menu items structure through a
DBus service, you can check my progress this the bzr branch I am
working on[0].

        Wonderful :-) but why are you doing this as an extension ? :-) surely
we should put this into the core code ? it should be rather easier to do
that, and less problematic.

My approach is creating a Synchronous Job that gets executed everytime
a document is opened[1][2].

        Hokay, no idea if that makes sense without reading the framework code
personally ;-)

On the execute method of my job, if I call g_idle_add with a simple
function doing just a multiply operation before return, I get
rendering problems, arbitrary elements of the UI ...

        Sooo ... we have gtk mainloop integration; but you need to get the
locking right of course; if it is pure gtk code; you should use:

        GDK_THREADS_ENTER

        as you hit your idle handler, and GDK_THREADS_LEAVE as you exit it.
Hmm ! interestingly I get similar corruption opening the file-selector
over the top of the shell - which might be related - fun. That would be
my first port of call.

My question is, is there a safe manner or any recommended practice
while using the glib mainloop from OpenOffice if the GNOME/GTK
integration is in use?

        cf. above I guess. I didn't see any interesting code at the links you
posted though so ... beyond taking the toolkit lock before using the
toolkit, I am not sure :-) There are really two ways to do that - one is
with the GDK_THREADS magic; the other is via
vcl/inc/vcl/solarmutex.hxx's helper.

        HTH,

                Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.