Package com.mucommander.conf

Examples of com.mucommander.conf.MuPreferencesAPI


        String[]      folderPaths; // Paths to the initial folders.
       
        // Snapshot configuration
        Configuration snapshot = MuConfigurations.getSnapshot();
        // Preferences configuration
        MuPreferencesAPI preferences = MuConfigurations.getPreferences();
       
        // Checks which kind of initial path we're dealing with.
        isCustom = preferences.getVariable(MuPreference.STARTUP_FOLDERS, MuPreferences.DEFAULT_STARTUP_FOLDERS).equals(MuPreferences.STARTUP_FOLDERS_CUSTOM);

        // Handles custom initial paths.
        if (isCustom) {
          folderPaths = new String[] {(folderPanelType == FolderPanelType.LEFT ? preferences.getVariable(MuPreference.LEFT_CUSTOM_FOLDER) :
            preferences.getVariable(MuPreference.RIGHT_CUSTOM_FOLDER))};
        }
        // Handles "last folder" initial paths.
        else {
          // Set initial path to each tab
          int nbFolderPaths = snapshot.getIntegerVariable(MuSnapshot.getTabsCountVariable(window, folderPanelType == FolderPanelType.LEFT));
View Full Code Here


     *               {@link #@link com.mucommander.ui.main.FolderPanel.FolderPanelType.RIGHT}).
     * @return       the user's initial path for the specified frame.
     */
    protected FileURL getInitialPath(FolderPanelType folderPanelType) {
        // Preferences configuration
        MuPreferencesAPI preferences = MuConfigurations.getPreferences();
       
        // Checks which kind of initial path we're dealing with.
        boolean isCustom = preferences.getVariable(MuPreference.STARTUP_FOLDERS, MuPreferences.DEFAULT_STARTUP_FOLDERS).equals(MuPreferences.STARTUP_FOLDERS_CUSTOM);

        String customPath = null;
        // Handles custom initial paths.
        if (isCustom) {
          customPath = (folderPanelType == FolderPanelType.LEFT ?
              preferences.getVariable(MuPreference.LEFT_CUSTOM_FOLDER)
              : preferences.getVariable(MuPreference.RIGHT_CUSTOM_FOLDER));
        }

        AbstractFile result = null;
        if (customPath == null || (result = FileFactory.getFile(customPath)) == null || !result.exists())
          result = getHomeFolder();
View Full Code Here

TOP

Related Classes of com.mucommander.conf.MuPreferencesAPI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.