Comment removed + file astylized

This commit is contained in:
Hombre
2016-01-10 16:58:36 +01:00
parent fc41b0fa80
commit 8a9af647db
5 changed files with 28 additions and 31 deletions

View File

@@ -58,6 +58,7 @@ private:
#endif
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles ();
for (std::vector<Glib::ustring>::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) {
profileBox.append (*iterator);
}
@@ -94,17 +95,21 @@ private:
Glib::ustring profile;
#ifdef WIN32
if (profileBox.get_active_row_number () == 1) {
profile = rtengine::iccStore->getDefaultMonitorProfileName ();
if (profile.empty ()) {
profile = options.rtSettings.monitorProfile;
}
if (profile.empty ()) {
profile = "sRGB IEC61966-2.1";
}
} else if (profileBox.get_active_row_number () > 1) {
profile = profileBox.get_active_text ();
}
#else
profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring ();
#endif
@@ -134,14 +139,17 @@ private:
}
rtengine::RenderingIntent intent;
switch (intentBox.getSelected ()) {
default:
case 0:
intent = rtengine::RI_RELATIVE;
break;
case 1:
intent = rtengine::RI_PERCEPTUAL;
break;
case 2:
intent = rtengine::RI_ABSOLUTE;
break;
@@ -182,24 +190,27 @@ public:
ConnectionBlocker intentBlocker (intentConn);
#ifdef WIN32
if (options.rtSettings.autoMonitorProfile) {
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1);
} else {
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
}
#else
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
#endif
switch (options.rtSettings.monitorIntent)
{
switch (options.rtSettings.monitorIntent) {
default:
case rtengine::RI_RELATIVE:
intentBox.setSelected (0);
break;
case rtengine::RI_PERCEPTUAL:
intentBox.setSelected (1);
break;
case rtengine::RI_ABSOLUTE:
intentBox.setSelected (2);
break;
@@ -378,18 +389,11 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
setExpandAlignProperties(sendtogimp, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
// Status box
cssProvider = Gtk::CssProvider::create();
progressLabel = Gtk::manage (new MyProgressBar(300));
progressLabel->set_show_text(true);
setExpandAlignProperties(progressLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
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 = new Gtk::ToggleButton ();
iRightPanel_1_Show = new RTImage ("panel-to-left.png");
@@ -444,24 +448,27 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
// ================== PACKING THE BOTTOM WIDGETS =================
// 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(*vsep1, Gtk::POS_LEFT, 1, 1);
iops->attach_next_to(*sendtogimp, Gtk::POS_LEFT, 1, 1);
if(!simpleEditor) {
iops->attach_next_to(*queueimg, 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)
iops->attach_next_to(*vsep2, Gtk::POS_RIGHT, 1, 1);
monitorProfile->pack_right_in (iops);
if (!simpleEditor && !options.tabbedUI) {
iops->attach_next_to(*vsep3, 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(*navNext, 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(*vsepz3, Gtk::POS_RIGHT, 1, 1);

View File

@@ -56,7 +56,6 @@ private:
Glib::ustring lastSaveAsFileName;
bool realized;
Glib::RefPtr<Gtk::CssProvider> cssProvider; // to be able to set the ProgressBar's background
protected:
MyProgressBar *progressLabel;

View File

@@ -984,13 +984,13 @@ bool MyComboBoxText::on_scroll_event (GdkEventScroll* event)
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;
} else if (natural_width==-1) {
} else if (natural_width == -1) {
naturalWidth = minimumWidth = minimum_width;
} else if (minimum_width==-1) {
} else if (minimum_width == -1) {
naturalWidth = natural_width;
minimumWidth = rtengine::max(naturalWidth/2, 20);
minimumWidth = rtengine::max(naturalWidth / 2, 20);
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
} else {
naturalWidth = natural_width;
@@ -1030,13 +1030,13 @@ bool MyComboBox::on_scroll_event (GdkEventScroll* event)
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;
} else if (natural_width==-1) {
} else if (natural_width == -1) {
naturalWidth = minimumWidth = minimum_width;
} else if (minimum_width==-1) {
} else if (minimum_width == -1) {
naturalWidth = natural_width;
minimumWidth = rtengine::max(naturalWidth/2, 20);
minimumWidth = rtengine::max(naturalWidth / 2, 20);
minimumWidth = rtengine::min(naturalWidth, minimumWidth);
} else {
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
{
minimum_width = rtengine::max(w/2, 50);
minimum_width = rtengine::max(w / 2, 50);
natural_width = rtengine::max(w, 50);
}

View File

@@ -606,8 +606,9 @@ inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustri
{
comboBox.set_active_text (text);
if (comboBox.get_active_row_number () < 0)
if (comboBox.get_active_row_number () < 0) {
comboBox.set_active (index);
}
}
#endif

View File

@@ -65,18 +65,9 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
attach_next_to (*zoomFitCrop, 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 ());
setExpandAlignProperties(zoomLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
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"));
imageCrop->set_padding(0, 0);
@@ -85,7 +76,6 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
newCrop->set_relief(Gtk::RELIEF_NONE);
setExpandAlignProperties(newCrop, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
attach_next_to (*newCrop, Gtk::POS_RIGHT, 1, 1);
//attach_next_to (*newCrop, *zoomLabel, Gtk::POS_RIGHT, 1, 1);
show_all_children ();