Index: gnome-panel/gnome-panel/ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/gnome-panel/gnome-panel/ChangeLog,v
retrieving revision 1.2364
diff -p -u -5 -r1.2364 ChangeLog
--- gnome-panel/gnome-panel/ChangeLog	2004/04/08 12:45:18	1.2364
+++ gnome-panel/gnome-panel/ChangeLog	2004/04/15 11:53:46
@@ -1,5 +1,14 @@
+2004-04-15  Leena Gunda  <leena.gunda@wipro.com>
+
+	* egg-recent-model.c:
+	(egg_recent_model_monitor): If the FAM support is unavailable, 
+	we do a poll of the .recently-used file ourselves
+	(egg_recent_model_poll_timeout): Poll the file after every 
+	3 seconds.
+	Fixes bug#140153. 
+
 2004-04-08  Mark McLoughlin  <mark@skynet.ie>
 
 	* panel-toplevel.schemas.in: make mostly transparent
 	white the default background color (when you change
 	to a color background). Solid black is sooo last week.

Index: gnome-panel/gnome-panel/egg-recent-model.c
===================================================================
RCS file: /export/cvs/gnome-2.0/gnome-panel/gnome-panel/egg-recent-model.c,v
retrieving revision 1.7
diff -p -u -5 -r1.7 egg-recent-model.c
--- gnome-panel/gnome-panel/egg-recent-model.c	2004/02/04 13:05:46	1.7
+++ gnome-panel/gnome-panel/egg-recent-model.c	2004/04/15 11:53:46
@@ -45,10 +45,11 @@
 #define EGG_RECENT_MODEL_TIMEOUT_LENGTH 200
 
 #define EGG_RECENT_MODEL_KEY_DIR "/desktop/gnome/recent_files"
 #define EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY EGG_RECENT_MODEL_KEY_DIR "/default_limit"
 #define EGG_RECENT_MODEL_EXPIRE_KEY EGG_RECENT_MODEL_KEY_DIR "/expire"
+#define EGG_RECENT_MODEL_POLL_TIME 3
 
 struct _EggRecentModelPrivate {
 	GSList *mime_filter_values;	/* list of mime types we allow */
 	GSList *group_filter_values;	/* list of groups we allow */
 	GSList *scheme_filter_values;	/* list of URI schemes we allow */
@@ -671,24 +672,56 @@ egg_recent_model_monitor_cb (GnomeVFSMon
 			(GSourceFunc)egg_recent_model_changed_timeout,
 			model);
 	}
 }
 
+static gboolean
+egg_recent_model_poll_timeout (gpointer user_data)
+{
+	static time_t mtime;
+	GnomeVFSFileInfo *info;
+	GnomeVFSResult result;
+	EggRecentModel *model;
+
+	g_return_val_if_fail (user_data != NULL, FALSE);
+	g_return_val_if_fail (EGG_IS_RECENT_MODEL (user_data), FALSE);
+
+	model = EGG_RECENT_MODEL (user_data);
+
+	info = gnome_vfs_file_info_new ();
+	result = gnome_vfs_get_file_info (model->priv->path,
+					  info,
+					  GNOME_VFS_FILE_INFO_DEFAULT);
+
+	if (result == GNOME_VFS_OK && info->mtime && mtime != info->mtime) {
+		mtime = info->mtime;
+		egg_recent_model_changed (model);
+	}
+	return TRUE;
+}
+
 static void
 egg_recent_model_monitor (EggRecentModel *model, gboolean should_monitor)
 {
 	if (should_monitor && model->priv->monitor == NULL) {
+		GnomeVFSResult result;
 
-		gnome_vfs_monitor_add (&model->priv->monitor,
-					     model->priv->path,
-					     GNOME_VFS_MONITOR_FILE,
-					     egg_recent_model_monitor_cb,
-					     model);
+		result = gnome_vfs_monitor_add (&model->priv->monitor,
+						model->priv->path,
+						GNOME_VFS_MONITOR_FILE,
+						egg_recent_model_monitor_cb,
+						model);
 
 		/* if the above fails, don't worry about it.
 		 * local notifications will still happen
 		 */
+
+		if (result == GNOME_VFS_ERROR_NOT_SUPPORTED) {
+			g_timeout_add (EGG_RECENT_MODEL_POLL_TIME * 1000,
+				       egg_recent_model_poll_timeout,
+				       model);
+		}
 
 	} else if (!should_monitor && model->priv->monitor != NULL) {
 		gnome_vfs_monitor_cancel (model->priv->monitor);
 		model->priv->monitor = NULL;
 	}
