Skip to content
  • Ell's avatar
    app: streamline GimpHistogram; avoid spurious channel switch in histogram view · fc17f0ed
    Ell authored
    In GimpHistogram, get rid of the "n-channels" property and
    corresponding gimp_histogram_n_channels() function.  The former
    returned the actual number of channels, but this wasn't too useful,
    as channel values may not be sequential; the latter returned the
    number of components.  Instead, add an "n-components" property and
    a corresponding gimp_histogram_n_components() function, both of
    which return the number of components.  Furthermore, add a
    gimp_histogram_has_channel() function, which determines if the
    histogram has a given channel; this allows for simple testing for
    channel availability, which was done wrong in various places.
    
    Adjust the GimpHistogram code for the changes, and clean it up,
    fixing a few bugs.
    
    Adjust users of GimpHisotgram for the changes.  In particular,
    in GimpHisotgramView, fix the channel-availability test when
    setting the view's histogram (which happens whenever the active
    drawable's preview is frozen), ...
    fc17f0ed