Re: Problem with popup menu cache system



On Wed, 2006-04-19 at 14:10 +0200, RUAUDEL Frédéric wrote:
> Hi,
> 
>    I'm the maintainer of Nautilus-actions [1] which allows to add custom 
> menu item in the popup menu of Nautilus and I have some trouble with the 
> menu cache system (see Bug #325584 [2] ). When a user add an action with 
> my extension, Nautilus doesn't update the menu content every time for 
> obvious performance reasons. There is three differents behaviours :
> 
> - For the popup menu of a bunch of selected files or folders in a 
> Nautilus' window, the menu is refreshed when the user changes the 
> current selection (not very annoying).
> - For the popup menu generated on the background of a Nautilus' window, 
> the menu is updated when the user close this window and reopen it (a bit 
> annoying).
> - For the popup menu generated on the desktop, the menu is updated when 
> the user restart Nautilus (eg. with the command "nautilus -q" ) or log 
> out his gnome session (very annoying)
> 
> These tests has been made with Nautilus 2.12.
> 
> So if I'm right, I would like to know if an extension has access to a 
> function of Nautilus which asks it to refresh all the menus ? If not, is 
> it feasible in a near future ?

There is no such function at the moment. I'm not really sure how it
would work either. Its normally the case that nautilus calls into the
module when it needs some information, but what you propose is the
opposite. But this means the extension must be running already so that
it can call nautilus, and that is not typically the case.

How would you detect that the menus need refreshing? I guess it might be
possible to register a source in the mainloop for this.

Anyway, i'm not conceptually against having this, even if i'm not
immediately sure how it would be implemented. I'll gladly take patches
for it.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a genetically engineered amnesiac farmboy in a wheelchair. She's a 
chain-smoking green-skinned schoolgirl on the trail of a serial killer. They 
fight crime! 




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