605 Commits

Author SHA1 Message Date
8bceaba5ad SPARK-2265: Fix sorting MUC rooms by occupant
Instead of sorting alphabetically, the sort order of the 'occupant count' column should be numeric.
2022-05-03 10:33:48 +02:00
2c99a4d165 SPARK-2264: Use nickname in bookmark if set
Bookmarks can have an optional ‘nickname’ element. When joining a chat room from a bookmark, Spark should use the nickname, if it’s present.
2022-05-03 10:32:57 +02:00
51fda25477 SPARK-2263: Fallback to room JID if bookmark has no name
In the ‘Bookmarks’ drop down menu, all bookmarks are shown by their name.

Bookmarks set by some other clients (like Conversations) do not have a name. This causes the bookmark to show as an empty text.

If this happens, Spark should use another value, like the localpart of the room JID.
2022-05-03 10:32:57 +02:00
1833d7e299 Add debug logging for startup timing
This adds log lines that will help show how long particular bits of the initial startup take.

No functional changes are introduced by this commit.
2022-05-03 10:32:42 +02:00
85be64fabd SPARK-2257: Make execution on Event Dispatch Thread more explicit
Swing event handling code runs on a special thread known as the event dispatch thread. Most code that invokes Swing methods also runs on this thread. This is necessary because most Swing object methods are not "thread safe": invoking them from multiple threads risks thread interference or memory consistency errors. Some Swing component methods are labelled "thread safe" in the API specification; these can be safely invoked from any thread. All other Swing component methods must be invoked from the event dispatch thread. Programs that ignore this rule may function correctly most of the time, but are subject to unpredictable errors that are difficult to reproduce.

It's useful to think of the code running on the event dispatch thread as a series of short tasks. Most tasks are invocations of event-handling methods, such as ActionListener.actionPerformed. Other tasks can be scheduled by application code, using invokeLater or invokeAndWait. Tasks on the event dispatch thread must finish quickly; if they don't, unhandled events back up and the user interface becomes unresponsive.

Spark should make clear what code is, and what code is not supposed to be executed on the Event Dispatch thread. This will help reduce instances where the UI seems frozen for prolonged periods of time, or otherwise behaves in an unexpected manner.

This commit adds comments to various methods (particularly around the login sequence) that define if the method is to be executed on the Event Dispatch Thread. Also, when ran in debug mode, code-checks will fail-fast, if such methods are executed differently. This will help spot problems.
2022-05-03 10:31:50 +02:00
9f990c92b2 Refactor thread-safety on MainWindow.getInstance()
This removes an unneeded lock object, replacing it with a traditional synchronized keyword.

No functional changes should be introduced by this change.
2022-05-03 10:31:34 +02:00
9301aefe79 Merge pull request #666 from Flowdalic/boolean-form-field-fixes
Boolean form field fixes
2022-03-03 10:27:36 +03:00
9bab11e3d4 Remove this logic once Spark uses Smack 4.4.5 2022-03-03 10:23:15 +03:00
aad38d6826 SPARK-2259 XStream ForbiddenClassException in CustomStatusItem Class 2022-03-02 14:20:18 +03:00
3821d04ec0 Merge pull request #679 from Plyha/tee
Change appearance layout
2022-01-30 16:35:18 +03:00
5c0ebd3317 Update ThemePanel.java 2022-01-30 16:31:27 +03:00
5cb786ad7b The resource must not be hard-coded
The resource must not be hard-coded. you need to use "get" to get the name of the resource.
2022-01-30 14:35:15 +03:00
b4b9361f3e SPARK-2182 2022-01-30 13:47:42 +03:00
7047fc6fa9 Add translation for all Language 2022-01-26 16:08:22 +03:00
0e43a5b896 SPARK-2116 Add an option to set how many previous messages should be shown in a chat window
Add GUI for this PR - https://github.com/igniterealtime/Spark/pull/475
2022-01-26 15:53:04 +03:00
885544c85b fix typo 2022-01-23 22:13:48 +03:00
f14b0d4e44 SPARK-1918 Emoticons packs are not updated after the upgrade
Replace Emoticons  that have a different md5-hash than its correspondant in install\spark\xtra\emoticons .

These methods are taken from PluginManager.java
2022-01-23 16:55:02 +03:00
55d4ae066c SPARK-2252 2022-01-11 23:26:34 +03:00
665bc9da60 Update LocalPreferences.java 2022-01-11 12:01:22 +03:00
53f38a20a9 Update LocalPreferences.java 2022-01-11 11:04:12 +03:00
b7f85c76db SPARK-2203 2022-01-11 10:53:10 +03:00
c1f1ad94a5 fix for verify that the registry value exists before deleting it
for https://github.com/igniterealtime/Spark/pull/670/
2022-01-08 01:23:31 +03:00
afb4dfcca6 Merge pull request #669 from Plyha/path1233
SPARK-2128 SPARK-2160 Fix lang for java 8-17
2022-01-08 00:26:18 +03:00
4dff8eae47 Update SettingsManager.java 2022-01-07 23:56:55 +03:00
42e2e3c752 Verify that the registry value exists before deleting it 2022-01-07 22:48:22 +03:00
de63ff0750 Replace the deprecated WinRegistry class with JNA 2022-01-07 21:36:41 +03:00
9f37520a6d SPARK-2128 Fix lang for java 8-17 2022-01-06 21:21:46 +03:00
2d6af4dcad correct a typo 2021-12-29 18:49:19 +03:00
a474ea2809 SPARK-2249 Add translation for hours, min to Awaytime
The name of Away time(h,min) is now hardcoded, it would be useful if it changed with the language.
2021-12-29 12:37:36 +03:00
3971197503 DataFormUI: fix boolean form field logic 2021-12-27 21:15:46 +01:00
09ef6f5aad DataFormDialog: fix boolean form field logic 2021-12-27 21:15:18 +01:00
a0c9cc0f28 DataFormUI: fix boolean form field handling
Boolean form fields are not only true if their value is "1", but also
if their value is "true". The new form field API of Smack does already
handle this correctly.
2021-12-27 18:34:13 +01:00
72fc1e61e5 UserSearchForm: refine searchServices type 2021-12-27 18:33:42 +01:00
3b8b401466 SPARK-2241: Allow SoundPreferences class to be deserialized
The XStream library that takes care of deserializing XML data to a class instance needs to be configured to allow certain classes to be instantiated.
2021-12-20 10:43:07 +01:00
957157115a [core] Fix VCardUpdateExtension.Provider
Fixes

