merge with dev

This commit is contained in:
Desmis
2019-05-22 07:29:08 +02:00
3 changed files with 36 additions and 17 deletions

View File

@@ -358,8 +358,12 @@ if(WITH_LTO)
string(REGEX REPLACE ".* ([0-9.]+)\n.*" "\\1" BINUTILS_VERSION_DETECTED "${BINUTILS_VERSION_DETECTED}")
if("${BINUTILS_VERSION_DETECTED}" VERSION_LESS "${BINUTILS_VERSION_MININUM}")
if(APPLE)
set(CMAKE_AR "/opt/local/bin/ar")
set(CMAKE_RANLIB "/opt/local/bin/ranlib")
if(!CMAKE_AR)
set(CMAKE_AR "/opt/local/bin/ar")
endif()
if(!CMAKE_RANLIB)
set(CMAKE_RANLIB "/opt/local/bin/ranlib")
endif()
else()
set(CMAKE_AR "/usr/bin/gcc-ar")
set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")

View File

@@ -484,7 +484,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
histogramPanel = nullptr;
profilep = Gtk::manage (new ProfilePanel ());
ppframe = new Gtk::Frame ();
ppframe = Gtk::manage(new Gtk::Frame());
ppframe->set_name ("ProfilePanel");
ppframe->add (*profilep);
ppframe->set_label (M ("PROFILEPANEL_LABEL"));
@@ -627,7 +627,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
vboxright->pack2 (*vsubboxright, true, true);
// Save buttons
Gtk::Grid *iops = new Gtk::Grid ();
Gtk::Grid *iops = Gtk::manage(new Gtk::Grid());
iops->set_name ("IopsPanel");
iops->set_orientation (Gtk::ORIENTATION_HORIZONTAL);
iops->set_row_spacing (2);
@@ -661,7 +661,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
progressLabel->set_fraction (0.0);
// tbRightPanel_1
tbRightPanel_1 = new Gtk::ToggleButton ();
tbRightPanel_1 = Gtk::manage(new Gtk::ToggleButton());
iRightPanel_1_Show = new RTImage ("panel-to-left.png");
iRightPanel_1_Hide = new RTImage ("panel-to-right.png");
tbRightPanel_1->set_relief (Gtk::RELIEF_NONE);
@@ -671,7 +671,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
setExpandAlignProperties (tbRightPanel_1, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
// ShowHideSidePanels
tbShowHideSidePanels = new Gtk::ToggleButton ();
tbShowHideSidePanels = Gtk::manage(new Gtk::ToggleButton());
iShowHideSidePanels = new RTImage ("crossed-arrows-out.png");
iShowHideSidePanels_exit = new RTImage ("crossed-arrows-in.png");
tbShowHideSidePanels->set_relief (Gtk::RELIEF_NONE);
@@ -883,7 +883,6 @@ EditorPanel::~EditorPanel ()
delete tpc;
delete ppframe;
delete leftsubbox;
delete leftbox;
delete vsubboxright;

View File

@@ -955,22 +955,38 @@ void ToolPanelCoordinator::toolSelected (ToolMode tool)
{
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
auto checkFavorite = [this](FoldableToolPanel* tool) {
for (auto fav : favorites) {
if (fav == tool) {
return true;
}
}
return false;
};
switch (tool) {
case TMCropSelect:
crop->setExpanded (true);
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
case TMCropSelect: {
crop->setExpanded(true);
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(checkFavorite(crop) ? *favoritePanelSW : *transformPanelSW));
break;
}
case TMSpotWB:
whitebalance->setExpanded (true);
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW));
case TMSpotWB: {
whitebalance->setExpanded(true);
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(checkFavorite(whitebalance) ? *favoritePanelSW : *colorPanelSW));
break;
}
case TMStraighten:
lensgeom->setExpanded (true);
rotate->setExpanded (true);
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
case TMStraighten: {
rotate->setExpanded(true);
bool isFavorite = checkFavorite(rotate);
if (!isFavorite) {
isFavorite = checkFavorite(lensgeom);
lensgeom->setExpanded(true);
}
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(isFavorite ? *favoritePanelSW : *transformPanelSW));
break;
}
default:
break;