4 * Idea is to manage resourse used by the app.
6 * The original code downloaded all the resources before it renders the main window
8 * This is a bit annoying as although they do change quite a bit, it's not on every page load
10 * So the Resource fetching behaviour should be a button on the File view page
11 * That starts the refresh of the resources.
13 * I'm not quite sure how we should flow this - if we do them all at once.. might be a bit of a server
14 * overload... so sequentially may be best...
17 public class Resources : Object
20 public void fetchResourceFrom(string src, string target, Soup.SessionCallback? callback)
24 print("downloading %s \nto : %s\n", src,res);
25 var session = new Soup.Session ();
26 session.user_agent = "App Builder ";
27 var message = new Soup.Message ("GET",
30 session.queue_message (message, (sess, mess) => {
32 FileUtils.set_contents(
33 configDirectory() + "/resources/" + res,
34 (string) message.response_body.data