We add two times the about dialog, the first time for the main window
and the second time for the chat window.
I've added some println in the code and the two instances got the same
If we change the return value of the
AboutWindowPluginComponent.getContainer() method from
Container.CONTAINER_HELP_MENU to Container.CONTAINER_CHAT_HELP_MENU :
no item is found in the help menu in the main window and only one item
in the chat window.
The result can be easily explained : when we start the branding
plugin, the main window already exists. The method used is :
pluginComponentAdded and it use the method getContainer of the
component. The chat window, is instanced when we start a new
conversation and it use the osgiFilter.
Since the getContainer method always return the same value. The first
way to solve this problem is to use the value of the dictionary (added
when registered a new service) to check the newly added plugin. The
other way is to change the return value of getContainer.
With the event, I haven't found how to get the dictionary, so I use
the second method and it works (the patch is attached). But, is it
really necessary to have two about dialog ?
In the patch there is also a line to set the title to the splash
screen, before the title was "Java", now it's "SIP-Communicator".
about-menu.patch (3.03 KB)
2008/7/8 Yana Stamcheva <email@example.com>:
we have also noticed this bug. But, actually the registerMenuEntry registers
the About menu once for the main window and once for the chat window. The
bug must be somewhere else. If you find it, we'll be very happy to fix that.
Damien Roth wrote:
While working on my GSoC project, I noticed that in the Help menu the
about entry is in double.
I sought the source of the problem. It's located in the :
In the method "registerMenuEntry", the AboutWindow is registred twice,
but with different ids.
Is the double registration is really needed ?