From fac49ca862bce2d087bdc6c670bf211544c4162f Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 12 Dec 2017 15:01:23 -0500 Subject: [PATCH] 3330 fix version number for other applications --- .../org/sleuthkit/autopsy/casemodule/Case.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index d94e9a2707..3e287b81b6 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -998,8 +998,14 @@ public class Case { } } - private static String getAppNameWithVersion(){ - return String.format("%s %s", Version.getName(), Version.getVersion()); + private static String getNameForTitle(){ + if (UserPreferences.getAppName().equals(Version.getName())){ + //Available version number is version number for this application + return String.format("%s %s", UserPreferences.getAppName(), Version.getVersion()); + } + else { + return UserPreferences.getAppName(); + } } /** @@ -1078,7 +1084,7 @@ public class Case { * * [curent case display name] - [application name]. */ - mainFrame.setTitle(newCurrentCase.getDisplayName() + " - " + getAppNameWithVersion()); + mainFrame.setTitle(newCurrentCase.getDisplayName() + " - " + getNameForTitle()); }); } } @@ -1116,7 +1122,7 @@ public class Case { * Reset the main window title to be just the application name, * instead of [curent case display name] - [application name]. */ - mainFrame.setTitle(getAppNameWithVersion()); + mainFrame.setTitle(getNameForTitle()); }); } } @@ -1596,7 +1602,7 @@ public class Case { eventPublisher.publish(new AutopsyEvent(Events.CASE_DETAILS.toString(), oldCaseDetails, caseDetails)); if (RuntimeProperties.runningWithGUI()) { SwingUtilities.invokeLater(() -> { - mainFrame.setTitle(caseDetails.getCaseDisplayName() + " - " + getAppNameWithVersion()); + mainFrame.setTitle(caseDetails.getCaseDisplayName() + " - " + getNameForTitle()); try { RecentCases.getInstance().updateRecentCase(oldCaseDetails.getCaseDisplayName(), metadata.getFilePath().toString(), caseDetails.getCaseDisplayName(), metadata.getFilePath().toString()); } catch (Exception ex) {