Merge from default. Hope I did it right...
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
: beforePreviewHandler(NULL), beforeIarea(NULL), parent(NULL), beforeIpc(NULL), ipc(NULL), catalogPane(NULL), isProcessing(false) {
|
||||
: beforePreviewHandler(NULL), beforeIarea(NULL), parent(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL) {
|
||||
|
||||
epih = new EditorPanelIdleHelper;
|
||||
epih->epanel = this;
|
||||
@@ -128,7 +128,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
Gtk::VSeparator* vsepz3 = Gtk::manage (new Gtk::VSeparator ());
|
||||
Gtk::VSeparator* vsepz4 = Gtk::manage (new Gtk::VSeparator ());
|
||||
|
||||
iarea = new ImageAreaPanel ();
|
||||
iareapanel = new ImageAreaPanel ();
|
||||
|
||||
Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ());
|
||||
toolBarPanel->pack_start (*hidehp, Gtk::PACK_SHRINK, 1);
|
||||
@@ -143,13 +143,13 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
toolBarPanel->pack_end (*vsep1, Gtk::PACK_SHRINK, 2);
|
||||
toolBarPanel->pack_end (*tpc->coarse, Gtk::PACK_SHRINK, 2);
|
||||
toolBarPanel->pack_end (*vsepcl, Gtk::PACK_SHRINK, 2);
|
||||
toolBarPanel->pack_end (*iarea->imageArea->indClippedPanel, Gtk::PACK_SHRINK, 0);
|
||||
toolBarPanel->pack_end (*iareapanel->imageArea->indClippedPanel, Gtk::PACK_SHRINK, 0);
|
||||
toolBarPanel->pack_end (*vsepz, Gtk::PACK_SHRINK, 2);
|
||||
toolBarPanel->pack_end (*iarea->imageArea->previewModePanel, Gtk::PACK_SHRINK, 0);
|
||||
toolBarPanel->pack_end (*iareapanel->imageArea->previewModePanel, Gtk::PACK_SHRINK, 0);
|
||||
toolBarPanel->pack_end (*vsepz4, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
afterBox = Gtk::manage (new Gtk::VBox ());
|
||||
afterBox->pack_start (*iarea);
|
||||
afterBox->pack_start (*iareapanel);
|
||||
|
||||
beforeAfterBox = Gtk::manage (new Gtk::HBox());
|
||||
beforeAfterBox->pack_start (*afterBox);
|
||||
@@ -215,7 +215,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
iops->pack_end (*vsepz2, Gtk::PACK_SHRINK,1);
|
||||
|
||||
// Zoom panel
|
||||
iops->pack_end (*iarea->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1);
|
||||
iops->pack_end (*iareapanel->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1);
|
||||
iops->pack_end (*vsepz3, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
editbox->pack_start (*Gtk::manage(new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0);
|
||||
@@ -274,9 +274,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
tpc->addPParamsChangeListener (profilep);
|
||||
tpc->addPParamsChangeListener (history);
|
||||
tpc->addPParamsChangeListener (this);
|
||||
iarea->imageArea->setCropGUIListener (tpc->getCropGUIListener());
|
||||
iarea->imageArea->setPointerMotionListener (navigator);
|
||||
iarea->imageArea->setImageAreaToolListener (tpc);
|
||||
iareapanel->imageArea->setCropGUIListener (tpc->getCropGUIListener());
|
||||
iareapanel->imageArea->setPointerMotionListener (navigator);
|
||||
iareapanel->imageArea->setImageAreaToolListener (tpc);
|
||||
|
||||
// initialize components
|
||||
info->set_active (options.showInfo);
|
||||
@@ -298,9 +298,9 @@ EditorPanel::~EditorPanel () {
|
||||
|
||||
history->setHistoryBeforeLineListener (NULL);
|
||||
// the order is important!
|
||||
iarea->setBeforeAfterViews (NULL, iarea);
|
||||
delete iarea;
|
||||
iarea = NULL;
|
||||
iareapanel->setBeforeAfterViews (NULL, iareapanel);
|
||||
delete iareapanel;
|
||||
iareapanel = NULL;
|
||||
|
||||
if (beforeIpc)
|
||||
beforeIpc->stopProcessing ();
|
||||
@@ -394,10 +394,10 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||
ipc->setHistogramListener (this);
|
||||
|
||||
// iarea->fitZoom (); // tell to the editorPanel that the next image has to be fitted to the screen
|
||||
iarea->imageArea->setPreviewHandler (previewHandler);
|
||||
iarea->imageArea->setImProcCoordinator (ipc);
|
||||
iareapanel->imageArea->setPreviewHandler (previewHandler);
|
||||
iareapanel->imageArea->setImProcCoordinator (ipc);
|
||||
navigator->previewWindow->setPreviewHandler (previewHandler);
|
||||
navigator->previewWindow->setImageArea (iarea->imageArea);
|
||||
navigator->previewWindow->setImageArea (iareapanel->imageArea);
|
||||
|
||||
rtengine::ImageSource* is=isrc->getImageSource();
|
||||
is->setProgressListener( this );
|
||||
@@ -420,17 +420,17 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||
|
||||
// If in single tab mode, the main crop window is not constructed the very first time
|
||||
// since there was no resize event
|
||||
if (iarea->imageArea->mainCropWindow)
|
||||
if (iareapanel->imageArea->mainCropWindow)
|
||||
{
|
||||
iarea->imageArea->mainCropWindow->cropHandler.newImage(ipc);
|
||||
iarea->imageArea->mainCropWindow->initialImageArrived();
|
||||
iareapanel->imageArea->mainCropWindow->cropHandler.newImage(ipc);
|
||||
iareapanel->imageArea->mainCropWindow->initialImageArrived();
|
||||
|
||||
// In single tab mode, the image is not always updated between switches
|
||||
// normal redraw don't work, so this is the hard way
|
||||
if (!options.tabbedUI) iarea->imageArea->mainCropWindow->cropHandler.update();
|
||||
if (!options.tabbedUI) iareapanel->imageArea->mainCropWindow->cropHandler.update();
|
||||
} else {
|
||||
Gtk::Allocation alloc;
|
||||
iarea->imageArea->on_resized(alloc);
|
||||
iareapanel->imageArea->on_resized(alloc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,10 +453,10 @@ void EditorPanel::close () {
|
||||
delete previewHandler;
|
||||
previewHandler= NULL;
|
||||
|
||||
if(iarea)
|
||||
if(iareapanel)
|
||||
{
|
||||
iarea->imageArea->setPreviewHandler (NULL);
|
||||
iarea->imageArea->setImProcCoordinator (NULL);
|
||||
iareapanel->imageArea->setPreviewHandler (NULL);
|
||||
iareapanel->imageArea->setImProcCoordinator (NULL);
|
||||
}
|
||||
rtengine::StagedImageProcessor::destroy (ipc);
|
||||
ipc = NULL;
|
||||
@@ -479,7 +479,7 @@ void EditorPanel::saveProfile () {
|
||||
ipc->getParams (¶ms);
|
||||
|
||||
// Will call updateCache, which will update both the cached and sidecar files if necessary
|
||||
openThm->setProcParams (params, EDITOR);
|
||||
openThm->setProcParams (params, NULL, EDITOR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) {
|
||||
if (ipc && openThm && tpc->getChangedState()) {
|
||||
rtengine::procparams::ProcParams pparams;
|
||||
ipc->getParams (&pparams);
|
||||
openThm->setProcParams (pparams, EDITOR, false);
|
||||
openThm->setProcParams (pparams, NULL, EDITOR, false);
|
||||
}
|
||||
|
||||
// Ring a sound if it was a long event
|
||||
@@ -609,7 +609,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) {
|
||||
s->val = 1.0;
|
||||
|
||||
#ifdef WIN32
|
||||
if (!firstProcessingDone && (RTWindow*)parent->getIsFullscreen()) { parent->fullscreen(); }
|
||||
if (!firstProcessingDone && static_cast<RTWindow*>(parent)->getIsFullscreen()) { parent->fullscreen(); }
|
||||
#endif
|
||||
firstProcessingDone = true;
|
||||
}
|
||||
@@ -700,8 +700,8 @@ void EditorPanel::info_toggled () {
|
||||
else
|
||||
infoString = M("QINFO_NOEXIF");
|
||||
|
||||
iarea->imageArea->setInfoText (infoString);
|
||||
iarea->imageArea->infoEnabled (info->get_active ());
|
||||
iareapanel->imageArea->setInfoText (infoString);
|
||||
iareapanel->imageArea->infoEnabled (info->get_active ());
|
||||
}
|
||||
|
||||
void EditorPanel::hideHistoryActivated () {
|
||||
@@ -827,32 +827,47 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
||||
case GDK_I:
|
||||
info->set_active (!info->get_active());
|
||||
return true;
|
||||
case GDK_b:
|
||||
case GDK_B:
|
||||
beforeAfter->set_active (!beforeAfter->get_active());
|
||||
return true;
|
||||
case GDK_plus:
|
||||
case GDK_equal:
|
||||
iarea->imageArea->zoomPanel->zoomInClicked();
|
||||
iareapanel->imageArea->zoomPanel->zoomInClicked();
|
||||
return true;
|
||||
case GDK_minus:
|
||||
case GDK_underscore:
|
||||
iarea->imageArea->zoomPanel->zoomOutClicked();
|
||||
iareapanel->imageArea->zoomPanel->zoomOutClicked();
|
||||
return true;
|
||||
case GDK_1:
|
||||
iarea->imageArea->zoomPanel->zoom11Clicked();
|
||||
iareapanel->imageArea->zoomPanel->zoom11Clicked();
|
||||
return true;
|
||||
|
||||
case GDK_r: //preview mode Red
|
||||
iareapanel->imageArea->previewModePanel->toggleR();
|
||||
return true;
|
||||
case GDK_g: //preview mode Green
|
||||
iareapanel->imageArea->previewModePanel->toggleG();
|
||||
return true;
|
||||
case GDK_b: //preview mode Blue
|
||||
iareapanel->imageArea->previewModePanel->toggleB();
|
||||
return true;
|
||||
case GDK_v: //preview mode Luminosity
|
||||
iareapanel->imageArea->previewModePanel->toggleL();
|
||||
return true;
|
||||
case GDK_F: //preview mode Focus Mask
|
||||
iareapanel->imageArea->previewModePanel->toggleFocusMask();
|
||||
return true;
|
||||
|
||||
case GDK_f:
|
||||
iarea->imageArea->zoomPanel->zoomFitClicked();
|
||||
iareapanel->imageArea->zoomPanel->zoomFitClicked();
|
||||
return true;
|
||||
case GDK_less:
|
||||
iarea->imageArea->indClippedPanel->toggleClipped(true);
|
||||
iareapanel->imageArea->indClippedPanel->toggleClipped(true);
|
||||
return true;
|
||||
case GDK_greater:
|
||||
iarea->imageArea->indClippedPanel->toggleClipped(false);
|
||||
iareapanel->imageArea->indClippedPanel->toggleClipped(false);
|
||||
return true;
|
||||
//TODO add shortcuts for previewModePanel buttons
|
||||
|
||||
case GDK_F5:
|
||||
openThm->openDefaultViewer(event->state & GDK_SHIFT_MASK ? 2 : 1);
|
||||
return true;
|
||||
@@ -893,8 +908,13 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
||||
|
||||
void EditorPanel::procParamsChanged (Thumbnail* thm, int whoChangedIt) {
|
||||
|
||||
if (whoChangedIt!=EDITOR)
|
||||
tpc->profileChange (&openThm->getProcParams(), rtengine::EvProfileChangeNotification, M("PROGRESSDLG_PROFILECHANGEDINBROWSER"));
|
||||
if (whoChangedIt!=EDITOR) {
|
||||
PartialProfile pp(true);
|
||||
pp.set(true);
|
||||
*(pp.pparams) = openThm->getProcParams();
|
||||
tpc->profileChange (&pp, rtengine::EvProfileChangeNotification, M("PROGRESSDLG_PROFILECHANGEDINBROWSER"));
|
||||
pp.deleteInstance();
|
||||
}
|
||||
}
|
||||
|
||||
bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname, SaveFormat sf) {
|
||||
@@ -1233,7 +1253,8 @@ void EditorPanel::beforeAfterToggled () {
|
||||
if (beforeIarea) {
|
||||
if (beforeIpc)
|
||||
beforeIpc->stopProcessing ();
|
||||
iarea->setBeforeAfterViews (NULL, iarea);
|
||||
iareapanel->setBeforeAfterViews (NULL, iareapanel);
|
||||
iareapanel->imageArea->iLinkedImageArea = NULL;
|
||||
delete beforeIarea;
|
||||
beforeIarea = NULL;
|
||||
if (beforeIpc)
|
||||
@@ -1292,8 +1313,12 @@ void EditorPanel::beforeAfterToggled () {
|
||||
beforeIarea->imageArea->setPreviewHandler (beforePreviewHandler);
|
||||
beforeIarea->imageArea->setImProcCoordinator (beforeIpc);
|
||||
|
||||
iarea->setBeforeAfterViews (beforeIarea, iarea);
|
||||
beforeIarea->setBeforeAfterViews (beforeIarea, iarea);
|
||||
beforeIarea->imageArea->setPreviewModePanel(iareapanel->imageArea->previewModePanel);
|
||||
beforeIarea->imageArea->setIndicateClippedPanel(iareapanel->imageArea->indClippedPanel);
|
||||
iareapanel->imageArea->iLinkedImageArea = beforeIarea->imageArea;
|
||||
|
||||
iareapanel->setBeforeAfterViews (beforeIarea, iareapanel);
|
||||
beforeIarea->setBeforeAfterViews (beforeIarea, iareapanel);
|
||||
|
||||
rtengine::procparams::ProcParams params;
|
||||
if (history->getBeforeLineParams (params))
|
||||
@@ -1427,5 +1452,5 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) {
|
||||
break;
|
||||
}
|
||||
|
||||
iarea->imageArea->setPointerMotionHListener (histogramPanel);
|
||||
iareapanel->imageArea->setPointerMotionHListener (histogramPanel);
|
||||
}
|
||||
|
Reference in New Issue
Block a user