From 9e1748f533f9d25dcedb50f9464b36588eec686b Mon Sep 17 00:00:00 2001 From: Raphael Moll Date: Thu, 28 Apr 2011 23:22:09 -0700 Subject: Use SwtMenuBar in HierarchyViewer application. Change-Id: I5f61e0c238520d8582e9bef8fa69c354a1165475 --- .../com/android/menubar/internal/MenuBarEnhancerCarbon.java | 3 +-- .../com/android/menubar/internal/MenuBarEnhancerCocoa.java | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'swtmenubar/src-darwin') diff --git a/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java index eac3f30..45dacfb 100755 --- a/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java +++ b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCarbon.java @@ -44,9 +44,8 @@ public final class MenuBarEnhancerCarbon implements IMenuBarEnhancer { public void setupMenu( String appName, - Menu swtMenu, + Display display, final IMenuBarCallback callbacks) { - final Display display = swtMenu.getDisplay(); // Callback target Object target = new Object() { diff --git a/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCocoa.java b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCocoa.java index cba2878..170603a 100644 --- a/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCocoa.java +++ b/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCocoa.java @@ -109,16 +109,15 @@ public class MenuBarEnhancerCocoa implements IMenuBarEnhancer { * given application name and links them to the callback. * * @param appName The application name. - * @param swtMenu The tools menu. Not used here. + * @param display The SWT display. Must not be null. * @param callbacks The callbacks invoked by the menus. */ public void setupMenu( String appName, - Menu swtMenu, + Display display, IMenuBarCallback callbacks) { mAppName = appName; - final Display display = swtMenu.getDisplay(); // This is our callback object whose 'actionProc' method will be called // when the About or Preferences menuItem is invoked. -- cgit v1.1