[sip-comm-dev] GUI Skin


#1

Hi Yana,

here I am once again with a new patch. I've changed the whole chat
window so it's now skinnable ;).

I've made also some other small modifications:
1.) google-chrome added as browser for linux.(Note: I think that firefox
should not be the first browser in the list cause it is installed by
default on "all" linux machines and users are installing their own
browsers cause they want to use them as default...)
2.) :smiley: smiley added - is a very common smiley for our geographic
locations :wink:

Hopefully you'll like it.

Cheers,
Adam

Chat.patch (74.7 KB)

···

On 09/26/2010 11:43 AM, Yana Stamcheva wrote:

On Sep 25, 2010, at 7:17 PM, Adam Netocny wrote:

Hi Yana,

here is the next patch. All classes from contactlist are now skinnable :wink:
    

Great, I'll try to integrate it asap.

I'm going to make a trip tomorrow so I'll will not reachable for one
week. Have a nice week. :slight_smile:
    

Thanks:) Have a nice trip!

Cheers,
Adam

On 09/24/2010 06:47 PM, Yana Stamcheva wrote:
    

Hi Adam,

Thanks again! Your patch is committed and ack-ed.

I had a few issues regarding the skin selector combo box, which took me some time to resolve, but now it's fixed. It revealed to be a problem caused by some operations not executed on the Event Dispatch Thread.

Otherwise I've fixed also some minor issues as follows (some of them could be Mac related):

- when selected the demo skin title and description were cut and therefore not visible

- a minor optimization - if the user tries to select the currently selected skin, we don't install it again, instead we do nothing

- the skin selector popup menu was stealing the focus of the "Add new skin" window

- the remove button was staying disabled if we choose to cancel the "Add new skin" window, even if the skin selected wasn't the default one

I've also made some minor code optimizations, hope you don't mind.

Let me know if it's working for you.

Cheers,
Yana

On Sep 22, 2010, at 1:52 PM, Adam Netocny wrote:

Hi Yana,

here is the patch for skinmanager. It is using only Activator, Resources
and Comparator classes from the old one so you can delete all other
classes. :wink:

Cheers,
Adam

On 09/21/2010 07:11 PM, Yana Stamcheva wrote:

Hi Adam,

I've implemented the modifications we agreed upon and the patch is ready for commit. I've just one more question here. I agreed when you said that we don't need to reload images on each repaint. This is absolutely right and your suggestion to use GuiReloadable reveals very good btw. However I'm now wondering why (and how) did you choose to now use the GuiReloadable, but the validate and repaint methods instead for the following classes:

AbstractCallToggleButton

CallHistoryButton

AddContactDialog

AccountStatusPanel

AccountDetailsPanel

FramedImage

PopupNotificationPanel

Cheers,
Yana

On Sep 21, 2010, at 2:48 PM, Adam Netocny wrote:

Hi Yana,
On 09/21/2010 11:29 AM, Yana Stamcheva wrote:

Hi Adam,

On Sep 20, 2010, at 6:33 PM, Adam Netocny wrote:

Hi Yana,
On 09/20/2010 04:25 PM, Yana Stamcheva wrote:

Hi Adam,

I've applied the patch and except from one ConcurrentModificationException in GuiUtils (that I've fixed by synchronizing the RELOAD_LIST operations) everything works fine. However in order to better understand the modifications I have a few questions.

I was wondering why sometimes you override validate() and repaint() (as in the AccountStatusPanel) and sometimes you implement the GuiReloadable interface instead. Does we really need the GuiReloadable interface or we could always use the validate() and repaint() methods?

Firstly we need to reload loaded resources in non-gui classes, e.g.
ImageLoader, these classes don't have repaint or validate methods.
Secondly we don't have to reload images on each repaint. They are stored
in jar files and it also takes some time to load them. So with
GuiReloadable they are reloaded only when repaintUI() is called (after
skin change).

Ok, I agree.

Do we really need to add all components in a RELOAD_LIST ? Couldn't we use the component hierarchy and when reloading the frame to automatically reload all contained components?

I think that the GuiReloadable interface (if we really need it) could be placed in the gui service package instead of the util package.

I agree.

Would you prefer to make the changes yourself or would you like me to make the modifications?

I'm currently working on the skinmanager plugin so it will be very nice
from you if you make it ;). Btw. the manager is almost ready.

Cheers,
Adam

Cheers,
Yana

Cheers,
Adam

Thanks!
Yana

On Sep 18, 2010, at 9:17 PM, Adam Netocny wrote:

Hi Yana,

Thanks for the answer. Here is the first patch. It can now reload and
repaint almost the whole main window and some other components. + one
new interface + demo skin to show changes.

Cheers,
Adam

On 09/18/2010 06:38 PM, Yana Stamcheva wrote:

Hi Adam,

The TreeContactList and all its related classes (DefaultTreeContactList, ContactListTreeCellRenderer, ContactListTreeModel) are now used for the main/contact list window. Other contact list classes that are JList based are there first for historical reasons (this was the previous version of the contact list) and second because they're still used in invitation dialogs to represent a contact list to choose from. You can find references to the JList based contact list in ChatRoomMemberListPanel, InviteDialog, OneChoiceInviteDialog. In the user interface you could find these by pressing "Invite" button in the chat window, the same invite in a call and transfer call dialog.

