X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fprofile-manager.cpp;fp=src%2Fprofile-manager.cpp;h=27ab7549715bad75a6ab20dc650503c2c375ce6b;hb=9dc68827cbd515262ecb8d5ae8547d9e82c72e00;hp=d557fdd39f3bed216d80451737719a7c71b126e8;hpb=072de79e6270f4137fa48a8a73491e8a0904d8f8;p=inkscape.git diff --git a/src/profile-manager.cpp b/src/profile-manager.cpp index d557fdd39..27ab75497 100644 --- a/src/profile-manager.cpp +++ b/src/profile-manager.cpp @@ -2,6 +2,7 @@ * Inkscape::ProfileManager - a view of a document's color profiles. * * Copyright 2007 Jon A. Cruz + * Abhishek Sharma * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -18,18 +19,20 @@ ProfileManager::ProfileManager(SPDocument *document) : _doc(document), _knownProfiles() { - _resource_connection = _doc->resources_changed_connect( "iccprofile", sigc::mem_fun(*this, &ProfileManager::_resourcesChanged) ); + _resource_connection = _doc->connectResourcesChanged( "iccprofile", sigc::mem_fun(*this, &ProfileManager::_resourcesChanged) ); } ProfileManager::~ProfileManager() { + _resource_connection.disconnect(); + _doc = 0; } void ProfileManager::_resourcesChanged() { std::vector newList; if (_doc) { - const GSList *current = _doc->get_resource_list( "iccprofile" ); + const GSList *current = _doc->getResourceList( "iccprofile" ); while ( current ) { newList.push_back(SP_OBJECT(current->data)); current = g_slist_next(current); @@ -94,4 +97,4 @@ ColorProfile* ProfileManager::find(gchar const* name) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :