Creation of the ICCProfileCreator

This commit is contained in:
Hombre
2018-06-25 00:43:11 +02:00
parent e2dc8ea2c3
commit fb0c95969b
35 changed files with 1330 additions and 1799 deletions

View File

@@ -21,6 +21,7 @@
#include "rtwindow.h"
#include "options.h"
#include "preferences.h"
#include "iccprofilecreator.h"
#include "cursormanager.h"
#include "rtimage.h"
#include "whitebalance.h"
@@ -228,6 +229,12 @@ RTWindow::RTWindow ()
iFullscreen = new RTImage ("fullscreen.png");
iFullscreen_exit = new RTImage ("fullscreen-exit.png");
Gtk::Button* iccProfileCreator = Gtk::manage (new Gtk::Button ());
setExpandAlignProperties (iccProfileCreator, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
iccProfileCreator->set_image (*Gtk::manage (new RTImage ("gamut-plus.png")));
iccProfileCreator->set_tooltip_markup (M ("MAIN_BUTTON_ICCPROFCREATOR"));
iccProfileCreator->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showICCProfileCreator) );
//Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !?
//Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"..."));
Gtk::Button* preferences = Gtk::manage (new Gtk::Button ());
@@ -256,6 +263,7 @@ RTWindow::RTWindow ()
prProgBar.set_inverted (true);
actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL);
actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1);
actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_BOTTOM, 1, 1);
actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1);
actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1);
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
@@ -263,6 +271,7 @@ RTWindow::RTWindow ()
prProgBar.set_orientation (Gtk::ORIENTATION_HORIZONTAL);
actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL);
actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1);
actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_RIGHT, 1, 1);
actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1);
actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1);
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
@@ -747,6 +756,23 @@ void RTWindow::writeToolExpandedStatus (std::vector<int> &tpOpen)
}
void RTWindow::showICCProfileCreator ()
{
ICCProfileCreator *iccpc = new ICCProfileCreator (this);
iccpc->run ();
delete iccpc;
fpanel->optionsChanged ();
if (epanel) {
epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
}
for (const auto &p : epanels) {
p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
}
}
void RTWindow::showPreferences ()
{
Preferences *pref = new Preferences (this);