Re: Regarding Nautilus-cd-burner `Write to Disk...' menu item.



On Fri, 2005-02-18 at 18:35 +0530, Vijaykumar Patwari wrote:
> Hi All,
> 
> Problem
> -----------
> To sensitise or desensitise `Write to Disk...` menu item depending on 
> the availability of CD-Writer on M/c.
> 
> Analysis and Observations
> ---------------------------------
> To make this to work, my observations where,
> 
> Menu item `Write to Disk...`, addition to the main context menu is 
> part/done of/in nautilus-cd-burner sources. The item is being created 
> using nautilus/libnautilus-extension/nautilus-menu-item.c 
> (nautilus_menu_item_new).  This function will create a menuitem of type 
> `NAUTILUS_TYPE_MENU_ITEM` and returns it to the caller function i.e 
> nautilus-cd-burner/burn-extensions.c (nautilus_burn_get_file_items).
> 
> I have written a check function in nautilus-cd-burner to verify the 
> availability of CD-Writer on M/c, this function will be part of 
> nautilus-cd-burner code.
> 
> Now, the problem is, i need to sensitise or desensitise `Write to 
> Disk...` menu item depending on the return value from the check function.
> 
> But, I don't find any API to alter the values of the members of the 
> struct `NautilusMenuItem/NautilusMenuItemDetails`. So, for this i want 
> to introduce a new function in 
> nautilus/libnautilus-extension/nautilus-menu-item.c file,  to alter the 
> values of the members of the struct `NautilusMenuItem`.
> 
> Will that be ok?.

No, all the properties of the NautilusMenuItem are gobject properties.
You can set them like any other GObject property.

> Or  as a alternative solution is to make, Write to Disk...` menu item 
> not to appear in the context menu if no CD-Writer is available on M/c. 
> This is can be easily done in nautilus-cd-burner code.

This seems better. Why waste menu space on an item that is always
insensitive. 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a war-weary bohemian firefighter searching for his wife's true killer. 
She's a man-hating belly-dancing bodyguard who dreams of becoming Elvis. They 
fight crime! 




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