more robust GUIUtilities.getComponentParent: allow subclasses, notably for View, EditPane etc.;
authorwenzelm
Sat, 23 Aug 2025 15:18:34 +0200
changeset 83038 ffdb9a28e68e
parent 83037 e1d5e667283c
child 83039 608973c627be
more robust GUIUtilities.getComponentParent: allow subclasses, notably for View, EditPane etc.;
src/Tools/jEdit/patches/main
--- a/src/Tools/jEdit/patches/main	Sat Aug 23 13:45:59 2025 +0200
+++ b/src/Tools/jEdit/patches/main	Sat Aug 23 15:18:34 2025 +0200
@@ -118,9 +118,9 @@
  		default:  return '\0';
  		}
  	} //}}}
-diff -ru jedit5.7.0/jEdit/org/gjt/sp/jedit/GUIUtilities.java jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java
+diff -Nru jedit5.7.0/jEdit/org/gjt/sp/jedit/GUIUtilities.java jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java
 --- jedit5.7.0/jEdit/org/gjt/sp/jedit/GUIUtilities.java	2024-08-03 19:53:15.000000000 +0200
-+++ jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java	2025-05-20 15:40:14.181962645 +0200
++++ jedit5.7.0-patched/jEdit/org/gjt/sp/jedit/GUIUtilities.java	2025-08-23 15:00:39.272121361 +0200
 @@ -42,6 +42,8 @@
  import java.net.URL;
  import java.util.*;
@@ -270,6 +270,15 @@
  			if (child instanceof JTextPane)
  				((JTextPane)child).setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
  			if (child instanceof Container)
+@@ -1471,7 +1530,7 @@
+ 					comp = real;
+ 			}
+ 
+-			if(comp.getClass().equals(clazz))
++			if(clazz.isInstance(comp))
+ 				return comp;
+ 			else if(comp instanceof JPopupMenu)
+ 				comp = ((JPopupMenu)comp).getInvoker();
 @@ -1596,7 +1655,7 @@
  		deprecatedIcons.put("NextFile.png",    "22x22/go-last.png");
  		deprecatedIcons.put("PreviousFile.png","22x22/go-first.png");