java.lang.IllegalStateException: Illegal to call getName() when event type is CHARACTERS. Valid states are START_ELEMENT, END_ELEMENT
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getName(XMLStreamReaderImpl.java:938)
	at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getQName(StaxXmlPullParser.java:123)
	at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getName(StaxXmlPullParser.java:117)
	at org.jivesoftware.sparkimpl.profile.ext.VCardUpdateExtension$Provider.parse(VCardUpdateExtension.java:75)
	at org.jivesoftware.sparkimpl.profile.ext.VCardUpdateExtension$Provider.parse(VCardUpdateExtension.java:62)
	at org.jivesoftware.smack.provider.Provider.parse(Provider.java:53)
	at org.jivesoftware.smack.util.PacketParserUtils.parseExtensionElement(PacketParserUtils.java:834)
	at org.jivesoftware.smack.util.PacketParserUtils.parsePresence(PacketParserUtils.java:477)
	at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:115)
	at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1457)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java:130)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:969)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
	at java.lang.Thread.run(Thread.java:748)
2021-12-15 15:54:36 +01:00
8210deb9a0 Merge pull request #623 from Flowdalic/smack-4.4
Bump Smack to 4.4
2021-12-15 15:37:45 +03:00
03a503a0b9 SPARK-2063 SPARK-2120 The size of the text should change in the message history and in the writing area 2021-12-13 13:43:29 +03:00
918b8c5121 [core] Fix JabberAvatarExtension.Provider
Fixes

WARNING: Failed to parse extension element in Presence stanza: PresenceBuilder(id='3CKfX-105' from='SOMEONE@igniterealtime.org' to='HIDDEN@igniterealtime.org/octarine' language='en-US' type='unavailable' Extension Elements[{vcard-tempupdate}x])
java.lang.IllegalStateException: Illegal to call getName() when event type is CHARACTERS. Valid states are START_ELEMENT, END_ELEMENT
	at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getName(XMLStreamReaderImpl.java:938)
	at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getQName(StaxXmlPullParser.java:123)
	at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getName(StaxXmlPullParser.java:117)
	at org.jivesoftware.sparkimpl.profile.ext.JabberAvatarExtension$Provider.parse(JabberAvatarExtension.java:69)
	at org.jivesoftware.sparkimpl.profile.ext.JabberAvatarExtension$Provider.parse(JabberAvatarExtension.java:56)
	at org.jivesoftware.smack.provider.Provider.parse(Provider.java:53)
	at org.jivesoftware.smack.util.PacketParserUtils.parseExtensionElement(PacketParserUtils.java:834)
	at org.jivesoftware.smack.util.PacketParserUtils.parsePresence(PacketParserUtils.java:477)
	at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:115)
	at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1457)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java:130)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:969)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913)
	at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
	at java.lang.Thread.run(Thread.java:748)
2021-11-04 09:50:02 +01:00
e120b27087 Merge pull request #647 from Plyha/SPARK-2213-fix-adding-users-to-the-room
SPARK-2313 fix adding users to the room
2021-10-27 11:33:01 +03:00
3d32ce25bc Update ConferenceServices.java 2021-10-27 11:28:34 +03:00
bb99336bd3 Merge pull request #650 from Plyha/Spark-2208-use-name-from-search-results
Spark-2208
2021-10-27 10:12:59 +03:00
e515b34ad1 Spark-2208
Spark should use full name for event in chat  for user from search if possible.
2021-10-27 10:12:01 +03:00
ec1a948ef8 Merge pull request #649 from Plyha/replace-old-icons1
replace old links with icons
2021-10-26 22:13:51 +03:00
c3ddf2cca2 replace old links with icons 2021-10-26 22:13:26 +03:00
2db203989b Spark-2208-use name from search results 2021-10-26 21:47:50 +03:00
b8be99955e Spark-2213 2021-10-26 19:42:54 +03:00
4e24461af6 SPARK 2213 2021-10-26 19:30:19 +03:00
09529f3f49 Spark-2213 2021-10-26 19:25:15 +03:00
b2c76c5ca9 SPARK-2313 fix adding users to the room 2021-10-26 17:41:34 +03:00
de36dad3fa Replace old icons(folder.png) 2021-10-22 20:14:10 +03:00