diff options
author | Francois Chouinard | 2011-02-22 16:47:31 +0000 |
---|---|---|
committer | Francois Chouinard | 2011-02-22 16:47:31 +0000 |
commit | eb7a27b13e79c1be1a8a7aceb1ae8e76377e419c (patch) | |
tree | 6a48ac8f49939ad9cf404f69b95269ccd0a30d28 /lttng | |
parent | 19b23a56398941ebef49adc98c829566955d3b11 (diff) | |
download | org.eclipse.linuxtools-eb7a27b13e79c1be1a8a7aceb1ae8e76377e419c.tar.gz org.eclipse.linuxtools-eb7a27b13e79c1be1a8a7aceb1ae8e76377e419c.tar.xz org.eclipse.linuxtools-eb7a27b13e79c1be1a8a7aceb1ae8e76377e419c.zip |
2011-02-22 Francois Chouinard <fchouinard@gmail.com> Fix for Bug337859
* src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java: Fix for Bug337859 (check for NPE)
Diffstat (limited to 'lttng')
-rw-r--r-- | lttng/org.eclipse.linuxtools.lttng.ui/ChangeLog | 4 | ||||
-rw-r--r-- | lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java | 37 |
2 files changed, 23 insertions, 18 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/ChangeLog b/lttng/org.eclipse.linuxtools.lttng.ui/ChangeLog index 218ad27412..efe7abac14 100644 --- a/lttng/org.eclipse.linuxtools.lttng.ui/ChangeLog +++ b/lttng/org.eclipse.linuxtools.lttng.ui/ChangeLog @@ -1,3 +1,7 @@ +2011-02-22 Francois Chouinard <fchouinard@gmail.com> + + * src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java: Fix for Bug337859 (check for NPE) + 2011-01-12 Bernd Hufmann <bhufmann@gmail.com> Fix for Bug 333114 * src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/KernelStatisticsData.java: Update statistic handling for processes that change name at event of type "exec" and after fork diff --git a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java index 97db1874eb..ef56d30201 100644 --- a/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java +++ b/lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java @@ -492,7 +492,7 @@ public class ControlFlowView extends AbsTimeUpdateView implements int borderWidth = table.getBorderWidth(); - int itemHeight = table.getItemHeight() + checkForSWTBugItemHeightAdjustement(); + int itemHeight = table.getItemHeight() + getTableItemHeightAdjustement(); int headerHeight = table.getHeaderHeight(); table.getVerticalBar().setVisible(false); @@ -1075,24 +1075,25 @@ public class ControlFlowView extends AbsTimeUpdateView implements return initTimeWindow; } - // *** HACK *** - // - // - // - public int checkForSWTBugItemHeightAdjustement() { - int returnedAjustement = 0; - String desktopSessionName = System.getenv("DESKTOP_SESSION"); //$NON-NLS-1$ - - // Gnome : most common case, no adjustement - if ( desktopSessionName.equals("gnome") ) { //$NON-NLS-1$ - returnedAjustement = 0; - } - // Kde : ajustement of 2 is needed - else if ( desktopSessionName.equals("kde") ) { //$NON-NLS-1$ - returnedAjustement = 2; + /* + * SWT doesn't seem to report correctly the table item height, at least in + * the case of KDE. + * + * This method provides an adjustment term according to the desktop session. + * + * @return Height adjustment + */ + private int getTableItemHeightAdjustement() { + int ajustement = 0; + String desktopSession = System.getenv("DESKTOP_SESSION"); //$NON-NLS-1$ + + if (desktopSession != null) { + if (desktopSession.equals("kde")) { //$NON-NLS-1$ + ajustement = 2; + } } - - return returnedAjustement; + + return ajustement; } /* |