Hope this helps,
Yana

On Sep 18, 2010, at 6:20 PM, Adam Netocny wrote:

Hi Yana,

another question.
Contactlist has two render classes. ContactListCellRenderer and
ContactListTreeCellRenderer. Which one is used for what? Which
contaclist is used tree or normal? etc. Best if you could tell me all
you know about contaclist. :wink: Thanks.

Cheers,
Adam

On 09/18/2010 04:43 PM, Yana Stamcheva wrote:

Adam,

Hm, I don't see listeners there, in these methods are registered the menu items for MacOSX. However, I don't think that we could or should repaint these. Apple system menus don't have any additional decoration and should stay as it is.

Cheers,
Yana

On Sep 18, 2010, at 4:22 PM, Adam Netocny wrote:

Hi Yana,
On 09/18/2010 04:12 PM, Yana Stamcheva wrote:

Hi Adam,

I'm not sure if this is what you're asking for, but if you check net.java.sip.communicator.impl.gui.main.menus.FileMenu you'll find:

registerMenuItemMacOSX - which is called by ToolsMenu in order to register the preferences menu item for MacOSX

and

registerCloseMenuItemNonMacOSX for the quit menu item.

Yeah, I know but these two classes are registering some kind of
application listeners and are not generating menu item. The question is
whether there are generated menu items to be repainted or not.

Thanks,
Adam

Hope this helps,
Yana

On Sep 18, 2010, at 3:16 PM, Adam Netocny wrote:

Hi Yana,

I've got one question.
What is this Mac OS specific menu registering(Quit and Preferences menu
items)? Are these menu items there or are they added by the system or
what? Cause there are only listener registered and not menu items. Thanks.

Cheers,
Adam

On 09/17/2010 06:28 PM, Yana Stamcheva wrote:

Hi Adam,

Don't worry at all! If you need any help don't hesitate to drop me a note.

Cheers,
Yana

On Sep 17, 2010, at 5:54 PM, Adam Netocny wrote:

Hi Yana,
On 09/15/2010 06:21 PM, Yana Stamcheva wrote:

Adam,

It works great! Committed it in r7708.

Cheers,
Yana

On Sep 15, 2010, at 6:01 PM, Adam Netocny wrote:

Hi Yana,

here is the patch for the SIPCommFrame class for now so we can at least
change window colors and icons. Other classes till Friday. :wink:

Cheers,
Adam

On 09/15/2010 05:09 PM, Yana Stamcheva wrote:

Hi Adam,

On Sep 15, 2010, at 3:14 PM, Adam Netocny wrote:

So, the problem is that it works but we need to rewrite some classes to
reload their properties if repaint or validate method is called, cause
e.g. SIPCommFrame.MainContentPane loads properties in the constructor
and not on each repaint. I've started to rewrite these classes and will
prepare a patch till Friday.

Oh, ok.

Sometimes when activating/ deactivating skins I'm getting the following NullPointerException:

I really don't know what it is. Are you activating skins in the plugin
manager or skin manager?

In the skin manager. The bundle apparently is null in some cases, but it doesn't appear all the time.

[java] java.lang.NullPointerException
[java] at net.java.sip.communicator.plugin.pluginmanager.PluginListCellRenderer.getTableCellRendererComponent(PluginListCellRenderer.java:149)
[java] at javax.swing.JTable$AccessibleJTable.getAccessibleChild(JTable.java:7023)
[java] at javax.swing.JTable$AccessibleJTable.getAccessibleAt(JTable.java:7410)
[java] at javax.swing.JTable$AccessibleJTable.valueChanged(JTable.java:6923)
[java] at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
[java] at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:137)
[java] at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:668)

And here's a list of very minor modifications I've made to your patch. Hope you'd agree with them:

- moved SwintUtil methods to GuiUtils, as this is where we currently keep ui related utility methods.

- renamed repaintUITree to repaintUI, as ui tree sounds like swing specific term

I agree.

- fixed a NullPointerException in : ResourceManagementServiceImpl.serviceChanged(ResourceManagementServiceImpl.java:283)

Thanks. My bad. :wink:

I'm thinking that we should probably disable the feature until it's more stable. We could just comment the skin config form registration for now. WDYT?

As I said the repaint will be done till Friday so I think that it is not
necessary to disable this feature. But we should prepare the new skin
manager.

I have to apologize cause I'm still not done with all the changes. It's
quiet complicated cause I have to change at least 30-50 classes. I'll
contact you after all necessary changes will be done.

Cheers,
Adam

Ok, that'll be great.

Thanks!
Yana

Cheers,
Adam

Cheers,
Yana

Cheers,
Adam

---------------------------------------------------------------------
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

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

<SIPCommFrame.patch>---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

<Repaint.patch><src.zip><demo.zip>---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

---------------------------------------------------------------------
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

<patch.patch><src.zip>---------------------------------------------------------------------
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

<ContactList.patch>---------------------------------------------------------------------
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