After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 367273 - gnome-menus doesn't send notification for new .desktop files
gnome-menus doesn't send notification for new .desktop files
Status: RESOLVED NOTGNOME
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.16.x
Other All
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2006-10-29 23:43 UTC by Pete Ryland
Modified: 2007-05-25 18:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
This patch fixes the passing on of .desktop directory notifications (438 bytes, patch)
2006-10-29 23:47 UTC, Pete Ryland
needs-work Details | Review
Fix for gnomevfs file change notification (836 bytes, patch)
2007-05-25 09:24 UTC, Pete Ryland
rejected Details | Review

Description Pete Ryland 2006-10-29 23:43:02 UTC
Please describe the problem:
As per:

https://launchpad.net/distros/ubuntu/+source/gnome-menus/+bug/64264

"If you add/edit menus in Edgy, the menu shown in alacarte isn't updated until you reload alacarte and the actual gnome menu isn't updated until either a package upgrade updates it or you kill gnome-panel." (reported by Chris Lord on 2006-10-06)

Steps to reproduce:
1. Start the alacarte menu editor
2. Copy a menu item to another menu (with drag and drop)
3. Attempt to view the results in either alacarte or the panel menu
4. Restart alacarte to see the results
5. Restart the panel to show the copy was indeed successful

Actual results:
The copy succeeds but is not applied to running menu consumers.

Expected results:
The copy should cause a notify event to update the menus in the running applications.

Does this happen every time?
Yes

Other information:
I have made a patch to fix this problem (and another problem that only surfaced after fixing this).  It is attached at the above-mentioned launchpad url.
Comment 1 Pete Ryland 2006-10-29 23:47:33 UTC
Created attachment 75636 [details] [review]
This patch fixes the passing on of .desktop directory notifications
Comment 2 Kjartan Maraas 2007-02-09 15:27:39 UTC
Please review this patch. It's just a simple one-liner
Comment 3 Mark McLoughlin 2007-02-23 10:06:56 UTC
Doesn't look right to me.

Take the simple case of a .desktop file being deleted. We only want to invoke the monitors if something has actually changed in our view of the world, so we only want to invoke monitors if cached_dir_remove_entry() returns TRUE

Also marking this bug as NEEDINFO, as there isn't enough info for me to figure out the bug myself - e.g. what exactly is alacarte doing when you copy an item, what does the gnome-menus verbose log show etc. ?
Comment 4 Travis Watkins 2007-05-25 05:49:54 UTC
Alacarte is just making a copy of the .desktop using a new filename and adding an <Include> for it. I do it this way so you can independently edit each .desktop instead of wondering why changing one changes both. Also, it probably doesn't help that I cannot trigger this bug. So far no one else I've asked has been able to give me a method to reproduce it unless they copy an item with spaces in the name (which is a separate bug I'm just going to avoid by making up a file name).
Comment 5 Pete Ryland 2007-05-25 09:21:07 UTC
There is a better fix to the "spaces in filename" problem at:

http://librarian.launchpad.net/4940208/gnome-menus-2.16.1-fix_.desktop_notifications_uri_handling.patch

It's the way you're doing the url encoding for gnomevfs calls that's causing the problem.
Comment 6 Pete Ryland 2007-05-25 09:24:22 UTC
Created attachment 88786 [details] [review]
Fix for gnomevfs file change notification
Comment 7 Vincent Untz 2007-05-25 10:25:09 UTC
This is a patch changing a patch that isn't upstream... You should just fix the downstream patch.
Comment 8 Vincent Untz 2007-05-25 10:37:58 UTC
If it's only a bug happening with spaces and this is only happening because downstream is using a patch for the file monitoring, then it's not a GNOME bug.
Comment 9 Pete Ryland 2007-05-25 14:57:01 UTC
Indeed, sorry about that.  That probably explains why I didn't attach that patch here before. :-)  So the bug Travis mentions must be a separate issue then, or is that referring to the bug introduced downstream too?
Comment 10 Vincent Untz 2007-05-25 16:41:11 UTC
I'll let Travis reply :-)
Comment 11 Travis Watkins 2007-05-25 18:23:29 UTC
I can drag and drop things without spaces and they show up in their new location immediately in alacarte and in the menu. This is probably just a bug in ubuntu's patch.