+2007-06-05 Bastien Nocera <hadess@hadess.net>
+
+ * shell/ev-metadata-manager.c: (ev_metadata_manager_init),
+ (ev_metadata_manager_shutdown), (ev_metadata_manager_set_last),
+ (ev_metadata_manager_set), (ev_metadata_manager_save):
+ Simplify the timeout, no need for modified anymore
+
2007-06-05 Bastien Nocera <hadess@hadess.net>
* shell/ev-metadata-manager.c: (ev_metadata_arm_timeout),
gboolean values_loaded; /* It is true if the file
has been read */
- gboolean modified; /* It is true if the file
- has top be written */
-
guint timeout_id;
GHashTable *items;
* Creates an EvMetadataManager with default values.
*
* values_loaded -> %FALSE.
- * modified -> %FALSE.
* timeout_id -> the id of the event source.
* items -> a new full empty #GHashTable.
*/
ev_metadata_manager = g_new0 (EvMetadataManager, 1);
ev_metadata_manager->values_loaded = FALSE;
- ev_metadata_manager->modified = FALSE;
ev_metadata_manager->items =
g_hash_table_new_full (g_str_hash,
if (ev_metadata_manager == NULL)
return;
- if (ev_metadata_manager->timeout_id)
+ if (ev_metadata_manager->timeout_id) {
g_source_remove (ev_metadata_manager->timeout_id);
-
- ev_metadata_manager_save (NULL);
+ ev_metadata_manager->timeout_id = 0;
+ ev_metadata_manager_save (NULL);
+ }
if (ev_metadata_manager->items != NULL)
g_hash_table_destroy (ev_metadata_manager->items);
}
item->atime = time (NULL);
- ev_metadata_manager->modified = TRUE;
ev_metadata_arm_timeout ();
return;
}
item->atime = time (NULL);
- ev_metadata_manager->modified = TRUE;
ev_metadata_arm_timeout ();
}
ev_metadata_manager->timeout_id = 0;
- if (!ev_metadata_manager->modified)
- return FALSE;
-
resize_items ();
xmlIndentTreeOutput = TRUE;
xmlFreeDoc (doc);
- ev_metadata_manager->modified = FALSE;
-
return FALSE;
}