}
guint64
-modest_folder_available_space (const gchar *maildir_path)
+modest_utils_get_available_space (const gchar *maildir_path)
{
gchar *folder;
gchar *uri_string;
if (uri) {
if (gnome_vfs_get_volume_free_space (uri, &size) != GNOME_VFS_OK)
- size = -1;
+ size = 0;
gnome_vfs_uri_unref (uri);
} else {
- size = -1;
+ size = 0;
}
return (guint64) size;
/* Build dialog */
dialog = modest_platform_create_sort_dialog (parent_window);
+ if (dialog == NULL)
+ return;
modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
GTK_WINDOW (dialog));
on_destroy_dialog (GTK_DIALOG(dialog));
}
+
+gchar *
+modest_images_cache_get_id (const gchar *account, const gchar *uri)
+{
+ GnomeVFSURI *vfs_uri;
+ gchar *result;
+
+ vfs_uri = gnome_vfs_uri_new (uri);
+ if (vfs_uri == NULL)
+ return NULL;
+
+ result = g_strdup_printf ("%s__%x", account, gnome_vfs_uri_hash (vfs_uri));
+ gnome_vfs_uri_unref (vfs_uri);
+
+ return result;
+}