mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
444 Expose Application Directories via User Preferences (#458)
* Refactors DirectoryPreference from PLaylistPreference. Adds editor to PreferenceEditor for directories. Organizes preference editor tree. * Adds recording directory preference to editor and updates recording manager to dynamically use this property for recordings. * Adds event logs directory preference to editor and updates event log manager to dynamically use this property for event logging. * Adds application log directory preference. Updates logging to use user preference for application log directory. Moves logging initialization into the main application class and removes file based logging configs from the logback.xml configuration file. * Refactors application logging into its own class and adds prefeence update monitoring to dynamically stop/start the logger in the new directory location. * Adds streaming and screen capture directories to the user preferences editor and updates streaming and screen captures to dynamically adapt to user changes.
This commit is contained in:
@@ -33,7 +33,7 @@ import io.github.dsheirer.controller.channel.ChannelModel;
|
||||
import io.github.dsheirer.controller.channel.map.ChannelMapEvent;
|
||||
import io.github.dsheirer.controller.channel.map.ChannelMapModel;
|
||||
import io.github.dsheirer.preference.UserPreferences;
|
||||
import io.github.dsheirer.preference.playlist.FilePreferences;
|
||||
import io.github.dsheirer.preference.playlist.PlaylistPreference;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.util.ThreadPool;
|
||||
import org.slf4j.Logger;
|
||||
@@ -186,7 +186,7 @@ public class PlaylistManager implements Listener<ChannelEvent>
|
||||
*/
|
||||
private void save()
|
||||
{
|
||||
FilePreferences files = mUserPreferences.getFilePreferences();
|
||||
PlaylistPreference files = mUserPreferences.getPlaylistPreference();
|
||||
|
||||
PlaylistV2 playlist = new PlaylistV2();
|
||||
|
||||
@@ -239,7 +239,7 @@ public class PlaylistManager implements Listener<ChannelEvent>
|
||||
Files.delete(files.getPlaylistLock());
|
||||
}
|
||||
|
||||
mUserPreferences.getFilePreferences().setPlaylistLastAccessedPath(files.getPlaylist());
|
||||
mUserPreferences.getPlaylistPreference().setPlaylistLastAccessedPath(files.getPlaylist());
|
||||
}
|
||||
catch(IOException ioe)
|
||||
{
|
||||
@@ -256,7 +256,7 @@ public class PlaylistManager implements Listener<ChannelEvent>
|
||||
*/
|
||||
public PlaylistV2 load()
|
||||
{
|
||||
FilePreferences files = mUserPreferences.getFilePreferences();
|
||||
PlaylistPreference files = mUserPreferences.getPlaylistPreference();
|
||||
|
||||
PlaylistV2 playlist = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user