Comment removed + file astylized
This commit is contained in:
@@ -58,6 +58,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles ();
|
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles ();
|
||||||
|
|
||||||
for (std::vector<Glib::ustring>::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) {
|
for (std::vector<Glib::ustring>::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) {
|
||||||
profileBox.append (*iterator);
|
profileBox.append (*iterator);
|
||||||
}
|
}
|
||||||
@@ -94,17 +95,21 @@ private:
|
|||||||
Glib::ustring profile;
|
Glib::ustring profile;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
if (profileBox.get_active_row_number () == 1) {
|
if (profileBox.get_active_row_number () == 1) {
|
||||||
profile = rtengine::iccStore->getDefaultMonitorProfileName ();
|
profile = rtengine::iccStore->getDefaultMonitorProfileName ();
|
||||||
|
|
||||||
if (profile.empty ()) {
|
if (profile.empty ()) {
|
||||||
profile = options.rtSettings.monitorProfile;
|
profile = options.rtSettings.monitorProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile.empty ()) {
|
if (profile.empty ()) {
|
||||||
profile = "sRGB IEC61966-2.1";
|
profile = "sRGB IEC61966-2.1";
|
||||||
}
|
}
|
||||||
} else if (profileBox.get_active_row_number () > 1) {
|
} else if (profileBox.get_active_row_number () > 1) {
|
||||||
profile = profileBox.get_active_text ();
|
profile = profileBox.get_active_text ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring ();
|
profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring ();
|
||||||
#endif
|
#endif
|
||||||
@@ -134,14 +139,17 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
rtengine::RenderingIntent intent;
|
rtengine::RenderingIntent intent;
|
||||||
|
|
||||||
switch (intentBox.getSelected ()) {
|
switch (intentBox.getSelected ()) {
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
intent = rtengine::RI_RELATIVE;
|
intent = rtengine::RI_RELATIVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
intent = rtengine::RI_PERCEPTUAL;
|
intent = rtengine::RI_PERCEPTUAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
intent = rtengine::RI_ABSOLUTE;
|
intent = rtengine::RI_ABSOLUTE;
|
||||||
break;
|
break;
|
||||||
@@ -182,24 +190,27 @@ public:
|
|||||||
ConnectionBlocker intentBlocker (intentConn);
|
ConnectionBlocker intentBlocker (intentConn);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
if (options.rtSettings.autoMonitorProfile) {
|
if (options.rtSettings.autoMonitorProfile) {
|
||||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1);
|
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1);
|
||||||
} else {
|
} else {
|
||||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (options.rtSettings.monitorIntent)
|
switch (options.rtSettings.monitorIntent) {
|
||||||
{
|
|
||||||
default:
|
default:
|
||||||
case rtengine::RI_RELATIVE:
|
case rtengine::RI_RELATIVE:
|
||||||
intentBox.setSelected (0);
|
intentBox.setSelected (0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_PERCEPTUAL:
|
case rtengine::RI_PERCEPTUAL:
|
||||||
intentBox.setSelected (1);
|
intentBox.setSelected (1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_ABSOLUTE:
|
case rtengine::RI_ABSOLUTE:
|
||||||
intentBox.setSelected (2);
|
intentBox.setSelected (2);
|
||||||
break;
|
break;
|
||||||
@@ -378,18 +389,11 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
|||||||
setExpandAlignProperties(sendtogimp, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(sendtogimp, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
|
|
||||||
// Status box
|
// Status box
|
||||||
cssProvider = Gtk::CssProvider::create();
|
|
||||||
progressLabel = Gtk::manage (new MyProgressBar(300));
|
progressLabel = Gtk::manage (new MyProgressBar(300));
|
||||||
progressLabel->set_show_text(true);
|
progressLabel->set_show_text(true);
|
||||||
setExpandAlignProperties(progressLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(progressLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
progressLabel->set_fraction(0.0);
|
progressLabel->set_fraction(0.0);
|
||||||
|
|
||||||
// TODO is this needed? What for?
|
|
||||||
/*if (cssProvider) {
|
|
||||||
progressLabel->get_style_context()->add_provider (cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); // Can't find the gtkmm version of the enum!
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
// tbRightPanel_1
|
// tbRightPanel_1
|
||||||
tbRightPanel_1 = new Gtk::ToggleButton ();
|
tbRightPanel_1 = new Gtk::ToggleButton ();
|
||||||
iRightPanel_1_Show = new RTImage ("panel-to-left.png");
|
iRightPanel_1_Show = new RTImage ("panel-to-left.png");
|
||||||
@@ -444,24 +448,27 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
|||||||
// ================== PACKING THE BOTTOM WIDGETS =================
|
// ================== PACKING THE BOTTOM WIDGETS =================
|
||||||
|
|
||||||
// Adding widgets from center to the left, on the left side (using Gtk::POS_LEFT)
|
// Adding widgets from center to the left, on the left side (using Gtk::POS_LEFT)
|
||||||
//iops->attach_next_to(*vsep2, Gtk::POS_LEFT, 1, 1);
|
|
||||||
iops->attach_next_to(*progressLabel, Gtk::POS_LEFT, 1, 1);
|
iops->attach_next_to(*progressLabel, Gtk::POS_LEFT, 1, 1);
|
||||||
iops->attach_next_to(*vsep1, Gtk::POS_LEFT, 1, 1);
|
iops->attach_next_to(*vsep1, Gtk::POS_LEFT, 1, 1);
|
||||||
iops->attach_next_to(*sendtogimp, Gtk::POS_LEFT, 1, 1);
|
iops->attach_next_to(*sendtogimp, Gtk::POS_LEFT, 1, 1);
|
||||||
|
|
||||||
if(!simpleEditor) {
|
if(!simpleEditor) {
|
||||||
iops->attach_next_to(*queueimg, Gtk::POS_LEFT, 1, 1);
|
iops->attach_next_to(*queueimg, Gtk::POS_LEFT, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
iops->attach_next_to(*saveimgas, Gtk::POS_LEFT, 1, 1);
|
iops->attach_next_to(*saveimgas, Gtk::POS_LEFT, 1, 1);
|
||||||
|
|
||||||
// Adding widgets from center to the right, on the right side (using Gtk::POS_RIGHT)
|
// Adding widgets from center to the right, on the right side (using Gtk::POS_RIGHT)
|
||||||
iops->attach_next_to(*vsep2, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*vsep2, Gtk::POS_RIGHT, 1, 1);
|
||||||
monitorProfile->pack_right_in (iops);
|
monitorProfile->pack_right_in (iops);
|
||||||
|
|
||||||
if (!simpleEditor && !options.tabbedUI) {
|
if (!simpleEditor && !options.tabbedUI) {
|
||||||
iops->attach_next_to(*vsep3, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*vsep3, Gtk::POS_RIGHT, 1, 1);
|
||||||
iops->attach_next_to(*navPrev, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*navPrev, Gtk::POS_RIGHT, 1, 1);
|
||||||
iops->attach_next_to(*navSync, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*navSync, Gtk::POS_RIGHT, 1, 1);
|
||||||
iops->attach_next_to(*navNext, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*navNext, Gtk::POS_RIGHT, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
iops->attach_next_to(*vsepz2, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*vsepz2, Gtk::POS_RIGHT, 1, 1);
|
||||||
iops->attach_next_to(*iareapanel->imageArea->zoomPanel, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*iareapanel->imageArea->zoomPanel, Gtk::POS_RIGHT, 1, 1);
|
||||||
iops->attach_next_to(*vsepz3, Gtk::POS_RIGHT, 1, 1);
|
iops->attach_next_to(*vsepz3, Gtk::POS_RIGHT, 1, 1);
|
||||||
|
@@ -56,7 +56,6 @@ private:
|
|||||||
|
|
||||||
Glib::ustring lastSaveAsFileName;
|
Glib::ustring lastSaveAsFileName;
|
||||||
bool realized;
|
bool realized;
|
||||||
Glib::RefPtr<Gtk::CssProvider> cssProvider; // to be able to set the ProgressBar's background
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MyProgressBar *progressLabel;
|
MyProgressBar *progressLabel;
|
||||||
|
@@ -984,13 +984,13 @@ bool MyComboBoxText::on_scroll_event (GdkEventScroll* event)
|
|||||||
|
|
||||||
void MyComboBoxText::setPreferredWidth (int minimum_width, int natural_width)
|
void MyComboBoxText::setPreferredWidth (int minimum_width, int natural_width)
|
||||||
{
|
{
|
||||||
if (natural_width==-1 && minimum_width==-1) {
|
if (natural_width == -1 && minimum_width == -1) {
|
||||||
naturalWidth = minimumWidth = 70;
|
naturalWidth = minimumWidth = 70;
|
||||||
} else if (natural_width==-1) {
|
} else if (natural_width == -1) {
|
||||||
naturalWidth = minimumWidth = minimum_width;
|
naturalWidth = minimumWidth = minimum_width;
|
||||||
} else if (minimum_width==-1) {
|
} else if (minimum_width == -1) {
|
||||||
naturalWidth = natural_width;
|
naturalWidth = natural_width;
|
||||||
minimumWidth = rtengine::max(naturalWidth/2, 20);
|
minimumWidth = rtengine::max(naturalWidth / 2, 20);
|
||||||
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
|
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
|
||||||
} else {
|
} else {
|
||||||
naturalWidth = natural_width;
|
naturalWidth = natural_width;
|
||||||
@@ -1030,13 +1030,13 @@ bool MyComboBox::on_scroll_event (GdkEventScroll* event)
|
|||||||
|
|
||||||
void MyComboBox::setPreferredWidth (int minimum_width, int natural_width)
|
void MyComboBox::setPreferredWidth (int minimum_width, int natural_width)
|
||||||
{
|
{
|
||||||
if (natural_width==-1 && minimum_width==-1) {
|
if (natural_width == -1 && minimum_width == -1) {
|
||||||
naturalWidth = minimumWidth = 70;
|
naturalWidth = minimumWidth = 70;
|
||||||
} else if (natural_width==-1) {
|
} else if (natural_width == -1) {
|
||||||
naturalWidth = minimumWidth = minimum_width;
|
naturalWidth = minimumWidth = minimum_width;
|
||||||
} else if (minimum_width==-1) {
|
} else if (minimum_width == -1) {
|
||||||
naturalWidth = natural_width;
|
naturalWidth = natural_width;
|
||||||
minimumWidth = rtengine::max(naturalWidth/2, 20);
|
minimumWidth = rtengine::max(naturalWidth / 2, 20);
|
||||||
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
|
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
|
||||||
} else {
|
} else {
|
||||||
naturalWidth = natural_width;
|
naturalWidth = natural_width;
|
||||||
@@ -1302,7 +1302,7 @@ void MyProgressBar::setPreferredWidth(int width)
|
|||||||
|
|
||||||
void MyProgressBar::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const
|
void MyProgressBar::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const
|
||||||
{
|
{
|
||||||
minimum_width = rtengine::max(w/2, 50);
|
minimum_width = rtengine::max(w / 2, 50);
|
||||||
natural_width = rtengine::max(w, 50);
|
natural_width = rtengine::max(w, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -606,8 +606,9 @@ inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustri
|
|||||||
{
|
{
|
||||||
comboBox.set_active_text (text);
|
comboBox.set_active_text (text);
|
||||||
|
|
||||||
if (comboBox.get_active_row_number () < 0)
|
if (comboBox.get_active_row_number () < 0) {
|
||||||
comboBox.set_active (index);
|
comboBox.set_active (index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -65,18 +65,9 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
|
|||||||
attach_next_to (*zoomFitCrop, Gtk::POS_RIGHT, 1, 1);
|
attach_next_to (*zoomFitCrop, Gtk::POS_RIGHT, 1, 1);
|
||||||
attach_next_to (*zoom11, Gtk::POS_RIGHT, 1, 1);
|
attach_next_to (*zoom11, Gtk::POS_RIGHT, 1, 1);
|
||||||
|
|
||||||
/*
|
|
||||||
attach_next_to (*zoomOut, Gtk::POS_LEFT, 1, 1);
|
|
||||||
attach_next_to (*zoomIn, *zoomOut, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
attach_next_to (*zoomFit, *zoomIn, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
attach_next_to (*zoomFitCrop, *zoomFit, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
attach_next_to (*zoom11, *zoomFitCrop, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
zoomLabel = Gtk::manage (new Gtk::Label ());
|
zoomLabel = Gtk::manage (new Gtk::Label ());
|
||||||
setExpandAlignProperties(zoomLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(zoomLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
attach_next_to (*zoomLabel, Gtk::POS_RIGHT, 1, 1);
|
attach_next_to (*zoomLabel, Gtk::POS_RIGHT, 1, 1);
|
||||||
//attach_next_to (*zoomLabel, *zoom11, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
|
|
||||||
Gtk::Image* imageCrop = Gtk::manage (new RTImage ("new-detail-window.png"));
|
Gtk::Image* imageCrop = Gtk::manage (new RTImage ("new-detail-window.png"));
|
||||||
imageCrop->set_padding(0, 0);
|
imageCrop->set_padding(0, 0);
|
||||||
@@ -85,7 +76,6 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
|
|||||||
newCrop->set_relief(Gtk::RELIEF_NONE);
|
newCrop->set_relief(Gtk::RELIEF_NONE);
|
||||||
setExpandAlignProperties(newCrop, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties(newCrop, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
attach_next_to (*newCrop, Gtk::POS_RIGHT, 1, 1);
|
attach_next_to (*newCrop, Gtk::POS_RIGHT, 1, 1);
|
||||||
//attach_next_to (*newCrop, *zoomLabel, Gtk::POS_RIGHT, 1, 1);
|
|
||||||
|
|
||||||
show_all_children ();
|
show_all_children ();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user