Ticket #2265: copy-paste-in-reader.patch
File copy-paste-in-reader.patch, 5.3 KB (added by deni, 15 years ago) |
---|
-
src/main/java/org/sophie2/extra/func/scripting/view/InsertScriptFileItem.java
### Eclipse Workspace Patch 1.0 #P org.sophie2.extra.func.scripting
6 6 import org.sophie2.base.visual.skins.ElementSkinPart; 7 7 import org.sophie2.base.visual.skins.SkinPartDef; 8 8 import org.sophie2.base.visual.skins.VisualElementDef; 9 import org.sophie2.main.app.commons.book.BookView; 10 import org.sophie2.main.app.commons.util.AppViewUtil; 9 11 import org.sophie2.main.app.menus.edit.EditMenu; 10 12 11 13 /** … … 27 29 28 30 @Override 29 31 protected boolean computeEnabled() { 30 return true; 32 BookView bookView = AppViewUtil.getCurrentBookView(this); 33 return bookView != null && !bookView.getViewOptions().isPreviewMode(); 31 34 } 32 35 } -
src/main/java/org/sophie2/extra/func/scripting/view/InsertScriptItem.java
9 9 import org.sophie2.base.visual.skins.ElementSkinPart; 10 10 import org.sophie2.base.visual.skins.SkinPartDef; 11 11 import org.sophie2.base.visual.skins.VisualElementDef; 12 import org.sophie2.main.app.commons.book.BookView; 13 import org.sophie2.main.app.commons.util.AppViewUtil; 12 14 import org.sophie2.main.app.menus.edit.EditMenu; 13 15 14 16 /** … … 30 32 31 33 @Override 32 34 protected boolean computeEnabled() { 33 return true; 35 BookView bookView = AppViewUtil.getCurrentBookView(this); 36 return bookView != null && !bookView.getViewOptions().isPreviewMode(); 34 37 } 35 38 } -
src/main/java/org/sophie2/base/scene/helpers/HotTextElementHelper.java
#P org.sophie2.base.scene
102 102 HotHighlight selectionHighlight = new HotHighlight(new HotInterval(markPos, caretPos), 103 103 style); 104 104 105 106 if (isEditable) { 107 highlights = highlights.add(0, selectionHighlight); 108 } 105 highlights = highlights.add(0, selectionHighlight); 109 106 } 110 107 HotHighlightSet highlightSet = new HotHighlightSet(highlights); 111 108 -
src/main/java/org/sophie2/main/app/commons/element/ElementLogic.java
#P org.sophie2.main.app.commons
290 290 291 291 private static void handleCutOrCopy(VisualElement source, Operation operation) { 292 292 BookDocView docView = AppViewUtil.getCurrentBookDocView(source); 293 if (docView == null ) {294 return 293 if (docView == null || docView.bookView().get().getViewOptions().isPreviewMode()) { 294 return; 295 295 } 296 296 PageWorkArea workArea = docView.workArea().get(); 297 297 -
src/main/java/org/sophie2/main/app/menus/edit/UndoItem.java
#P org.sophie2.main.app.menus
30 30 31 31 @Override 32 32 protected boolean computeEnabled() { 33 return ((getCurrentBookDocView() != null) &&34 MetaChange.findRevToUndo(35 getCurrentBookDocView().getAccess()) != null);33 return getCurrentBookDocView() != null 34 && !getCurrentBookDocView().bookView().get().getViewOptions().isPreviewMode() 35 && MetaChange.findRevToUndo(getCurrentBookDocView().getAccess()) != null; 36 36 } 37 37 38 38 @Override -
src/main/java/org/sophie2/main/app/menus/edit/RedoItem.java
30 30 31 31 @Override 32 32 protected boolean computeEnabled() { 33 return (getCurrentBookDocView() != null) &&34 MetaChange.findRevToRedo(35 33 return getCurrentBookDocView() != null 34 && !getCurrentBookDocView().bookView().get().getViewOptions().isPreviewMode() 35 && MetaChange.findRevToRedo(getCurrentBookDocView().getAccess()) != null; 36 36 } 37 37 38 38 @Override -
src/main/java/org/sophie2/main/app/menus/edit/EditMenu.java
25 25 26 26 @Override 27 27 protected boolean computeEnabled() { 28 return getCurrentBook() != null && getCurrentBookWindow() != null 29 && !getCurrentBookWindow().getViewOptions().isPreviewMode(); 28 return getCurrentBookWindow() != null; 30 29 } 31 30 }