[Jsxe-cvs] SF.net SVN: jsxe: [1165] trunk/jsxe
Status: Inactive
Brought to you by:
ian_lewis
|
From: <ian...@us...> - 2006-08-27 13:34:54
|
Revision: 1165 Author: ian_lewis Date: 2006-08-27 06:30:41 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1165&view=rev Log Message: ----------- merge from the 0.5pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/messages/messages.ru trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/Changelog 2006-08-27 13:30:41 UTC (rev 1165) @@ -1,3 +1,12 @@ +08/21/2006 Ian Lewis <Ian...@me...> + + * Updated russian translation. + +08/18/2006 Ian Lewis <Ian...@me...> + + * Added a hack to disable view specific actions that aren't implemented by + the view. + 08/17/2006 Ian Lewis <Ian...@me...> * Updated the German translation thanks to Dieter Steiner Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/messages/messages 2006-08-27 13:30:41 UTC (rev 1165) @@ -20,6 +20,7 @@ common.remove=Remove common.moveUp=Move Up common.moveDown=Move Down +common.find=Find common.ctrl=Ctrl common.alt=Alt Modified: trunk/jsxe/messages/messages.ru =================================================================== --- trunk/jsxe/messages/messages.ru 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/messages/messages.ru 2006-08-27 13:30:41 UTC (rev 1165) @@ -1,5 +1,5 @@ # JSXE English properties file -# $Id: +# $Id: messages 1158 2006-08-18 18:42:18Z ian_lewis $ # Maintained by Alexandr Gridnev (ale...@ya...) #:mode=properties: #:tabSize=4:indentSize=4:noTabs=true: @@ -20,11 +20,7 @@ common.remove=Удалить common.moveUp=Поднять common.moveDown=Опустить -common.cut=Вырезать -common.copy=Копировать -common.paste=Вставить -common.find=Искать... -common.findnext=Искать следующий +common.find=Искать common.ctrl=Ctrl common.alt=Alt @@ -73,6 +69,8 @@ Global.Options.network-always=Скачивать всегда, без спросу Global.Options.network=Скачивание DTD и схемы: Global.Options.Menu.Spill.Over=Меню выпадают после: +Global.Options.Undos.To.Remember=Запомнить действий: +Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe запомнит столько действий и потом их можно будет отменить.<BR> Однако он не может запомнить действия, выполненные после переключения видов</HTML> Shortcuts.Options.Title=Горячие клавиши Shortcuts.Options.Select.Label=Редактировать горячие клавиши: @@ -140,7 +138,10 @@ Tools.Menu=Инструменты Help.Menu=Справка -#{{{ File Menu Items + +#}}} + +#{{{ Action Labels new-file.label=Новый open-file.label=Открыть... File.Recent=Ранее открытые файлы @@ -148,16 +149,25 @@ save-file.label=Сохранить save-as.label=Сохранить как... reload-file.label=Открыть еще раз +File.Recent=Ранее открытые файлы close-file.label=Закрыть close-all.label=Закрыть все exit.label=Выход -#}}} +undo.label=Отменить +redo.label=Повторить +cut.label=Вырезать +copy.label=Копировать +paste.label=Вставить +find.label=Искать... +findnext.label=Искать далее + general-options.label=Глобальные опции... document-options.label=Опции документа... plugin-manager.label=Менеджер плагинов... validation-errors.label=Ошибки подтверждения... about-jsxe.label=О программе jsXe... + #}}} #{{{ Messages Modified: trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-27 13:30:41 UTC (rev 1165) @@ -33,6 +33,7 @@ import net.sourceforge.jsxe.util.Log; import net.sourceforge.jsxe.util.MiscUtilities; import net.sourceforge.jsxe.msg.PropertyChanged; +import net.sourceforge.jsxe.action.ViewSpecificAction; //}}} //{{{ Java classes Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-27 13:30:41 UTC (rev 1165) @@ -428,6 +428,7 @@ menubar.add(m_fileMenu); + createEditMenu(); menubar.add(m_editMenu); //Add View Specific Menus @@ -572,6 +573,86 @@ }//}}} + //{{{ createEditMenu() + + private void createEditMenu() { + m_editMenu = new JMenu(Messages.getMessage("Edit.Menu")); + m_editMenu.setMnemonic('E'); + + DocumentView view = getDocumentView(); + JMenuItem menuItem = new JMenuItem(ActionManager.getAction("undo")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("redo")); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + Action action = ActionManager.getAction("cut"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".cut"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("copy"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".copy"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("paste"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".paste"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + action = ActionManager.getAction("find"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".find"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("findnext"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".findnext"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + }//}}} + //{{{ createDefaultMenuItems() private void createDefaultMenuItems() { @@ -606,24 +687,7 @@ //}}} //{{{ Create Edit Menu - m_editMenu = new JMenu(Messages.getMessage("Edit.Menu")); - m_editMenu.setMnemonic('E'); - menuItem = new JMenuItem(ActionManager.getAction("undo")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("redo")); - m_editMenu.add(menuItem); - m_editMenu.addSeparator(); - menuItem = new JMenuItem(ActionManager.getAction("cut")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("copy")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("paste")); - m_editMenu.add(menuItem); - m_editMenu.addSeparator(); - menuItem = new JMenuItem(ActionManager.getAction("find")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("findnext")); - m_editMenu.add(menuItem); + createEditMenu(); //}}} //{{{ Create View Menu This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |