fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / rhino / rhino1_5R5-updateToolTip.patch
blob16857d35fca677f333e03bcd36746f1b3dd50335
1 --- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:09 2011
2 +++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:01 2011
3 @@ -1045,9 +1045,18 @@
4 } );
7 + // Fix taken from <ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip>
8 + // toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java:
9 private void updateToolTip() {
10 - // in case fileName is very long, try to set tool tip on frame
11 - Component c = getComponent(1);
12 + // Try to set tool tip on frame. On Mac OS X 10.5,
13 + // the number of components is different, so try to be safe.
14 + int n = getComponentCount() - 1;
15 + if (n > 1) {
16 + n = 1;
17 + } else if (n < 0) {
18 + return;
19 + }
20 + Component c = getComponent(n);
21 // this will work at least for Metal L&F
22 if (c != null && c instanceof JComponent) {
23 ((JComponent)c).setToolTipText(getUrl());