xfdesktop menu is getting awesomer
Jannis Pohlmann
jannis at xfce.org
Mon Mar 19 21:20:39 CET 2007
On Mon, 19 Mar 2007 11:26:39 -0700, Brian J. Tarricone wrote:
> On Mon, 19 Mar 2007 19:05:35 +0100 Jannis Pohlmann wrote:
>
> >On Mon, 19 Mar 2007 11:02:18 -0700, Brian J. Tarricone wrote:
> >
> >> On Mon, 19 Mar 2007 14:15:47 +0100 Jannis Pohlmann wrote:
> >>
> >> [snip: Jannis did stuff.]
> >>
> >> Cool, so everything's working now? I didn't have time to svn up
> >> and check it before I left this morning. Seriously, this is great.
> >
> >Indeed, hehe. Yeah, everything should be working. In fact, I'm
> >already running it here and the only crashes I had were related to
> >switching the menu filename (which probably is caused somewhere deep
> >in your code, so I didn't investigate this any further).
>
> Do you have a bt? That worked fine for me. (I.e., I had xfdesktop
> running, and copied a new xfce-applications.menu to ~/.config/menus/,
> and it switched to the new menu file automatically.)
==23356== at 0x1C3D01D4: g_type_check_instance_is_a (gtype.c:3115)
==23356== by 0x1C85C7BE: desktop_menu_add_items (desktop-menu.c:210)
==23356== by 0x1C85CCE5: _generate_menu (desktop-menu.c:319)
==23356== by 0x1C85CE36: _generate_menu_initial (desktop-menu.c:371)
==23356== by 0x1C41D450: g_idle_dispatch (gmain.c:4096)
==23356== by 0x1C419F3A: g_main_context_dispatch (gmain.c:2061)
==23356== by 0x1C41B914: g_main_context_iterate (gmain.c:2694)
==23356== by 0x1C41BC39: g_main_loop_run (gmain.c:2898)
==23356== by 0x1BD92D12: gtk_main (in
/usr/lib/libgtk-x11-2.0.so.0.1000.6)
==23356== by 0x804EB61: main (desktop-menu-plugin.c:1090)
==23356== Address 0x6C706D6B is not stack'd, malloc'd or (recently)
free'd
> Oh, I did notice something weird, and I'm not sure if this is my fault
> or FrapMenu's. Try this:
>
> Copy one of our X-Xfce-Toplevel .desktop files to
> ~/.local/share/applications/ (be sure to change the file name when you
> copy). The new entry shows up in the toplevel menu as it should,
> sorted in aplha order with the <Merge type="all"/> items as it should.
>
> Now, open the copied .desktop file, change the Name= line, and
> save. If you watch xfdesktop output, it does notice the file changed
> (I see FrapMenu-DEBUG statements), but the entry in the menu still has
> the old name. Restart xfdesktop, and it uses the right name. Is
> FrapMenu doing any caching, even across calls to frap_menu_new()? Or
> did I do something wrong again?
Yeah, FrapMenu does runtime caching. That is, all menu items are stored
in a (desktop-file ID => menu item) hash table (FrapMenuItemCache):
http://svn.xfce.org/svn/xfce/libfrap/trunk/libfrap/menu/frap-menu-item-cache.c
As a workaround you could perhaps call
frap_menu_shutdown();
frap_menu_init("XFCE");
if that's possible for you.
- Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20070319/aec96d71/attachment.pgp>
More information about the Xfce4-dev
mailing list