GTK3 on Darwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm playing around with GTK3 +quartz and WebKit2GTK + quartz on Darwin
( https://github.com/WebReflection/jsgtk-twitter )

Overall everything looks fine and consistent but there are a couple of very basic functionalities that are apparently not supported and make the app sort of unusable.

org.freedesktop.Notifications throws errors with very basic code like the following one:

```js
notify(notifications, messages) {
  if (this.info.showNotification) {
    if (!Notify.isInitted())
      Notify.init(this.title);
    new Notify.Notification({
      summary: `You have ${notifications + messages} updates`,
      body: (
        (notifications ? `${notifications} notifications` : '') +
        (messages ?
          ((notifications ? ' and ' : '') + `${messages} messages`) : '')
      ),
      iconName: this.icon
    }).show();
  }
}
```

but it works without a glitch on any Linux distro I could try.

Screenshot example here:
https://twitter.com/WebReflection/status/728497893968105472


There is also a very simple Gio call like
```js
open(uri) {
  Gio.AppInfo.launchDefaultForUri(uri, null);
}
```
which fails on Darwin only every single time saying `Operation not permitted`

It supposed to open the default browser outside the app and, loading the provided url.

Since being able to notify and open a default app looks like very common Desktop App helpers, it surprised me I have errors here, for an otherwise pleasant and straight forward experience in GTK quartz.

As summary: can anyone please confirm development on Darwin is still active and, eventually, if it's me doing something wrong through these basic snippets?

The syntax is ES2016 via jsgtk which is a GJS wrapper but basically all it does is making ruby_cased GJS camelCase and transpile via Babel upfront modules once and on demand before using them, if you'd like a GJS clean example I can write one for you.

The second case would basically be:
```gjs
var uri = 'https://google.com/';
imports.gi.Gio.AppInfo.launch_default_for_uri(uri, null);
```

Thank you in advance for any kind of help/clarification.

Best Regards.





_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux