[sip-comm-dev] implementation of the systray plugin


#1

Hello,

I am the student in charge of the systray plugin.
In order to code the right-click menu properly, it would be logical to
use the same internationalized strings (I18NString) than the GUI.
However, the classes needed are in the /impl/gui/ directory, which
doesn't allow me to use them (if I understand correctly how
sip-communicators works - i can use the classes in /service/).

I think that the class ImageLoader (to put some icons in the menu)
suffer of the same problem.

If my questions have some sense, is there a way to solve this situation ?

Thank you in advance for your help
Nicolas Chamouard

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Nicolas,

Nicolas Chamouard wrote:

Hello,

I am the student in charge of the systray plugin.

For those unaware of the context - we've been giving student projects locally (in Louis Pasteur University) consisting in implementing various plugins. Nicolas has volunteered to work on extended support for the OS systray.

In order to code the right-click menu properly, it would be logical to
use the same internationalized strings (I18NString) than the GUI.
However, the classes needed are in the /impl/gui/ directory, which
doesn't allow me to use them (if I understand correctly how
sip-communicators works - i can use the classes in /service/).

In fact we don't have a global internationalization mechanism, so the mechanism used in the GUI is for internal use only. Each plugin should do the internationalization on its own. You could see how it's done in the icqaccregwizz plugin.

I think that the class ImageLoader (to put some icons in the menu)
suffer of the same problem.
If my questions have some sense, is there a way to solve this situation ?

All images you use should be stored in resources/images/plugin/thenameofyourplugin/. To access the image you could use the same mechanism as in icqaccregwizz plugin. (there images are stored locally and this is not correct, but the mechanism that you should use to access images is the same).

Thank you in advance for your help
Nicolas Chamouard

Good luck,
Yana

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hello all,

I following up on Nicolas's mail because we're having the same
problem. We would like to use images in the menu for our plugin but
I'm a little confused still as to how to really implement that.

So, we should store our resources (images) in
resources/images/plugin/thenameofyourplugin/ but use the same
principle used in the icqaccregwizz plugin. Here are the steps I
took.
- I stored an image in resources/images/plugin/contactmailer/
- I created a resources.properties file in the package of my plugin
- I copied the Resources.java file and also put it in the package of my plugin

Now the question is, how do I access the file? Which path should
replace the one in Resources.java for the private static final String
BUNDLE_NAME and the one in resources.properties?

Now, if anyone has any idea, please share. Thanks

Max

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi Max,

Max Catelin wrote:

Hello all,

I following up on Nicolas's mail because we're having the same
problem. We would like to use images in the menu for our plugin but
I'm a little confused still as to how to really implement that.

So, we should store our resources (images) in
resources/images/plugin/thenameofyourplugin/ but use the same
principle used in the icqaccregwizz plugin. Here are the steps I
took.
- I stored an image in resources/images/plugin/contactmailer/
- I created a resources.properties file in the package of my plugin
- I copied the Resources.java file and also put it in the package of my plugin

That's correct.

Now the question is, how do I access the file? Which path should
replace the one in Resources.java for the private static final String
BUNDLE_NAME and the one in resources.properties?

I'm not sure I understand the question. The BUNDLE_NAME for you should be: net.java.sip.communicator.plugin.contactmailer.resources - this points to the resources.properties file and has nothing to do with your image path. In the resources.properties file you should have something like this:

myIcon=net/java/sip/communicator/resources/images/myplugin/myIcon.jpg

and in the code, when you would like to use this icon you could make:

Resources.getImage("myIcon")

In the icqaccregwizz we have made an ImageID object in plus, but you could use simply a string.

Now, if anyone has any idea, please share. Thanks

Max

Yana

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net