diff options
| author | Tobias Ellinghaus <me@houz.org> | 2017-07-05 10:10:59 +0000 |
|---|---|---|
| committer | Tobias Ellinghaus <me@houz.org> | 2017-07-05 10:10:59 +0000 |
| commit | 60d9032701e657344bafda8895bf073e28bab5ae (patch) | |
| tree | 407634848d3ef9e472530fc96df159e77a2ef49b /src/ui/widget | |
| parent | Clean up color-profile and use io/resource for dir scanning (diff) | |
| download | inkscape-60d9032701e657344bafda8895bf073e28bab5ae.tar.gz inkscape-60d9032701e657344bafda8895bf073e28bab5ae.zip | |
Clean up color profiles code
This is a late 2nd part for 86a74b4a93ab62c8ef7819dc549fe7b3ace24916 and
gets rid of the non-descriptive std::pair<ustring, bool>
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/color-icc-selector.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp index 616e9afa8..7928311d5 100644 --- a/src/ui/widget/color-icc-selector.cpp +++ b/src/ui/widget/color-icc-selector.cpp @@ -680,10 +680,16 @@ void ColorICCSelectorImpl::_profilesChanged(std::string const &name) int index = 1; std::vector<SPObject *> current = SP_ACTIVE_DOCUMENT->getResourceList("iccprofile"); - std::set<SPObject *, _cmp> _current(current.begin(), current.end()); - for (std::set<SPObject *, _cmp>::const_iterator it = _current.begin(); it != _current.end(); ++it) { - SPObject *obj = *it; - Inkscape::ColorProfile *prof = reinterpret_cast<Inkscape::ColorProfile *>(obj); + + std::set<Inkscape::ColorProfile *, Inkscape::ColorProfile::pointerComparator> _current; + for (auto &it: current) { + SPObject* obj = it; + Inkscape::ColorProfile* prof = reinterpret_cast<Inkscape::ColorProfile*>(obj); + _current.insert(prof); + } + + for (auto &it: _current) { + Inkscape::ColorProfile *prof = it; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, gr_ellipsize_text(prof->name, 25).c_str(), 1, prof->name, -1); |
