src/Tools/jEdit/patches/macosx
changeset 71932 65fd0f032a75
parent 71931 0c8a9c028304
child 71933 aec0f7b58cc6
--- a/src/Tools/jEdit/patches/macosx	Wed Jun 10 15:55:41 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-diff -ru MacOSX-trunk-r24891/build.properties MacOSX-trunk/build.properties
---- MacOSX-trunk-r24891/build.properties	2018-10-20 11:45:32.000000000 +0200
-+++ MacOSX-trunk/build.properties	2019-05-08 17:07:07.001576716 +0200
-@@ -1,3 +1,6 @@
- build.support=../build-support-trunk
- jedit.install.dir=../jedit-trunk/build
- install.dir=${jedit.install.dir}/jars
-+compiler.target=1.9
-+compiler.source=1.9
-+compiler.extdirs=
-diff -ru MacOSX-trunk-r24891/CHANGES.txt MacOSX-trunk/CHANGES.txt
---- MacOSX-trunk-r24891/CHANGES.txt	2013-09-24 01:12:13.000000000 +0200
-+++ MacOSX-trunk/CHANGES.txt	2019-05-08 17:07:07.001576716 +0200
-@@ -1,3 +1,6 @@
-+Mac OS X Plugin 1.4 [Makarius]
-+- Updates for Java 9: use java.awt.Desktop instead of old com.apple.eawt.Application / OSXAdapter.
-+
- Mac OS X Plugin 1.3 [Alan Ezust]
- - Updates for Java 7 and jEdit 5.2
- - Got rid of alternative dispatcher stuff which was workaround for Java 5 bugs.
-diff -ru MacOSX-trunk-r24891/docs/MacOSX.html MacOSX-trunk/docs/MacOSX.html
---- MacOSX-trunk-r24891/docs/MacOSX.html	2013-09-19 19:42:51.000000000 +0200
-+++ MacOSX-trunk/docs/MacOSX.html	2019-05-08 17:07:07.001576716 +0200
-@@ -16,8 +16,8 @@
-     <td valign="TOP"><strong><font size="+2">jEdit Mac OS X Plugin</font></strong></td>
-     <td valign="TOP" align="RIGHT">
-     	<font size="-1"> 
--	    <strong>Version 1.3 </strong>
--	    <br/> By Seph M. Soliman and Alan Ezust
-+	    <strong>Version 1.4 </strong>
-+	    <br/> By Seph M. Soliman, Alan Ezust, Makarius
- 	    <br/> $Date: 2013-09-19 17:42:51 +0000 (Thu, 19 Sep 2013) $  	    
- 	</font>
-     </td>
-diff -ru MacOSX-trunk-r24891/macosx/MacOSXPlugin.java MacOSX-trunk/macosx/MacOSXPlugin.java
---- MacOSX-trunk-r24891/macosx/MacOSXPlugin.java	2013-09-20 02:51:27.000000000 +0200
-+++ MacOSX-trunk/macosx/MacOSXPlugin.java	2019-05-08 17:25:14.905716526 +0200
-@@ -25,6 +25,7 @@
- //{{{ Imports
- import java.awt.event.InputEvent;
- 
-+import java.awt.Desktop;
- import javax.swing.*;
- import java.util.regex.Pattern;
- import java.io.File;
-@@ -59,17 +60,13 @@
- 				{
- 					try
- 					{
--						MacOSXPlugin listener = MacOSXPlugin.this;
--						Class theClass = listener.getClass();
--						
--						// Generate and register the OSXAdapter, passing it a hash of all the methods we wish to
--						// use as delegates for various com.apple.eawt.ApplicationListener methods
--						OSXAdapter.setQuitHandler(listener, theClass.getDeclaredMethod("handleQuit", (Class[])null));
--						OSXAdapter.setAboutHandler(listener, theClass.getDeclaredMethod("handleAbout", (Class[])null));
--						OSXAdapter.setPreferencesHandler(listener, theClass.getDeclaredMethod("handlePreferences", (Class[])null));
--						OSXAdapter.setFileHandler(listener, theClass.getDeclaredMethod("handleOpenFile", new Class[] { String.class }));
--						OSXAdapter.setReOpenApplicationHandler(listener, theClass.getDeclaredMethod("handleReOpenApplication", (Class[])null));
--						
-+						Desktop desktop = Desktop.getDesktop();
-+
-+						desktop.setQuitHandler((e, r) -> { handleQuit(); r.cancelQuit(); });
-+						desktop.setAboutHandler((e) -> handleAbout());
-+						desktop.setPreferencesHandler((e) -> handlePreferences());
-+						desktop.setOpenFileHandler((e) -> { for (File f : e.getFiles()) handleOpenFile(f); });
-+
- 						String lf = jEdit.getProperty("lookAndFeel");
- 						if(lf != null && lf.length() != 0)
- 						{
-@@ -86,7 +83,7 @@
- 					}
- 					catch (Exception e)
- 					{
--						Log.log(Log.ERROR, this, "Error while loading the OSXAdapter:", e);
-+						Log.log(Log.ERROR, this, "Error while configuring MacOSX support:", e);
- 					}
- 				}
- 			};
-@@ -109,7 +106,7 @@
- 		//JOptionPane.showMessageDialog(null, jEdit.getProperty("MacOSXPlugin.dialog.unload.message"), jEdit.getProperty("MacOSXPlugin.dialog.unload.title"), 1);
- 	}
- 	
--	// General quit handler; fed to the OSXAdapter as the method to call when a system quit event occurs
-+	// General quit handler; the method to call when a system quit event occurs
- 	// A quit event is triggered by Cmd-Q, selecting Quit from the application or Dock menu, or logging out
- 	public boolean handleQuit()
- 	{
-@@ -122,16 +119,14 @@
- 		new CombinedOptions(jEdit.getActiveView());
- 	}
- 	
--	// General info dialog; fed to the OSXAdapter as the method to call when 
--	// "About OSXAdapter" is selected from the application menu
-+	// General info dialog; the method to call when "About" is selected from the application menu
- 	public void handleAbout()
- 	{
- 		new AboutDialog(jEdit.getActiveView());
- 	}
- 	
--	public void handleOpenFile(String filepath)
-+	public void handleOpenFile(File file)
- 	{
--		File file = new File(filepath);
- 		if(file.exists())
- 		{
- 			if(file.isDirectory())
-@@ -152,7 +147,7 @@
- 				}
- 				
- 				if (jEdit.openFile(view, file.getPath()) == null)
--					Log.log(Log.ERROR, this, "Unable to open file: " + filepath);
-+					Log.log(Log.ERROR, this, "Unable to open file: " + file.getPath());
- 			}
- 			else
- 			{
-@@ -161,7 +156,7 @@
- 		}
- 		else
- 		{
--			Log.log(Log.ERROR, this, "Cannot open non-existing file: " + filepath);
-+			Log.log(Log.ERROR, this, "Cannot open non-existing file: " + file.getPath());
- 		}
- 		
- 	}
-@@ -198,9 +193,6 @@
- 		{
- 			ViewUpdate msg = (ViewUpdate)message;
- 			refreshProxyIcon(msg.getView());
--			
--			if (msg.getWhat() == ViewUpdate.CREATED)
--				enableFullScreenMode(msg.getView());
- 		}
- 		else if(message instanceof EditPaneUpdate)
- 		{
-@@ -312,26 +304,6 @@
- 		return jEdit.getBooleanProperty("plugin.MacOSXPlugin.disableOption");
- 	}
- 	
--	public void enableFullScreenMode(View view)
--	{
--		if (fullScreenFailed)
--			return;
--		
--		try
--		{
--			// FullScreenUtilities.setWindowCanFullScreen(view, true);
--			Class<?> Util = Class.forName("com.apple.eawt.FullScreenUtilities");
--			Class arguments[] = new Class[] { java.awt.Window.class, Boolean.TYPE };
--			Method setWindowCanFullScreen = Util.getMethod("setWindowCanFullScreen", arguments);
--			setWindowCanFullScreen.invoke(Util, view, true);
--		}
--		catch (Exception e)
--		{
--			Log.log(Log.DEBUG, this, "Unable to enable OS X native full screen mode: " + e);
--			fullScreenFailed = true;
--		}
--	}
--
- 	//{{{ osok() method
- 	private boolean osok()
- 	{	
-@@ -344,10 +316,4 @@
- 
- 		return true;
- 	}//}}}
--
--	//{{{ Instance variables
--	
--	// If unable to enable full screen mode (e.g., running on OSX 10.6 or earlier), don't keep trying
--	private boolean fullScreenFailed = false;
--	//}}}
- }
-Only in MacOSX-trunk-r24891/macosx: OSXAdapter.java
-diff -ru MacOSX-trunk-r24891/MacOSX.props MacOSX-trunk/MacOSX.props
---- MacOSX-trunk-r24891/MacOSX.props	2013-09-24 01:12:13.000000000 +0200
-+++ MacOSX-trunk/MacOSX.props	2019-05-08 17:07:07.001576716 +0200
-@@ -5,8 +5,8 @@
- # Plugin info
- #
- plugin.macosx.MacOSXPlugin.name=Mac OS X Support
--plugin.macosx.MacOSXPlugin.author=Seph Soliman, Alan Ezust
--plugin.macosx.MacOSXPlugin.version=1.3
-+plugin.macosx.MacOSXPlugin.author=Seph Soliman, Alan Ezust, Makarius
-+plugin.macosx.MacOSXPlugin.version=1.4
- plugin.macosx.MacOSXPlugin.docs=docs/MacOSX.html
- plugin.macosx.MacOSXPlugin.description=Provides better MacOS X integration through features such as better CMD-key mapping, drag-and-drop from Finder and more.
- plugin.macosx.MacOSXPlugin.longdescription=description.html
-@@ -15,7 +15,7 @@
- # Dependencies
- #
- plugin.macosx.MacOSXPlugin.depend.0=jedit 05.01.99.00
--plugin.macosx.MacOSXPlugin.depend.1=jdk 1.6
-+plugin.macosx.MacOSXPlugin.depend.1=jdk 1.9
- 
- MacOSXPlugin.depend.os.name=Mac OS X
- MacOSXPlugin.depend.mrj.version=99