office-gobmx/external/rhino/rhino1_5R5-updateToolTip.patch
Khaled Hosny 90a19aeac6 fdo#70393: move rhino to a subdir of external
Change-Id: I7d7858d84a62568d9b0c61403645da13658e78d2
Reviewed-on: https://gerrit.libreoffice.org/6552
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-11-04 02:45:23 -06:00

23 lines
1 KiB
Diff

--- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:09 2011
+++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:01 2011
@@ -1045,9 +1045,18 @@
} );
}
+ // Fix taken from <ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip>
+ // toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java:
private void updateToolTip() {
- // in case fileName is very long, try to set tool tip on frame
- Component c = getComponent(1);
+ // Try to set tool tip on frame. On Mac OS X 10.5,
+ // the number of components is different, so try to be safe.
+ int n = getComponentCount() - 1;
+ if (n > 1) {
+ n = 1;
+ } else if (n < 0) {
+ return;
+ }
+ Component c = getComponent(n);
// this will work at least for Metal L&F
if (c != null && c instanceof JComponent) {
((JComponent)c).setToolTipText(getUrl());