Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Fix for menubar bug when closing help window
Fix for menubar bug when closing help window
 
   NeoOffice Forum Index -> NeoOffice Testing
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Apr 29, 2013 8:10 pm    Post subject: Fix for menubar bug when closing help window

While working on some of the help text changes for our future Mac App sandbox version, I noticed that when the help window is displayed, the menubar contains the menus for the last document window that had focus.

The help window is like a dialog and has no menus so I made a small change to force the menubar to properly show an empty menubar when the help window has focus. Closing the help window or changing focus to another document window should cause the menubar to be refilled.

Can anyone can test my code to ensure that my changes have only changed the menubar behavior for the help window? If I have made this change correctly, the menubar behavior for document windows, dialogs, and no windows should be same:

Intel:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-6-Test-1-Intel.dmg

Patrick
Back to top
James3359
The Merovingian


Joined: Jul 05, 2005
Posts: 685
Location: North West England

PostPosted: Thu May 02, 2013 9:11 am    Post subject:

The first (chronologically) screenshot is is the behaviour I have been used to.

The second screenshot (16.37.51) shows the behaviour with the patch installed.

The third screenshot (16.43.21) shows the menu bar when I have closed any open document windows.

The menu bar is the same when a dialog (e.g. Format>Page) is invoked, but in testing just now if I invoke the Print dialog, the menubar remains unchanged, but unresponsive to the mouse, but even while the Print dialog is open Cmd-F (for example) will invoke the Find/Replace dialog.

So: document window = full menubar; Help or other dialogs = empty menubar (except Print dialog which still produces a full menu bar - I haven't tested extensively to see if there are other dialogs where this happens - might it be something to do with invoking a native dialog?); no windows = reduced menubar.

I get strange behaviour if I invoke the Open file dialog and click outside it. In most places I get a warning 'beep' but not in the title bar of the document window nor on the menubar itself. It still shows the full menubar. If I click oon the menubar and then dismiss the dialog, the full menubar shows and responds to the mouse, but all the menu items are greyed (grayed) out.

Closing the document window and reopening restores functionality on all the menu items again except that all the help menu items remain greyed out, and I can only call up the Help by using the button on the toolbar.

In the end I quit and relaunched NO to restore Help menu functionality.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu May 02, 2013 9:46 am    Post subject:

James3359 wrote:
The menu bar is the same when a dialog (e.g. Format>Page) is invoked, but in testing just now if I invoke the Print dialog, the menubar remains unchanged, but unresponsive to the mouse, but even while the Print dialog is open Cmd-F (for example) will invoke the Find/Replace dialog.


This is old, normal behavior. We can't control the menubar when native "attached sheet" dialogs are displayed so, instead, our code listens for "start menubar tracking" events and when Mac OS X notifies us of such an event, when request the menubar to cancel tracking. This makes the menubar effectively unusable while attached sheet native dialogs are displayed.

Unfortunately, we have to let key events through for the attached sheet native dialog to work so Command-F or other key shortcuts may still work while the such a native dialog is displayed. What you will notice, though, is that focus will be locked onto the window that the native dialog is attached to until you dismiss the native dialog.

James3359 wrote:
So: document window = full menubar; Help or other dialogs = empty menubar (except Print dialog which still produces a full menu bar - I haven't tested extensively to see if there are other dialogs where this happens - might it be something to do with invoking a native dialog?); no windows = reduced menubar.


Essentially, the only change that I tried to make was to make the Help window behave like non-native dialogs. That is, display an empty menubar. Except for the bug that you found (see below), it sounds like the menubar is working as expected.

James3359 wrote:
I get strange behaviour if I invoke the Open file dialog and click outside it. In most places I get a warning 'beep' but not in the title bar of the document window nor on the menubar itself. It still shows the full menubar. If I click oon the menubar and then dismiss the dialog, the full menubar shows and responds to the mouse, but all the menu items are greyed (grayed) out.


Mac OS X only beeps when you display a native modal dialog and you click in the "content area" in another window within the same application.

The disabling of the menus in the menubar, however, is definitely a bug and I found that it has existed in all NeoOffice 3.3 patches. I can reproduce it by selecting the File :: Open menu and after the native Open dialog is displayed, clicking on the menubar and pressing the Escape key.

I will investigate this bug further and when I have a fix, I will post a test patch with the fix.

Patrick
Back to top
James3359
The Merovingian


Joined: Jul 05, 2005
Posts: 685
Location: North West England

PostPosted: Thu May 02, 2013 9:53 am    Post subject:

It does sound as though you've basically achieve what you intended.

My fairly full descriptions were only because I've not really noticed these behaviours in any detail, and I installed the test patch before I tried the various actions. Not knowing which behaviours were new, and which pre-existed the patch I thought I'd better give as full a description as possible.

Good luck with the bug!
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu May 02, 2013 11:56 am    Post subject:

pluby wrote:
The disabling of the menus in the menubar, however, is definitely a bug and I found that it has existed in all NeoOffice 3.3 patches. I can reproduce it by selecting the File :: Open menu and after the native Open dialog is displayed, clicking on the menubar and pressing the Escape key.


I think that I have fixed this bug. Apparently Mac OS X disables all menu items in the menubar when a native modal dialog is displayed but NeoOffice's underlying OpenOffice.org code does not know that they have been disabled. So, to fix this bug, I save the enabled state last set for each menu item by our code and reset the menu items to the state immediately before displaying a menu.

Can you install the following test patch and tell us if the bug is fixed for you?:

Intel:
http://juliette.neooffice.org/test/NeoOffice-3.3-Patch-6-Test-2-Intel.dmg

Patrick
Back to top
James3359
The Merovingian


Joined: Jul 05, 2005
Posts: 685
Location: North West England

PostPosted: Fri May 03, 2013 4:34 am    Post subject:

The menu behaviour seems fine now with this latest patch. Very Happy
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Testing All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.