1. 03 Jul, 2014 1 commit
    • Allison Karlitskaya's avatar
      Add gtk_application_prefers_app_menu() · d3b34d3c
      Allison Karlitskaya authored
      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
      d3b34d3c
  2. 16 Dec, 2013 1 commit
    • Allison Karlitskaya's avatar
      Refactor GtkApplication · 7fd81cf1
      Allison Karlitskaya authored
      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
      7fd81cf1