Re: GDBus support on Win32 + other platforms (Was Re: GtkApplication and argc/arv)



On Mon, 2011-03-07 at 22:52 +0000, Emmanuele Bassi wrote:
> On 2011-03-07 at 18:40, Tristan Van Berkom wrote:
> > Will use of GtkApplication cause my app to simply fail just because
> > a win32/osx implementation is missing ? or will it silently succeed ?
> 
> there is nothing X11-specific in GApplication or GtkApplication.
> 
> in fact, if you install D-Bus on OSX or Windows, GApplication will work
> just as fine as on Linux.
> 
> what's missing is a non-DBus IPC mechanism for platforms that have a
> system IPC API.

Sure, but if there is no dbus, running a GtkApplication should surely
at least run the GTK+ main loop.

If GTK+ passes the configure script on any supported platform, running
a gapplication should, IMO, at least run the main loop.

What we have now is a situation with absolutely no fallback at all,
so people have to write:

#if HAVE_DBUS

... use GtkApplication ...

#else

.. initialize everything and call gtk_main()

#endif

So a cross-platform app cannot use GtkApplication without itself
installing it's own custom made fallbacks and only conditionally
using GtkApplication.

I'm sorry but I *expect* these fallbacks to be in
GApplication/GtkApplication, that's what I expect from
this thing we call a multi-platform toolkit... I expect
to not have to write '#ifdef WIN32' in my code, and
when I go ahead and use an object from glib/gtk+, I expect
it to be safe, compile, run and at least do it's best
on every supported platform.

Things like "gtk_window_set_decorated()" are documented as
"it might not work, depends on your window manager", however
those things do not deny you from creating a GtkWindow when
using sawfish.

Features of GtkApplication such as application uniqueness
and actions exported over the bus should be documented
as "action will only be exported on a bus if dbus or
another backend is available on your system" or such.

Those conditions should not result on g_application_run()
simply not running the mainloop and returning just because
it cannot do IPC.

  a.) It's a high expectation and GTK+ has until now, to
      my knowledge always fulfilled this expectation.

  b.) It's damn easy to make GApplication at least startup
      correctly, run the main loop and just not use any IPC, 
      it's the least I think that one can expect.

So can we at least concede that GApplication should have
a fallback and at least be usable on a system with no IPC ?
(even, say.. a linux system with no dbus installed ?).

Regards,
         -Tristan




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