incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fabian <>
Subject Re: [EXT] disable/enable toolbar functions
Date Tue, 31 Jan 2012 15:23:02 GMT

Fabian Hoffmann

. Netempire AG | Lüghauser Straße 16 | D - 51503 Rösrath
. Fon: 0221 99 11 12 - 19 | Fax: 0221 99 11 12 - 99
. |

. Vorstandsvorsitzender: Andreas Nettesheim
. Vorstand: Dr. Guido Gimmler | Johannes Krause
. Vorsitzender des Aufsichtsrates: Madjid Salimi

. Handelsregister: Amtsgericht Köln, HRB 35407
. USt-IdNr.: DE 215404683

On Jan 31, 2012, at 1:37 PM, Ariel Constenla-Haile wrote:

> On Sun, Jan 29, 2012 at 06:04:44PM +0100, fabian wrote:
>> Right now I am trying to also disable the controls in the menubar but
>> I think there is a good example for that in the SDK
>> (
> yes, this is disabling commands by configuration:
> If you want something more dynamic, the status of menu items is also
> controlled by dispatch objects, just like in the toolbar case.

>>> Right, that's what I actually want. Since my menu commands are named equally
as my toolbar commands (in addons.xcu) I thought disabling a toolbar command will also disable
the corresponding menu command but that wasn't the case.
>>> I did rename the menu commands to see if that way the addStatusListener method
is called by them but that's not happening and therefore I have no listeners to disable the
commands. I did expect it works the same as for the toolbar?
>> I would like to ask one more thing related to using an external
>> graphics library for dialogs. I am using Swing to build dialogs since
>> I need to build more complex dialogs than possible with UNO/AWT. Since
>> I am working on a mac I got to learn pretty fast that I have to run
>> AWT/Swing in its own Thread in order to avoid the error: "Apple AWT
>> Java VM was loaded on first thread -- can't start AWT."
>> Naturally this causes that OpenOffice is still accessible while the
>> dialog pops up. So the question is, is there anything like putting
>> OpenOffice to sleep while a dialog is open?
> I know nothing about MacOS, I'm a Linux user, and I develop on that
> platform. Though I know there is an issue:
> This is CLOSED FIXED, but according to
> the fix applied
> only solves the issue with beanshell and javascript with AOO, not the
> problem itself:
> Look at that code, see if you can apply the same approach in your
> extension. If it does not work, then the issue should be reopened.
>>> I I read that thread when I faced the problem the first time and from it I know
that I need to run AWT/Swing in its own thread. But the javascript code might teach me how
to deal with the main office thread while my awt thread is running.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message