Skip to content

Commit

Permalink
Use APP_NAME from spark.properties instead of APPLICATION_NAME from d…
Browse files Browse the repository at this point in the history
…efault.properties
  • Loading branch information
stokito committed Aug 31, 2024
1 parent 06cafbd commit 285c857
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jivesoftware/LoginDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void invoke(final JFrame parentFrame) {

// Construct Dialog
EventQueue.invokeLater(() -> {
loginDialog = new JFrame(Default.getString(Default.APPLICATION_NAME));
loginDialog = new JFrame(JiveInfo.getName());
loginDialog.setIconImage(SparkManager.getApplicationImage().getImage());
LoginPanel loginPanel = new LoginPanel();
final JPanel mainPanel = new LoginBackgroundPanel();
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jivesoftware/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public final class MainWindow extends ChatFrame implements ActionListener {
*/
public static synchronized MainWindow getInstance() {
if (null == singleton) {
singleton = new MainWindow(Default.getString(Default.APPLICATION_NAME), SparkManager.getApplicationImage());
singleton = new MainWindow(JiveInfo.getName(), SparkManager.getApplicationImage());
}
return singleton;
}
Expand Down Expand Up @@ -713,7 +713,7 @@ private void setAboutBoxPane() {

// Construct About Box text
StringBuilder aboutBoxText = new StringBuilder();
aboutBoxText.append(Default.getString(Default.APPLICATION_NAME)).append(" ").append(JiveInfo.getVersion());
aboutBoxText.append(JiveInfo.getName()).append(" ").append(JiveInfo.getVersion());

// Add APPLICATION_INFO1 if not empty
if (!("".equals(APPLICATION_INFO1))) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jivesoftware/gui/LoginUIPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public void invoke(final JFrame parentFrame) {
} catch (Exception e) {
Log.error(e);
}
loginDialog = new JFrame(Default.getString(Default.APPLICATION_NAME));
loginDialog = new JFrame(JiveInfo.getName());

// Construct Dialog
EventQueue.invokeLater(() -> {
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/org/jivesoftware/resource/Default.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class Default {
private static final Map<String,ImageIcon> cache = new HashMap<>();

public static final String MAIN_IMAGE = "MAIN_IMAGE";
public static final String APPLICATION_NAME = "APPLICATION_NAME";
public static final String APPLICATION_INFO1 = "APPLICATION_INFO1";
public static final String APPLICATION_INFO2 = "APPLICATION_INFO2";
public static final String APPLICATION_INFO3 = "APPLICATION_INFO3";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void updateResourceVersion()
boolean isSelected = useVersionAsResourceBox.isSelected();
if ( isSelected )
{
String resource = Default.getString( Default.APPLICATION_NAME ) + " " + JiveInfo.getVersion();
String resource = JiveInfo.getName() + " " + JiveInfo.getVersion();
resourceField.setText( resource );
useHostnameAsResourceBox.setSelected( false );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.jivesoftware.spark.ui.status.StatusItem;
import org.jivesoftware.spark.util.log.Log;
import org.jivesoftware.sparkimpl.plugin.manager.Enterprise;
import org.jivesoftware.sparkimpl.settings.JiveInfo;
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
import org.jivesoftware.smackx.chatstates.ChatStateListener;
Expand Down Expand Up @@ -253,7 +254,7 @@ public void connectionClosedOnError(Exception arg0) {


trayIcon = new TrayIcon(availableIcon.getImage(),
Default.getString(Default.APPLICATION_NAME), null);
JiveInfo.getName(), null);
trayIcon.setImageAutoSize(true);

trayIcon.addMouseListener(new MouseListener() {
Expand Down
1 change: 0 additions & 1 deletion core/src/main/resources/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# The Login image
# suggested image dimensions 244 x 188 pixels
MAIN_IMAGE = images/spark.gif
APPLICATION_NAME = Spark
SHORT_NAME = Spark

USER_DIRECTORY_WINDOWS = Spark
Expand Down

0 comments on commit 285c857

Please sign in to comment.