/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/settings_data.js

  • Committer: Gustav Hartvigsson
  • Date: 2014-06-09 12:53:37 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140609125337-4ez6avoeydxoyqf5
* Finnished the commit to file method. Still not tested!

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
   * Commits changes to the settings object to file.
234
234
   */
235
235
  commit_to_file: function () {
236
 
    
 
236
    print (JSON.stringify (this._settings, null, 2).toString () );
 
237
      
 
238
      let file_stream = this._settings_file.replace (null,
 
239
                                                    false,
 
240
                                                    Gio.FileCreateFlags.PRIVATE,
 
241
                                                    null);
 
242
      file_stream.write_all (JSON.stringify (
 
243
          this._settings, null, 2).toString (), null);
 
244
      
 
245
      file_stream.close (null);
237
246
  }
238
247
  
 
248
  // End of class.
239
249
});
240
250
 
241
251