! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
menu monitoring is broken


Description Brian J. Tarricone (not reading bugmail) 2007-11-30 03:55:29 CET
Ok, so I start up xfdesktop, and I see printf()s inside the monitor_directory() function I pass in the vtable.  Then immediately my 'something changed' callback gets fired, and then I see the printf()s in the remove_monitor() function I passed.  And that's it.  The monitors don't get re-added, and monitoring doesn't work.  Nothing happens if I do 'touch /usr/share/applications/asdf.desktop'.  Brian is sad :-(.

The *file* monitoring, however, appears to work: if I touch a file that already exists, the 'something changed' callback gets fired.  But if I create a new file, nothing happens.

This also brings up another point... the 'monitor_file()' vtable entry is useless and wasteful, at least when used with thunar-vfs.  thunar-vfs will also monitor all files in the directory passed to it (but it won't monitor the contents of subdirectories).  So really, what I'd like to do is set the monitor_file() member of the vtable to NULL, and just provide monitor_directory() and remove_monitor().  As long as you call monitor_directory() for each directory -- and subdirectory -- in the various hierarchies, it'll work rather nicely.  (Note that some file monitoring systems, like maybe the old dnotify, require separate monitors on files and directories, so the monitor_file() vtable entry is still useful.)
Comment 1 Jannis Pohlmann editbugs 2007-12-22 23:58:15 CET
Hey Brian. I used the time I had on train while traveling back home to work on libxfce4menu a bit. Please check out the latest commit (revision 26500) and test if it works now. Attached is a small sample program which works quite well (and uses thunar-vfs).

If you don't want to monitor any files, just set the monitor_file member to NULL. xfce-menu-monitor.c should already support that:

  if (G_UNLIKELY (xfce_menu_monitor_vtable.monitor_file == NULL))

This is a check from xfce_menu_monitor_add_item(). This method is called by XfceMenu's to tell the monitoring system when a file needs to be monitored.
Comment 2 Jannis Pohlmann editbugs 2008-09-20 01:21:11 CEST
Is this one still valid?
Comment 3 Brian J. Tarricone (not reading bugmail) 2008-09-20 01:32:39 CEST
Dunno, will have to look into it again.
Comment 4 Jannis Pohlmann editbugs 2009-02-03 23:37:34 CET
I'll close this bug because I really doubt that monitoring is still broken. In the "touch /usr/share/applications/whatever.desktop" situation the appfinder works just fine and so does the desktop menu AFAIK. Feel free to re-open it if it still doesn't work for you.

Bug #3704

Reported by:
Brian J. Tarricone (not reading bugmail)
Reported on: 2007-11-30
Last modified on: 2009-07-14


Jannis Pohlmann
CC List:
0 users


4.5.90 (4.6 alpha)


Additional information