1. 17 Apr, 2018 1 commit
  2. 04 Oct, 2017 1 commit
    • Colomban Wendling's avatar
      Enter submenus when activating their parent item · 367ff368
      Colomban Wendling authored
      This gives consistent behavior with e.g. Qt, Mozilla's suites and
      LibreOffice (with non-truly native backends like "gen" and "gtk",
      but unlike "gtk2" and "gtk3" ones that probably use true GTK menus).
      
      This behavior is expected by at least some accessibility users, and
      it seems good to behave like other common applications and toolkits
      in this area.  There should be no issue in doing so either for current
      users, as it only enters the submenu instead of not doing anything.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=778811
      367ff368
  3. 20 Jan, 2017 1 commit
  4. 29 Aug, 2016 1 commit
  5. 20 Apr, 2016 1 commit
  6. 14 Dec, 2015 1 commit
  7. 03 Nov, 2015 1 commit
    • Cosimo Cecchi's avatar
      menushell: don't call gtk_render_background() · f6ca908e
      Cosimo Cecchi authored
      GtkMenu and GtkMenuBar, the two implementations of GtkMenuShell in GTK,
      already draw it.
      Furthermore, rendering a background here will overdraw any rendering
      that the subclass will do, such as arrows for scrolling menus.
      f6ca908e
  8. 14 Sep, 2015 1 commit
    • Alexander Larsson's avatar
      gtk: Stop setting GDK_EXPOSURE_MASK on random widgets · d5f17549
      Alexander Larsson authored
      These days exposure happens only on the native windows (generally the
      toplevel window) and is propagated down recursively. The expose event
      is only useful for backwards compat, and in fact, for double buffered
      widgets we totally ignore the event (and non-double buffering breaks
      on wayland).
      
      So, by not setting the mask we avoid emitting these events and then
      later ignoring them.
      
      We still keep it on eventbox, fixed and layout as these are used
      in weird ways that want backwards compat.
      d5f17549
  9. 01 Jul, 2015 1 commit
  10. 22 Dec, 2014 1 commit
    • Allison Karlitskaya's avatar
      GtkMenuTracker: add hidden-when='macos-menubar' · 6b26664c
      Allison Karlitskaya authored
      Provide a mechanism for hiding the "Quit", "About" and "Preferences"
      menu items from the normal places in a traditional menubar layout (in
      the File and Edit menus) when the menu is being rendered in the Mac OS
      menubar.
      
      These items can already be found in the application menu.
      
      With this feature, applications can now define a single menu to use in
      all 'traditional' scenarios.
      
      Use this new attribute in Bloatpad.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=741610
      6b26664c
  11. 09 Dec, 2014 1 commit
    • Carlos Soriano's avatar
      gtkwindow: Use actions from focused widget to activate accel · 235837ad
      Carlos Soriano authored
      Currently we only take into account the window GActionGroup for
      activating the accels.
      
      However, the application could have some custom GActionGroup in the
      chain of focused widgets that could want to activate some action if
      some accel is activated while that widget is focused.
      
      To allow applications to set accels on widgets that use custom
      GActionGroups, simply use the muxer of the focused widget, which
      already contains the actions of the parents.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=740682
      235837ad
  12. 16 Jun, 2014 1 commit
    • Allison Karlitskaya's avatar
      menu binding: emit submenu close after activate · b532e1ff
      Allison Karlitskaya authored
      We want to make sure that the submenu action is changed back to FALSE
      _after_ the menu item has been activated.  This prevents the menu
      teardown handler from deleting the menu item before it can be activated.
      
      Unfortunately, GtkMenuShell emits "hide" before the item activation.
      This is probably done to prevent the application from doing things like
      showing dialogs when the menu is still holding the grab.
      
      In the case where we are doing an activate, set a boolean flag on each
      of the open menus (following the parent stack) indicating that we'll be
      emitting another signal soon (selection done).  If that flag is set, we
      defer the setting of the submenu action until we receive the second
      signal.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=729820
      b532e1ff
  13. 09 Jun, 2014 1 commit
  14. 28 May, 2014 1 commit
  15. 14 May, 2014 1 commit
  16. 29 Apr, 2014 2 commits
  17. 28 Apr, 2014 2 commits
    • Allison Karlitskaya's avatar
      GtkMenuTracker: add 'merge_sections' flag · d930716d
      Allison Karlitskaya authored
      Add the possibility of a GtkMenuTracker that performs no section
      merging.  Instead, it will report an item in the form of a separator for
      subsections.  It is then possible to get a separate tracker for the
      subsection contents by using gtk_menu_tracker_new_for_item_link().
      d930716d
    • Allison Karlitskaya's avatar
      GtkMenuTracker: don't specialise "submenu" link · f6ee0076
      Allison Karlitskaya authored
      We have some API in GtkMenuTracker and GtkMenuTrackerItem that is
      specifically designed to deal with submenus.
      
      Generalise these APIs to take a 'link_name' parameter that we always
      give as G_MENU_SUBMENU for now.  In the future, this will allow creating
      trackers for other types of links, such as sections.
      f6ee0076
  18. 03 Mar, 2014 1 commit
  19. 07 Feb, 2014 3 commits
  20. 05 Feb, 2014 2 commits
  21. 02 Feb, 2014 1 commit
  22. 21 Jan, 2014 1 commit
  23. 18 Jan, 2014 1 commit
  24. 13 Jan, 2014 1 commit
    • Matthias Clasen's avatar
      Redo csd window-dragging · 2232430a
      Matthias Clasen authored
      The window-dragging code had a number of issues: The code was
      starting a drag on every button press, never bothering to cancel
      them. This leads to the odd hand cursor occurring between the two
      clicks to maximize. We relied on GDK's multi-click detection, which
      gives us triple-clicks when we really want sequences of double-clicks.
      Lastly, we didn't propery restrict double-click handling to the primary
      button, so e.g. if you had a window on an empty workspace, double-right
      click on the titlebar would maximize it, which is not intended.
      
      This commit solves all three problem by a doing our own double-click
      detection, and only starting a drag when the pointer goes out of
      'double-click range'. We change the way dragging is implemented for
      menubars and toolbars to just letting events bubble up, so they
      get the same behaviour as the titlebar. To make this work, we
      have to select for pointer motion events in a few more places.
      2232430a
  25. 04 Jan, 2014 1 commit
  26. 09 Nov, 2013 1 commit
  27. 14 Aug, 2013 1 commit
  28. 09 Jul, 2013 1 commit
  29. 27 Jun, 2013 1 commit
  30. 26 Jun, 2013 3 commits
  31. 24 Jun, 2013 1 commit
    • Allison Karlitskaya's avatar
      menu model: set separator label conditionally · c79a21e1
      Allison Karlitskaya authored
      When creating separators we were binding the "label" property on the
      tracker to the "label" property on the GtkSeparatorMenuItem.
      
      This was problematic for two reasons.
      
      First, it was pointless.  The section header label will never change.
      
      Second, it was causing problems: doing the binding caused the value to
      be initially synced up, even if it was NULL.  Doing this caused
      GtkMenuItem to create a GtkAccelLabel and add it as a child, which
      prevented the separator from being shown normally.
      
      Change the code a bit so that we just call gtk_menu_item_set_label()
      when creating the item, if we find the label to be non-NULL.
      
      Also, show() the separator item at first.  GtkMenu manages visibility of
      separators internally, but it seems "more correct" to show it ourselves
      at first.
      c79a21e1
  32. 22 Jun, 2013 1 commit
  33. 13 May, 2013 1 commit
    • Allison Karlitskaya's avatar
      add GtkMenuTrackerItem · a4276a6c
      Allison Karlitskaya authored
      Add a new class, GtkMenuTrackerItem that represents a menu item, to be
      used with GtkMenuTracker.
      
      GtkMenuTracker's insert callback now works in terms of this new type
      (instead of passing reference to the model and an index to the item).
      
      GtkMenuShell now handles all of the binding tasks internally, mostly
      through the use of property bindings.  Having bindings for the label and
      visibility attributes, in partiular, will help with supporting upcoming
      extensions to GMenuModel.
      
      GtkModelMenu has been reduced to a helper class that has nothing to do
      with GMenuModel.  It represents something closer to an "ideal" API for
      GtkMenuItem if we didn't have compatibility concerns (eg: not emitting
      "activate" when setting toggle state, no separate subclasses per menu
      item type, supporting icons, etc.) Improvements to GtkMenuItem could
      eventually shrink the size of this class or remove the need for it
      entirely.
      
      Some GtkActionHelper functionality has been duplicated in
      GtkMenuTracker, which is suboptimal.  The duplication exists so that
      other codebases (such as Unity and gnome-shell) can reuse the
      GtkMenuTracker code, whereas GtkActionHelper is very much tied to
      GtkWidget.  Supporting binding arbitrary GtkWidgets to actions vs.
      supporting the full range of GMenuModel features for menu items turns
      out to be two overlapping but not entirely similar problems.  Some of
      the duplication (such as roles) can be removed from GtkActionHelper once
      Gtk's internal Mac OS menubar support is ported to GtkMenuTracker.
      
      The intent to reuse the code outside of Gtk is also the reason for the
      unusual treatment of the enum type introduced in this comment.
      
      This adds no new "public" API to the Gtk library, other than types that
      we cannot make private due to GType limitations.
      a4276a6c