Merge master into gtk3
This commit is contained in:
@@ -39,12 +39,12 @@ void ProfilePanel::cleanup ()
|
||||
delete partialProfileDlg;
|
||||
}
|
||||
|
||||
ProfilePanel::ProfilePanel () : storedPProfile(NULL), lastFilename(""), imagePath("")
|
||||
ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath("")
|
||||
{
|
||||
|
||||
set_name("ProfilePanel");
|
||||
|
||||
tpc = NULL;
|
||||
tpc = nullptr;
|
||||
|
||||
profileFillModeOnImage = new RTImage("profile-filled.png");
|
||||
profileFillModeOffImage = new RTImage("profile-partial.png");
|
||||
@@ -97,8 +97,8 @@ ProfilePanel::ProfilePanel () : storedPProfile(NULL), lastFilename(""), imagePat
|
||||
copy->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::copy_clicked) );
|
||||
paste->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::paste_clicked) );
|
||||
|
||||
custom = NULL;
|
||||
lastsaved = NULL;
|
||||
custom = nullptr;
|
||||
lastsaved = nullptr;
|
||||
dontupdate = false;
|
||||
|
||||
profileStore.addListener(this);
|
||||
@@ -134,20 +134,12 @@ ProfilePanel::~ProfilePanel ()
|
||||
|
||||
bool ProfilePanel::isCustomSelected()
|
||||
{
|
||||
if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")");
|
||||
}
|
||||
|
||||
bool ProfilePanel::isLastSavedSelected()
|
||||
{
|
||||
if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")");
|
||||
}
|
||||
|
||||
Gtk::TreeIter ProfilePanel::getCustomRow()
|
||||
@@ -198,7 +190,7 @@ void ProfilePanel::storeCurrentValue ()
|
||||
const ProfileStoreEntry *entry = profiles->getSelectedEntry();
|
||||
const PartialProfile *currProfile;
|
||||
|
||||
if (entry && (currProfile = profileStore.getProfile(entry)) != NULL) {
|
||||
if (entry && (currProfile = profileStore.getProfile(entry)) != nullptr) {
|
||||
// now storedPProfile has the current entry's values
|
||||
storedPProfile = new PartialProfile(currProfile->pparams, currProfile->pedited, true);
|
||||
} else {
|
||||
@@ -257,7 +249,7 @@ void ProfilePanel::restoreValue ()
|
||||
if (storedPProfile) {
|
||||
storedPProfile->deleteInstance();
|
||||
delete storedPProfile;
|
||||
storedPProfile = NULL;
|
||||
storedPProfile = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +318,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
|
||||
toSave = lastsaved;
|
||||
} else {
|
||||
const ProfileStoreEntry* entry = profiles->getSelectedEntry();
|
||||
toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : NULL;
|
||||
toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : nullptr;
|
||||
}
|
||||
|
||||
if (toSave) {
|
||||
@@ -396,7 +388,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event)
|
||||
toSave = lastsaved;
|
||||
} else {
|
||||
const ProfileStoreEntry* entry = profiles->getSelectedEntry();
|
||||
toSave = entry ? profileStore.getProfile (entry) : NULL;
|
||||
toSave = entry ? profileStore.getProfile (entry) : nullptr;
|
||||
}
|
||||
|
||||
// toSave has to be a complete procparams
|
||||
@@ -510,7 +502,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event)
|
||||
if (event->state & Gdk::CONTROL_MASK)
|
||||
// custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited & partialPaste.pedited )
|
||||
{
|
||||
partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe);
|
||||
partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe);
|
||||
} else {
|
||||
// custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited )
|
||||
pe.combine(*custom->pparams, pp, true);
|
||||
@@ -525,7 +517,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event)
|
||||
// we delete custom
|
||||
custom->deleteInstance();
|
||||
delete custom;
|
||||
custom = NULL;
|
||||
custom = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,7 +601,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event)
|
||||
if (event->state & Gdk::CONTROL_MASK)
|
||||
// custom.pparams = clipboard.pparams filtered by ( clipboard.pedited & partialPaste.pedited )
|
||||
{
|
||||
partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe);
|
||||
partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe);
|
||||
} else {
|
||||
// custom.pparams = clipboard.pparams filtered by ( clipboard.pedited )
|
||||
pe.combine(*custom->pparams, pp, true);
|
||||
@@ -622,7 +614,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event)
|
||||
if (event->state & Gdk::CONTROL_MASK)
|
||||
// custom.pparams = clipboard.pparams filtered by ( partialPaste.pedited )
|
||||
{
|
||||
partialProfileDlg->applyPaste (custom->pparams, NULL, &pp, NULL);
|
||||
partialProfileDlg->applyPaste (custom->pparams, nullptr, &pp, nullptr);
|
||||
} else {
|
||||
// custom.pparams = clipboard.pparams non filtered
|
||||
*custom->pparams = pp;
|
||||
@@ -719,21 +711,21 @@ void ProfilePanel::procParamsChanged (rtengine::procparams::ProcParams* p, rteng
|
||||
void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams* lastSaved)
|
||||
{
|
||||
|
||||
const ProfileStoreEntry *pse = NULL;
|
||||
const PartialProfile *defprofile = NULL;
|
||||
const ProfileStoreEntry *pse = nullptr;
|
||||
const PartialProfile *defprofile = nullptr;
|
||||
|
||||
bool ccPrevState = changeconn.block(true);
|
||||
|
||||
if (custom) {
|
||||
custom->deleteInstance();
|
||||
delete custom;
|
||||
custom = NULL;
|
||||
custom = nullptr;
|
||||
}
|
||||
|
||||
if (lastsaved) {
|
||||
lastsaved->deleteInstance();
|
||||
delete lastsaved;
|
||||
lastsaved = NULL;
|
||||
lastsaved = nullptr;
|
||||
}
|
||||
|
||||
if (lastSaved) {
|
||||
|
Reference in New Issue
Block a user