Re: Nautilus Menu Provider - Issue in hierarchial submenus (2 levels)



Hello,

Could some one help me out with my below issue. I am stuck completely.

Thanks,
-Sandeep

On Sat, Aug 25, 2012 at 3:49 PM, Sandeep <sandeep b-one net> wrote:
> Hello,
>
> I am trying to develop a nautilus extension in C, to provide a context menu.
> I am using Nautilus Menu Provider interface and related APIs.
>
> Nautilus version: 3.4.2
> Gtk: 3.0
> OS: Ubuntu 12.04 LTS
>
> My menu organization is something like below:
>
> 1) I have added a menu item "My menu" to file/folder context menu.
> 2) The "My menu" has a submenu with menu items as "One 1", "Two 2", "Three
> 3",Four 4".
> 3) "One 1" has another submenu which has menu items "Sub Menu One 1", "Sub
> Menu Two 2"
>
> My requirement  is as below:
> 1) If I right-click on a "Folder", I must see "My menu", when I place curser
> there it must open submenu, but only "One 1" and "Four4" must be sensitive
> (clickable), but "Two 2" and "Three 3" must be grayed out.
> 2) If I right click on a "File", I must see "My menu", but only "Four 4"
> must be sensitive/clickable, everything else must be grayed out.
>
> Current behavior:
>
> 1) Quite frequently, I see that, when I right-click on a file, I see that
> "One 1" menu item gets completely disappeared.
> 2) If I right click on a folder, "One 1", will be appearing to be in gray
> color (but still clickable, because I am able to click on it), but its sub
> menu items "Sub Menu One1" and "Sub Menu Two 2", would be in clickable and
> highlighted state. Also the link of submenus get broken and "Sub Menu One 1"
> and "Sub Menu Two 2" would appear in the same menu of "My menu". This
> happens once in 10 times or 15 times, sometimes very frequently.
>
>
> Crude workaround:
> 1) If I right click on background (where there are no files/folders),
> nautilus gets reloaded and I can see things start working as per my
> requirement without menu items getting messed up.
>
> I am attaching the code and also the screen shots. Please let me know if I
> am doing anything wrong (probably not cleaning up memory) or if it is a bug.
>
> Thanks,
> -Sandeep
>


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