Fixes order of assigning emoticons to the emoticon panel. Patch provided

by Toby Pinder.
cusax-fix
yanas 12 years ago
parent c6ad70e78f
commit eb1aabf257

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -103,7 +103,7 @@ public void setChat(ChatPanel chatPanel)
*/
private Dimension calculateGridDimensions(int itemsCount)
{
int gridRowCount = (int) Math.round(Math.sqrt(itemsCount));
int gridColCount = (int) Math.ceil(Math.sqrt(itemsCount));
/*
* FIXME The original code was "(int)Math.ceil(itemsCount/gridRowCount)".
@ -111,8 +111,8 @@ private Dimension calculateGridDimensions(int itemsCount)
* integers and, consequently, itemsCount/gridRowCount gives an integer.
* Was the intention to have the division produce a real number?
*/
int gridColCount = itemsCount / gridRowCount;
int gridRowCount = itemsCount / gridColCount;
return new Dimension(gridColCount, gridRowCount);
}
@ -306,7 +306,7 @@ public void popupMenuWillBecomeVisible(PopupMenuEvent e)
gridBagConstraints.anchor = GridBagConstraints.EAST;
gridBagConstraints.gridx = smileyIndex % gridColCount;
gridBagConstraints.gridy = smileyIndex % gridRowCount;
gridBagConstraints.gridy = (int)(Math.floor(smileyIndex / gridColCount)) % gridRowCount;
popupMenu.add(smileyItem, gridBagConstraints);
@ -353,4 +353,4 @@ public void loadSkin()
popupMenu.removeAll();
}
}
}
}

@ -39,13 +39,14 @@ public static Collection<Smiley> getDefaultSmileyPack()
"Sad"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY2",
new String[] {"(angel)" }, "Angel"));
new String[] {"(angry)"}, "Angry"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY3",
new String[] {":-*", ":*", "(kiss)"}, "Kiss"));
new String[] {"(n)", "(N)" }, "No"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY4",
new String[] {":-0", "(shocked)"}, "Shocked"));
new String[] {":-))", ":))", ";-))", ";))", "(lol)", ":-D", ":D",
";-D", ";D"}, "Laughing"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY5",
new String[] { ";-((", ";((", ";-(", ";(", ":'(", ":'-(",
@ -55,14 +56,13 @@ public static Collection<Smiley> getDefaultSmileyPack()
new String[] {"&lt;3", "(L)" , "(l)", "(H)", "(h)"}, "In love"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY7",
new String[] {"(blush)"}, "Blushing"));
new String[] {"(angel)" }, "Angel"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY8",
new String[] {":-P", ":P", ":-p", ":p" }, "Tongue out"));
new String[] {"(bomb)"}, "Exploding"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY9",
new String[] {":-))", ":))", ";-))", ";))", "(lol)", ":-D", ":D",
";-D", ";D"}, "Laughing"));
new String[] {"(chuckle)" }, "Chuckle"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY10",
new String[] {"(y)", "(Y)", "(ok)"}, "Ok"));
@ -71,13 +71,13 @@ public static Collection<Smiley> getDefaultSmileyPack()
new String[] {";-)", ";)", ":-)", ":)"}, "Smile"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY12",
new String[] {"(sick)"}, "Sick"));
new String[] {"(blush)"}, "Blushing"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY13",
new String[] {"(n)", "(N)" }, "No"));
new String[] {":-*", ":*", "(kiss)"}, "Kiss"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY14",
new String[] {"(chuckle)" }, "Chuckle"));
new String[] {"(search)"}, "Searching"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY15",
new String[] {"(wave)" }, "Waving"));
@ -86,13 +86,13 @@ public static Collection<Smiley> getDefaultSmileyPack()
new String[] {"(clap)"}, "Clapping"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY17",
new String[] {"(angry)"}, "Angry"));
new String[] {"(sick)"}, "Sick"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY18",
new String[] {"(bomb)"}, "Exploding"));
new String[] {":-P", ":P", ":-p", ":p" }, "Tongue out"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY19",
new String[] {"(search)"}, "Searching"));
new String[] {":-0", "(shocked)"}, "Shocked"));
defaultSmileyList.add(new SmileyImpl("service.gui.smileys.SMILEY20",
new String[] {"(oops)"}, "Oops"));
@ -124,4 +124,4 @@ public static void reloadResources()
{
defaultSmileyPack = null;
}
}
}
Loading…
Cancel
Save