Improved the copy and move context menus to display a sensible value for each store.

This commit is contained in:
edwin%woudt.nl 1999-06-20 21:41:16 +00:00
Родитель a9a73c7fc2
Коммит 0e71ea2746
4 изменённых файлов: 29 добавлений и 4 удалений

Просмотреть файл

@ -517,8 +517,8 @@ public class FolderPanel extends GeneralPanel {
if (temp == null) {
try {
if ((aFolder.getFolder().getType() & goodMask) == goodMask) {
JMenuItem copyItem = new JMenuItem(folder.getName());
JMenuItem moveItem = new JMenuItem(folder.getName());
JMenuItem copyItem = new JMenuItem(aFolder.getName());
JMenuItem moveItem = new JMenuItem(aFolder.getName());
copyItem.addActionListener(new CopyMessageAction(folder));
moveItem.addActionListener(new MoveMessageAction(folder));
@ -528,8 +528,8 @@ public class FolderPanel extends GeneralPanel {
}
} catch (MessagingException e) {}
} else {
JMenu copyMenu = new JMenu(folder.getName());
JMenu moveMenu = new JMenu(folder.getName());
JMenu copyMenu = new JMenu(aFolder.getName());
JMenu moveMenu = new JMenu(aFolder.getName());
while (temp != null) {
buildMenus(temp, copyMenu, moveMenu);

Просмотреть файл

@ -17,6 +17,8 @@
* Netscape Communications Corporation. All Rights Reserved.
*
* Created: Will Scullin <scullin@netscape.com>, 2 Dec 1997.
*
* Contributors: Edwin Woudt <edwin@woudt.nl>
*/
package grendel.view;
@ -32,6 +34,12 @@ public interface ViewedFolder {
public Folder getFolder();
/**
* Returns the name of the associated folder
*/
public String getName();
/**
* Returns the ViewedFolder associated with the given folder.
* The Folder object inside the ViewedFolder may not be the

Просмотреть файл

@ -19,6 +19,7 @@
* Created: Will Scullin <scullin@netscape.com>, 2 Dec 1997.
*
* Contributors: Jeff Galyan <talisman@anamorphic.com>
* Edwin Woudt <edwin@woudt,nl>
*/
package grendel.view;
@ -96,6 +97,14 @@ class ViewedFolderBase implements ViewedFolder {
return fFolder;
}
/**
* Returns the name of the associated folder
*/
public String getName() {
return getFolder().getName();
}
/**
* Returns whether we think the folder is opened
*/

Просмотреть файл

@ -138,6 +138,14 @@ public class ViewedStoreBase extends ViewedFolderBase implements ViewedStore {
return ServerArray.GetMaster().get(fID).getDescription();
}
/**
* Returns the name for this store. This is the same as the description.
*/
public String getName() {
return getDescription();
}
/**
* Returns the protocol used by this store.
*/