mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 09:47:42 +00:00
Merge pull request #3304 from wschaeferB/3330-CorrectlyNamedConfFile
3330 made UserPreferences.getAppName() just return the name again
This commit is contained in:
commit
91bd67a338
@ -998,6 +998,16 @@ public class Case {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the GUI to to reflect the current case.
|
* Update the GUI to to reflect the current case.
|
||||||
*/
|
*/
|
||||||
@ -1074,7 +1084,7 @@ public class Case {
|
|||||||
*
|
*
|
||||||
* [curent case display name] - [application name].
|
* [curent case display name] - [application name].
|
||||||
*/
|
*/
|
||||||
mainFrame.setTitle(newCurrentCase.getDisplayName() + " - " + UserPreferences.getAppName());
|
mainFrame.setTitle(newCurrentCase.getDisplayName() + " - " + getNameForTitle());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1112,7 +1122,7 @@ public class Case {
|
|||||||
* Reset the main window title to be just the application name,
|
* Reset the main window title to be just the application name,
|
||||||
* instead of [curent case display name] - [application name].
|
* instead of [curent case display name] - [application name].
|
||||||
*/
|
*/
|
||||||
mainFrame.setTitle(UserPreferences.getAppName());
|
mainFrame.setTitle(getNameForTitle());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1592,7 +1602,7 @@ public class Case {
|
|||||||
eventPublisher.publish(new AutopsyEvent(Events.CASE_DETAILS.toString(), oldCaseDetails, caseDetails));
|
eventPublisher.publish(new AutopsyEvent(Events.CASE_DETAILS.toString(), oldCaseDetails, caseDetails));
|
||||||
if (RuntimeProperties.runningWithGUI()) {
|
if (RuntimeProperties.runningWithGUI()) {
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
mainFrame.setTitle(caseDetails.getCaseDisplayName() + " - " + UserPreferences.getAppName());
|
mainFrame.setTitle(caseDetails.getCaseDisplayName() + " - " + getNameForTitle());
|
||||||
try {
|
try {
|
||||||
RecentCases.getInstance().updateRecentCase(oldCaseDetails.getCaseDisplayName(), metadata.getFilePath().toString(), caseDetails.getCaseDisplayName(), metadata.getFilePath().toString());
|
RecentCases.getInstance().updateRecentCase(oldCaseDetails.getCaseDisplayName(), metadata.getFilePath().toString(), caseDetails.getCaseDisplayName(), metadata.getFilePath().toString());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
@ -357,7 +357,7 @@ public final class UserPreferences {
|
|||||||
* @return Name of this program
|
* @return Name of this program
|
||||||
*/
|
*/
|
||||||
public static String getAppName() {
|
public static String getAppName() {
|
||||||
return preferences.get(APP_NAME, String.format("%s %s", Version.getName(), Version.getVersion()));
|
return preferences.get(APP_NAME, "Autopsy");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -188,7 +188,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
|
|||||||
* @throws IOException when the file does not exist.
|
* @throws IOException when the file does not exist.
|
||||||
*/
|
*/
|
||||||
private static File getInstallFolderConfFile() throws IOException {
|
private static File getInstallFolderConfFile() throws IOException {
|
||||||
String confFileName = Version.getName() + CONFIG_FILE_EXTENSION;
|
String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;
|
||||||
String installFolder = PlatformUtil.getInstallPath();
|
String installFolder = PlatformUtil.getInstallPath();
|
||||||
File installFolderEtc = new File(installFolder, ETC_FOLDER_NAME);
|
File installFolderEtc = new File(installFolder, ETC_FOLDER_NAME);
|
||||||
File installFolderConfigFile = new File(installFolderEtc, confFileName);
|
File installFolderConfigFile = new File(installFolderEtc, confFileName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user