1. 03 Sep, 2018 2 commits
  2. 02 Sep, 2018 2 commits
  3. 01 Sep, 2018 12 commits
  4. 30 Aug, 2018 1 commit
  5. 29 Aug, 2018 1 commit
  6. 28 Aug, 2018 3 commits
  7. 20 Aug, 2018 3 commits
    • Philip Chimento's avatar
      byteArray: Add compatibility toString property · 8f0dff8d
      Philip Chimento authored
      This overrides, on each Uint8Array returned from an introspected function
      or from ByteArray.fromString() or ByteArray.fromGBytes(), the toString()
      property with a compatibility shim that preserves the old behaviour of
      ByteArray.prototype.toString() while logging a compatibility warning
      asking people to fix their code.
      
      This ByteArray.toString() -> Uint8Array.toString() change has had more
      fallout in application code than I expected, so it seems better to
      preserve backwards compatibility. (The old behaviour was to decode the
      byte array into a string with default encoding UTF-8, and the default
      behaviour of Uint8Array is to return a string with the decimal digits of
      each byte joined with commas. So the effect was that strings like
      "97,98,99,100" would show up in UIs where previously "abcd" would have
      been printed.
      
      This is only on specific instances, so Uint8Array.prototype.toString()
      remains untouched.
      8f0dff8d
    • Philip Chimento's avatar
      deprecation: Add deprecation warning framework · f55c0123
      Philip Chimento authored
      This adds a framework for deprecation warnings. It consists of an enum of
      deprecated features, and the API _gjs_warn_deprecated_once_per_callsite()
      which warns only once in each place the feature is used, even if that
      code is executed more than once.
      
      This is meant to be joined in the future by _gjs_warn_deprecated_once()
      and _gjs_warn_deprecated_once_per_file(), since we have unconditional
      deprecation warnings elsewhere in GJS that could very well use those
      APIs.
      f55c0123
    • Philip Chimento's avatar
      3276e0c1
  8. 19 Aug, 2018 3 commits
    • Avi's avatar
      Added _promisify to GJS GIO overrides · decae6d1
      Avi authored
      The _promisify function is a new internal feature for GJS, providing
      developers the option to write asynchronous operations with either
      the original callbacks from GNOME's original C (using GObject)
      libraries or to write them using async/await, a new modern way to
      write asynchronous code in JavaScript. This feature hides all of the
      original callbacks from developers in a Promise, allowing one to call
      the _async function like a variable by calling it with await in an async
      function. This is a backwards compatible feature, thus it will not
      impact already existing code using callbacks.
      
      Please note that if you use this feature, to be ready for the official
      API version coming out in 3.32 where slight changes to your code will
      be necessary (in a good way, you can remove an extra line or two of
      your code)!
      
      To use this feature, instead of nesting your _async and _finish function
      in your code (e.g. load_contents_async, load_contents_finish), you can
      update your program to an "async function", and call the _async function
      with an await leading it. You will also need to call the feature in your
      program, too, until the 3.32 release.
      
      Example:
      Gio._promisify(..., 'load_contents_async', 'load_contents_finish');
      let [raw_content] = file.load_contents_async(cancellable);
      decae6d1
    • Philip Chimento's avatar
      Merge branch 'temporary-gio-file' into 'master' · 06aae445
      Philip Chimento authored
      Temporary fix for Gio.File.prototype
      
      See merge request GNOME/gjs!226
      06aae445
    • Avi's avatar
      Temporary fix for Gio.File.prototype · 42be3ff2
      Avi authored
      Issue #189 details the current dilemma of being unable to add or
      monkeypatch methods on a GObject interface. At this time developers
      must add an additional line of code to their applications to use
      Gio.File.prototype. This is a temporary fix faking it until such a
      fix has been made for that issue.
      
      Example:
      promisify(Gio._LocalFilePrototype, load_contents_async, load_contents_finish);
      42be3ff2
  9. 16 Aug, 2018 2 commits
  10. 14 Aug, 2018 1 commit
  11. 13 Aug, 2018 3 commits
  12. 10 Aug, 2018 2 commits
  13. 09 Aug, 2018 4 commits
  14. 03 Aug, 2018 1 commit