1. 13 Jan, 2019 1 commit
  2. 23 Sep, 2018 3 commits
    • Ell's avatar
      app: tweak focus behavior of GimpToolWidgetGroup when removing widget · 24fb5971
      Ell authored
      When removing the focus widget of a GimpToolWidgetGroup, use the
      last child, rather than the first child, as the new focus widget.
      This plays nicer with auto-raise, and is probably better anyway.
    • Ell's avatar
      app: in GimpToolWidgetGroup, improve focus behavior when adding/removing widgets · 95d2c92f
      Ell authored
      When a focused widget is added to a group, make it the new focus-
      widget of the group, instead of unsetting its focus if another
      widget already has focus.
      When removing the focused widget from a group, set a different
      widget as the group's focus widget (if one exists), instead of
      unsetting the focus widget, so that nonempty groups always have a
      focus widget.
    • Ell's avatar
      app: in GimpToolWidgetGroup, calculate hover widget at button press · 5b217b3a
      Ell authored
      In gimp_tool_widget_group_button_press(), explicitly call
      gimp_tool_widget_group_hover() before forwarding the event to the
      group's hover widget, so that the hover widget gets recalculated.
      If a widget is added to the group as a result of a button-press
      event, this guarantees that it gets considered as a target for the
      same event.
  3. 18 Sep, 2018 1 commit
    • Ell's avatar
      app, libgimp*, modules: don't use g_type_class_add_private() ... · 3b0040c0
      Ell authored
      g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
      deprecated in GLib 2.58.  Instead, use
      G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
      foo_get_instance_private() functions, all of which are available in
      the GLib versions we depend on.
      This commit only covers types registered using one of the
      G_DEFINE_FOO() macros (i.e., most types), but not types with a
      custom registration function, of which we still have a few -- GLib
      currently only provides a (non-deprecated) public API for adding a
      private struct using the G_DEFINE_FOO() macros.
      Note that this commit was 99% auto-generated (because I'm not
      *that* crazy :), so if there are any style mismatches... we'll have
      to live with them for now.
  4. 11 Jul, 2018 1 commit
  5. 05 Jun, 2018 1 commit
    • Ell's avatar
      app: add GimpToolWidgetGroup · 4ef06b99
      Ell authored
      GimpToolWidgetGroup is a tool widget acting as a container for
      child widgets, multiplexing widget events and demultiplexing tool
      events.  It can be used by tools to display multiple widgets
      The group keeps track of the current focus widget, and hover
      widget.  Certain events are only dispatched to/forwarded from these
      The hover widget is determined by performing a hit test for all the
      children, starting from the last child.  The first widget returning
      GIMP_HIT_DIRECT, if any, is selected as the hover widget;
      otherwise, if the current focus widget returns GIMP_HIT_INDIRECT,
      it's selected; otherwise, if exactly one widget returns
      GIMP_HIT_INDIRECT, it's selected; otherwise, there is no hover
      The focus widget is set when clicking on a widget (or
      programatically, using gimp_tool_widget_set_focus()).
      Additionally, the group can raise the clicked widget to the top of
      the stack (see gimp_tool_widget_group_set_auto_raise().)