Commit Graph

8 Commits

Author SHA1 Message Date
Matthias Clasen
4aa0d16865 Only warn once if inhibit-related dbus calls fail
No need to spam about it.

https://bugzilla.gnome.org/show_bug.cgi?id=734140
2014-11-03 00:48:42 -05:00
Matthias Clasen
d55e3b25a7 Fix various compiler warnings
Mostly missing declarations and missing statics.
2014-09-05 21:21:49 -04:00
Ryan Lortie
d3b34d3cf2 Add gtk_application_prefers_app_menu()
Applications can call this to determine if they should an app menu.
This will be %FALSE on desktop environments that do not have an
application menu like the one in gnome-shell.  It is %FALSE on Windows
and Mac OS.

Applications are completely free to totally ignore this API -- it is
only provided as a hint to help applications that may be interested in
supporting non-GNOME platforms with a more native 'look and feel'.

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-02 20:17:34 -04:00
Bastien Nocera
80993ea47a gtkapplication: Fix incorrect value passed to g_variant_new()
The code expected to format @u, not u.

https://bugzilla.gnome.org/show_bug.cgi?id=728140
2014-04-14 20:27:45 +02:00
Bastien Nocera
1409d7c4bd gtkapplication: Fix passing NULL as the window to inhibit
gtk_application_inhibit() supports passing NULL, so don't
blindly pass the NULL window to
gtk_application_impl_dbus_get_window_system_id().

https://bugzilla.gnome.org/show_bug.cgi?id=728023
2014-04-11 18:51:53 -07:00
Paolo Borelli
90b78f89d3 application-dbus: free strings during finalization 2014-03-30 11:57:23 +02:00
Ryan Lortie
ced939fc11 gtkapplication: fix inhibit
The big refactor contained a small mistake that broke inhibiting.  Fix it.
2013-12-16 14:39:48 -05:00
Ryan Lortie
7fd81cf111 Refactor GtkApplication
gtkapplication.c has turned into a bit of an #ifdef mess over time, and
many of the current checks are incorrect.  As an example, if you build
Gtk for wayland, and exclude the X11 backend, much of the functionality
required by wayland (such as exporting menu models) will be disabled.

Solve that by introducing a backend mechanism to GtkApplication (named
GtkApplicationImpl) similar to the one in GApplication.  Add backends
for Wayland, X11 and Quartz, with X11 and Wayland sharing a common
'DBus' superclass.

                             GtkApplicationImpl
                                      |
                       /--------------+-------------------\
                       |                                  |
            GtkApplicationImplDBus              GtkApplicationImplQuartz
                       |
           /-----------+-----------------\
           |                             |
  GtkApplicationImplX11      GtkApplicationImplWayland

GtkApplicationImpl itself is essentially a bunch of vfuncs that serve as
hooks for various things that the platform-specific backends may be
interested in doing (startup, shutdown, managing windows, inhibit, etc.)

With this change, all platform specific code has been removed from
gtkapplication.c and gtkapplicationwindow.c (both of which are now free
of #ifdefs, except for a UNIX-specific use of GDesktopAppInfo in
gtkapplicationwindow.c).

Additionally, because of the movement of the property-setting code out
of GtkApplicationWindow, the _GTK_APPLICATION_ID properties (and
friends) will be set on non-GtkApplicationWindows, such as dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=720550
2013-12-16 13:51:54 -05:00