gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Implementing Stage.showMenu()


From: Benjamin Wolsey
Subject: Re: [Gnash-dev] Implementing Stage.showMenu()
Date: Sat, 11 Jul 2009 10:46:09 +0200

Am Freitag, den 10.07.2009, 16:07 -0600 schrieb Jonathan Crider:
> Hey all, I need some opinions about things. I'm working at implementing 
> Stage.showMenu (and others), and I've run into a semantics issue. I have 
> most of the code in place to call the fscommand handler for this 
> function.

The fscommand handler is really only for fscommands. If you call it from
the plugin, the gui will ignore it. Also, there is an rcfile directive
to ignore all fscommands, which shouldn't apply to Stage.showMenu. The
event should be sent to the interface handler (like Mouse.show) instead.

> The problem is that the current gui codes have a different 
> interpretation of showMenu than flash does.

> I think gtk.cpp is the only gui that implements this function so far and 
> the method seems to hide or show the menu bar at the top of the screen 
> (I assume for the stand-alone player).
> 
> The flash documents say that Stage.showMenu() should instead, limit the 
> contents of the context (right-click) menu in the flash player. When 
> show menu is turned to false the only options on the right-click menu 
> are: Settings, and About.

And what happens when you test it? The menu bar isn't an issue for the
plugin, so if the fscommand and the Stage.showMenu command have the same
effect on the popup menu, it should be possible to use the same gui
functions for both.

> 
> The gnash player obviously has many different options than the flash 
> player, so my first question is should we allow the swf file to limit 
> what is on the right-click menu in gnash? If so, what do we want to put 
> on the menu when Stage.showMenu() is set to false?
> 
I would suggest adding an rcfile option to ignore all menu hiding from
actionscript. The ContextMenu class also has a way for AS to control
what appears on the built-in menu, and it seems logical to use the same
rcfile option to decide whether to allow that as well.

> Also, should I replace the functionality of showMenu in gtk.cpp to do 
> what Flash expects it to do? I suppose I could also write some other 
> function and have the AS Stage.showMenu call that function in the gui 
> code, but I am looking for some opinions on what is the best option.

Using the same for both seems like the best idea. Bear in mind that the
gui knows whether it's running as a plugin or not, so you can easily
handle small differences in behaviour.

bwy

--
Use Gnash, the GNU Flash Player!
http://www.gnu.org/software/gnash/

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]