1. 07 Jan, 2019 1 commit
    • Jehan's avatar
      app: make layer picking a generic modifier of the shell. · 4c337353
      Jehan authored
      Instead of having layer picking only on paint tools with alt-click, make
      it available everywhere with alt-middle click. Moving through layers is
      also a way to navigate an image, so it actually makes sense to be with
      other modifiers (panning, zooming, rotating), while making the feature
      more generic (this is definitely useful whatever the selected tool).
      4c337353
  2. 21 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Initial space invasion commit in GIMP · e09e563a
      Michael Natterer authored
      All babl formats now have a space equivalent to a color profile,
      determining the format's primaries and TRCs. This commit makes GIMP
      aware of this.
      
      libgimp:
      
      - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
        as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
        NON_LINEAR and PERCPTUAL for each encoding, matching the babl
        encoding variants RGB, R'G'B' and R~G~B~.
      
      - gimp_color_transform_can_gegl_copy() now returns TRUE if both
        profiles can return a babl space, increasing the amount of fast babl
        color conversions significantly.
      
      - TODO: no solution yet for getting libgimp drawable proxy buffers in
        the right format with space.
      
      plug-ins:
      
      - follow the GimpPrecision change.
      
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      
      app:
      
      - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
        replacement for all "linear" booleans.
      
      - change gimp-babl functions to take babl spaces and GimpTRCType
        parameters and support all sorts of new perceptual ~ formats.
      
      - a lot of places changed in the early days of goat invasion didn't
        take advantage of gimp-babl utility functions and constructed
        formats manually. They all needed revisiting and many now use much
        simpler code calling gimp-babl API.
      
      - change gimp_babl_format_get_color_profile() to really extract a
        newly allocated color profile from the format, and add
        gimp_babl_get_builtin_color_profile() which does the same as
        gimp_babl_format_get_color_profile() did before. Visited all callers
        to decide whether they are looking for the format's actual profile,
        or for one of the builtin profiles, simplifying code that only needs
        builtin profiles.
      
      - drawables have a new get_space_api(), get_linear() is now get_trc().
      
      - images now have a "layer space" and an API to get it,
        gimp_image_get_layer_format() returns formats in that space.
      
      - an image's layer space is created from the image's color profile,
        change gimpimage-color-profile to deal with that correctly
      
      - change many babl_format() calls to babl_format_with_space() and take
        the space from passed formats or drawables
      
      - add function gimp_layer_fix_format_space() which replaces the
        layer's buffer with one that has the image's layer format, but
        doesn't change pixel values
      
      - use gimp_layer_fix_format_space() to make sure layers loaded from
        XCF and created by plug-ins have the right space when added to the
        image, because it's impossible to always assign the right space upon
        layer creation
      
      - "assign color profile" and "discard color profile" now require use
        of gimp_layer_fix_format_space() too because the profile is now
        embedded in all formats via the space.  Add
        gimp_image_assign_color_profile() which does all that and call it
        instead of a simple gimp_image_set_color_profile(), also from the
        PDB set-color-profile functions, which are essentially "assign" and
        "discard" calls.
      
      - generally, make sure a new image's color profile is set before
        adding layers to it, gimp_image_set_color_profile() is more than
        before considered know-what-you-are-doing API.
      
      - take special precaution in all places that call
        gimp_drawable_convert_type(), we now must pass a new_profile from
        all callers that convert layers within the same image (such as
        image_convert_type, image_convert_precision), because the layer's
        new space can't be determined from the image's layer format during
        the call.
      
      - change all "linear" properties to "trc", in all config objects like
        for levels and curves, in the histogram, in the widgets. This results
        in some GUI that now has three choices instead of two.
        TODO: we might want to reduce that back to two later.
      
      - keep "linear" boolean properties around as compat if needed for file
        pasring, but always convert the parsed parsed boolean to
        GimpTRCType.
      
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
      e09e563a
  3. 11 Jul, 2018 1 commit
  4. 01 Jul, 2018 1 commit
    • Michael Natterer's avatar
      app: remove all calls to gdk_window_process_updated() · 3089a201
      Michael Natterer authored
      - remove gimp_widget_flush_expose()
      - remove the "now" argument to gimp_display_shell_flush() and make it
        only update widget states
      - rename gimp_display_flush_whenever() to gimp_display_flush_update_region()
        and call gimp_display_shell_flush() separately in the only case we
        passed FALSE to flush_whenever()
      - remove th flush_now interval logic from GimpDisplay, as soon as we
        have exposed the canvas, we are in the loop for the next frame clock
        tick anyway, so delaying a useless and removed process_updates serves
        no purpose
      - in gimptool-progress.c, create the invisible grab widget also for
        non-cencelable cases, so we can always safely run the main loop
        manually to make the progress updates visible
      - in gimp-gegl-apply-operation.c, always run the main loop manually
        to make the progress updates visible
      - in gimpstatusbar.c, leave some FIXME comments as reminder that
        we might need the same logic as in gimptool-progress.c
      3089a201
  5. 27 Jun, 2018 1 commit
    • Michael Natterer's avatar
      app: don't do any queue_resize() in the canvas' size-allocate callback · c0480f50
      Michael Natterer authored
      which means we can't setup scrollbars there. Move the code to a
      GtkTickCallback which runs before the next frame after the
      size-allocate.
      
      Also put the center_image_on_size_allocate() code there because it has
      to run after the canvas' tick callback, and the order of tick
      callbacks can't be controlled.
      
      As a side effect we now have a flag in GimpDisplayShell which
      indicates that there will be a size allocate before the next frame, so
      simply skip drawing the canvas completely. This fixes new images
      jumping around when they are first shown.
      c0480f50
  6. 04 Jun, 2018 1 commit
  7. 20 May, 2018 3 commits
  8. 14 Apr, 2018 1 commit
    • Jehan's avatar
      Bug 724692 - Canvas rotation stuck with specific order of actions. · 3ac79481
      Jehan authored
      Commit b279c2d2 was breaking a specific use case, which I oversaw:
      when space bar activates the move tool, you may want to release the
      space bar while mouse button is pressed, and expect to still be able to
      move the layer/selection/guide, but releasing space was stopping the
      move immediately. The move tool must only be deactivated when both space
      and button 1 are released, and the move itself must continue as long as
      button 1 is pressed (when started while space was pressed).
      
      As a nice side effect of this commit, panning and canvas rotation are
      also improved since now they can be continued while releasing space
      (respectively shift-space) if mouse button 1 was pressed, and up until
      the mouse button is released. Pressing space again, then releasing the
      mouse, back and forth, also work as expected (i.e. move tool stay
      activated though the move stops; and panning or rotation continue).
      
      Of course now we don't get anymore panning/rotation stuck while neither
      space nor mouse buttons are pressed (which was the original bug). At
      least one of these need to stay pressed for panning/rotation/move to
      stay activated. And initial activation is obviously always through
      (shift-)space only.
      3ac79481
  9. 16 Mar, 2018 1 commit
    • Jehan's avatar
      Bug 724692 - Canvas rotation stuck with specific order of actions. · b279c2d2
      Jehan authored
      The bug was affecting actually both canvas rotation and panning when
      done with space key. If the first mouse button was also clicked, then
      released after the space key, we ended up in some stuck action. It could
      only be unstuck by hitting/releasing space again.
      
      I am actually unsure that this was not originally done on purpose,
      especially since the code has these 2 status variables space_pressed and
      space_release_pending, but really apart from looking at this code, the
      behavior just looks very buggy and impracticable.
      The new behavior is to just stop the canvas panning/rotation as soon as
      space is released (which is also how it is documented in our manual, and
      how everyone seems to use the feature). I only kept the variable
      space_release_pending, which I use as was used space_pressed before.
      b279c2d2
  10. 02 Jan, 2018 1 commit
  11. 03 Nov, 2017 1 commit
    • Ell's avatar
      app: apply display filters in sRGB, not monitor profile · 9cd8e7f9
      Ell authored
      When we have display filters, break the color profile transform in
      two: first, convert from the image profile to sRGB, then apply the
      filters, then convert from sRGB to the monitor profile.
      9cd8e7f9
  12. 22 Feb, 2017 1 commit
    • Ell's avatar
      Bug 778966 - severe input lag with ruler and one window mode ... · 4c5f6a8e
      Ell authored
      .. due to gdk_pixbuf_scale() with themes using the pixbuf engine
      
      Make GimpDisplayShell a subclass of GtkEventBox, so that it gets its
      own window, isolating its events from those of its ancestors.
      
      In particular, the "expose" event handler of GtkNotebook, which the
      shell is a child of in SWM, is particularly slow with themes that
      use the pixbuf engine.  If the notebook and the shell use the same
      window, this can cause notable, and somtimes severe, lag when the
      rulers or scrollbars are updated frequently, such as when rapidly
      moving the cursor.
      4c5f6a8e
  13. 16 Nov, 2016 1 commit
  14. 24 Sep, 2016 2 commits
  15. 26 May, 2016 1 commit
    • Michael Natterer's avatar
      libgimpcolor: add new object GimpColorTransform · cc928879
      Michael Natterer authored
      which encapsulates a cmsHTRANSFORM and does all the pixel format
      conversion magic. It has API to create transforms and proofing
      transforms, and to convert pixels arrays and GeglBuffers.
      
      Before, each place which has a transform had to keep around the
      transform and its input and output Babl formats, and had to implement
      lots of stuff itself. Now all that lives in GimpColorTransform,
      removing lots of logic from many places, and pretty much removing lcms
      from the public API entirely.
      
      This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
      almost all directories and potentially allows to replace lcms by
      something else.
      cc928879
  16. 14 May, 2016 1 commit
    • Michael Natterer's avatar
      Bug 320447 - fast switching between "color managed display" and "softproof" · 406d1b9c
      Michael Natterer authored
      Add a View -> Color Management submenu that allows to change
      the color management mode per-display.
      
      Internally, keep a GimpColorConfig object around per-display that
      is synchronized with the global config except for the properties
      that have a per-display GUI (currently the mode).
      
      Also provide an "As in Preferences" menu item to follow the global
      settings again.
      406d1b9c
  17. 13 May, 2016 1 commit
    • Michael Natterer's avatar
      app: add a GimpColorConfig to GimpDisplayShell · af976a75
      Michael Natterer authored
      Use the shell's color config for color managing the display and
      various auxiliary widgets attached to it, like the notebook tab widget
      and navigation popup.
      
      The config is currently just a reference to the global prefs config,
      so no behavior changed.
      af976a75
  18. 05 Feb, 2016 1 commit
  19. 05 Jan, 2016 1 commit
  20. 13 Nov, 2015 1 commit
  21. 26 Oct, 2015 1 commit
  22. 03 Jul, 2015 1 commit
  23. 01 Jun, 2015 1 commit
  24. 27 May, 2015 1 commit
  25. 11 Jun, 2014 1 commit
  26. 02 May, 2014 1 commit
    • Michael Natterer's avatar
      app: pass the startup monitor to displays opened from the copmmand line · 8356003f
      Michael Natterer authored
      Change gimp_get_display_name() to also return the screen, and its
      implementation in the GUI to return the initial monitor during
      startup. Retrieve that information in app.c using a weird callback
      construct and pass the monitor to file_open_from_command_line().
      
      Half-related, add screen and monitor parameters to GimpDisplayShell
      and use these initial values for calculating the canvas's initial
      extents.
      
      The image windows still don't position themselves correctly though
      because we have no mechanism for that whatsoever just yet, but we now
      at least pass the needed monitor information to the right objects.
      8356003f
  27. 10 Feb, 2014 1 commit
  28. 02 Nov, 2013 1 commit
  29. 28 Sep, 2013 1 commit
  30. 27 Aug, 2013 1 commit
    • Jehan's avatar
      Bug 704065 - Snap default preferences are now settable in the preferences. · 0df8ae52
      Jehan authored
      Along with this change, the snap preferences have been moved from
      GimpDisplayConfig to GimpDisplayOptions, where it makes much more sense.
      One of the consequences is that there is no need to duplicate these
      values in GimpDisplayShell anymore to differenciate defaults and
      current settings.
      0df8ae52
  31. 22 Jun, 2013 1 commit
    • Michael Natterer's avatar
      Bug 702369 - foreground selection doesnt work with image precision >8 bit · 31e9cc2a
      Michael Natterer authored
      This removes the obsolete check which makes the tool fail from
      gimp_display_shell_set_mask(). Also change the foreground select tool
      and the display mask from using GimpChannel to GeglBuffer, because
      that's what it needs, simply buffers. Most changed files simply newly
      include <gegl.h> because a GeglBuffer appeared in two headers.
      31e9cc2a
  32. 23 Apr, 2013 1 commit
  33. 21 Apr, 2013 1 commit
  34. 20 Apr, 2013 3 commits
  35. 18 Apr, 2013 1 commit