Index: head/x11/menu-cache/Makefile =================================================================== --- head/x11/menu-cache/Makefile (revision 293017) +++ head/x11/menu-cache/Makefile (revision 293018) @@ -1,25 +1,25 @@ # New ports collection makefile for: x11/menu-cache # Date created: 23 Sept 2010 # Whom: Kris Moore # # $FreeBSD$ # PORTNAME= menu-cache PORTVERSION= 0.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= SF/lxde/menu-cache/menu-cache%20${PORTVERSION}/ MAINTAINER= kmoore@FreeBSD.org COMMENT= The menu-cache portion of LXDE USE_GNOME= gnomehack gtk20 pkgconfig USE_AUTOTOOLS= libtool USE_LDCONFIG= yes USE_GMAKE= yes USE_FAM= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .include Property changes on: head/x11/menu-cache/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/x11/menu-cache/files/patch-menu-cached.c =================================================================== --- head/x11/menu-cache/files/patch-menu-cached.c (revision 293017) +++ head/x11/menu-cache/files/patch-menu-cached.c (revision 293018) @@ -1,32 +1,32 @@ --- menu-cache-daemon/menu-cached.c.o 2011-03-17 10:58:03.876822788 -0400 +++ menu-cache-daemon/menu-cached.c 2011-03-17 10:58:49.355824755 -0400 @@ -341,6 +341,29 @@ GFileMonitorEvent evt, Cache* cache ) { /* DEBUG("file %s is changed (%d).", g_file_get_path(gf), evt); */ + + if ( evt == G_FILE_MONITOR_EVENT_DELETED ) + { + int idx; + /* dirty hack: get index of the monitor in array */ + for(idx = 0; idx < cache->n_files; ++idx) + { + if(mon == cache->mons[idx]) + break; + } + + /* Check if this file or directory was already removed from the cache */ + char* changed_file = g_file_get_path(gf); + char* dir_path = cache->files[idx]+1; + int len = strlen(dir_path); + char* base_name = changed_file + len + 1; -+ gboolean in_cache = is_desktop_file_in_cache(cache, idx, base_name); ++ gboolean in_cache = is_desktop_file_in_cache(cache, idx, g_file_get_path(gf)); + if( ! in_cache ) { /* Means this file was already deleted, no need to refresh cache */ + DEBUG("files are changed, but no re-generation is needed."); + return; + } + } + /* if( mon != cache->cache_mon ) */ { /* Optimization: Some files in the dir are changed, but it Property changes on: head/x11/menu-cache/files/patch-menu-cached.c ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property