[Jsxe-cvs] SF.net SVN: jsxe: [1179] trunk/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-08-28 02:40:22
|
Revision: 1179 Author: ian_lewis Date: 2006-08-27 19:40:08 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1179&view=rev Log Message: ----------- Added option to show the full path to a file in the recent files menu Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java trunk/jsxe/src/net/sourceforge/jsxe/properties Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/Changelog 2006-08-28 02:40:08 UTC (rev 1179) @@ -7,6 +7,8 @@ * Updated the installer to create a script file in unix that uses the java in the environment path and use the HotSpot server so that jsXe runs faster at the cost of startup time and memory footprint. + * Added an option to display the full path to a file in the recent files + menu. Feature Request #1546371 08/21/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/messages/messages 2006-08-28 02:40:08 UTC (rev 1179) @@ -64,6 +64,8 @@ Global.Options.Title=General Global.Options.Max.Recent.Files=Recent files to remember: Global.Options.Max.Recent.Files.ToolTip=The maximum number of files that jsXe remembers in the recent files menu. +Global.Options.Recent.Files.Show.Full.Path=Show full path in Recent Files menu +Global.Options.Recent.Files.Show.Full.Path.ToolTip=If this checkbox is checked then the full path will be shown for files in the recent files menu. Global.Options.network-off=Always cache without asking Global.Options.network-cache=Ask first, then cache remote files Global.Options.network-always=Always download without asking Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -68,11 +68,13 @@ //{{{ OpenRecentFileAction constructor public OpenRecentFileAction(TabbedView parent, BufferHistory.BufferHistoryEntry entry) { String path = entry.getPath(); - String fileName = path.substring(path.lastIndexOf(System.getProperty("file.separator"))+1); + String fileName = path; + if (!jsXe.getBooleanProperty("recent.files.show.full.path", false)) { + fileName = path.substring(path.lastIndexOf(System.getProperty("file.separator"))+1); + } if (fileName.equals("")) { fileName = path; - } - putValue(Action.NAME, fileName); + }putValue(Action.NAME, fileName); m_view = parent; m_entry = entry; }//}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -556,6 +556,10 @@ createDefaultMenuItems(); updateMenuBar(); } + + if (msg.getKey().equals("recent.files.show.full.path")) { + updateRecentFilesMenu(); + } } /* Modified: trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -29,6 +29,7 @@ import net.sourceforge.jsxe.CatalogManager; import net.sourceforge.jsxe.gui.Messages; import javax.swing.JComboBox; +import javax.swing.JCheckBox; import javax.swing.JTextField; import java.util.Vector; //}}} @@ -123,6 +124,15 @@ //}}} + //{{{ Recent files full path + + boolean showFullPath = jsXe.getBooleanProperty("recent.files.show.full.path", false); + m_showFullPathCheckBox = new JCheckBox(Messages.getMessage("Global.Options.Recent.Files.Show.Full.Path"),showFullPath); + + addComponent(m_showFullPathCheckBox, Messages.getMessage("Global.Options.Recent.Files.Show.Full.Path")); + + //}}} + }//}}} //{{{ _save() @@ -143,6 +153,7 @@ //Bad input, don't save. } jsXe.setIntegerProperty("xml.cache",network.getSelectedIndex()); + jsXe.setBooleanProperty("recent.files.show.full.path", m_showFullPathCheckBox.isSelected()); CatalogManager.propertiesChanged(); }//}}} @@ -155,6 +166,7 @@ private JComboBox menuSpillOverComboBox; private JComboBox maxRecentFilesComboBox; private JTextField m_undosToRemember; + private JCheckBox m_showFullPathCheckBox; private JComboBox network; //}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 02:40:08 UTC (rev 1179) @@ -15,6 +15,8 @@ undo.limit=100 +recent.files.show.full.path=false + #{{{ Plugin Manager Default Dimensions #pluginmgr.x=100 #pluginmgr.y=100 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |