commit after merge with trunk

This commit is contained in:
askv
2010-09-09 20:26:00 -07:00
parent 84ecfe412a
commit aa77b69443
18 changed files with 394 additions and 301 deletions

View File

@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -110,13 +110,13 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
toolBarPanel->pack_end (*vsepcl, Gtk::PACK_SHRINK, 4);
toolBarPanel->pack_end (*iarea->imageArea->indClippedPanel, Gtk::PACK_SHRINK, 0);
toolBarPanel->pack_end (*vsepz, Gtk::PACK_SHRINK, 2);
afterBox = Gtk::manage (new Gtk::VBox ());
afterBox->pack_start (*iarea);
beforeAfterBox = Gtk::manage (new Gtk::HBox());
beforeAfterBox->pack_start (*afterBox);
editbox->pack_start (*toolBarPanel, Gtk::PACK_SHRINK);
editbox->pack_start (*beforeAfterBox);
@@ -171,7 +171,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
iops->pack_end (*iarea->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1);
iops->pack_end (*vsepz2, Gtk::PACK_SHRINK, 2);
editbox->pack_start (*Gtk::manage(new Gtk::HSeparator()), Gtk::PACK_SHRINK, 4);
editbox->pack_start (*iops, Gtk::PACK_SHRINK, 4);
editbox->show_all ();
@@ -211,9 +211,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
show_all ();
// save as dialog
if (Glib::file_test (options.lastSaveAsPath, Glib::FILE_TEST_IS_DIR))
if (Glib::file_test (options.lastSaveAsPath, Glib::FILE_TEST_IS_DIR))
saveAsDialog = new SaveAsDialog (options.lastSaveAsPath);
else
else
saveAsDialog = new SaveAsDialog (Glib::get_user_special_dir (G_USER_DIRECTORY_PICTURES));
saveAsDialog->set_default_size (options.saveAsDialogWidth, options.saveAsDialogHeight);
@@ -228,7 +228,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
iarea->imageArea->setCropGUIListener (tpc->getCropGUIListener());
iarea->imageArea->setPointerMotionListener (navigator);
iarea->imageArea->setImageAreaToolListener (tpc);
// initialize components
info->set_active (options.showInfo);
tpc->readOptions ();
@@ -278,12 +278,12 @@ EditorPanel::~EditorPanel () {
delete green;
delete leftbox;
delete vboxright;
delete saveAsDialog;
}
void EditorPanel::on_realize () {
Gtk::VBox::on_realize ();
vboxright->set_size_request (options.toolPanelWidth, -1);
}
@@ -322,11 +322,11 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
if (openThm->getType()!=FT_Raw)
profilep->initProfile (options.defProfImg, ldprof, NULL);
else
profilep->initProfile (options.defProfRaw, ldprof, NULL);
profilep->initProfile (options.defProfRaw, ldprof, NULL);
openThm->addThumbnailListener (this);
info_toggled ();
beforeAfterToggled();
beforeAfterToggled();
@@ -339,7 +339,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
}
void EditorPanel::close () {
if (ipc)
{
saveProfile ();
@@ -349,7 +349,7 @@ void EditorPanel::close () {
if (ipc)
ipc->setPreviewImageListener (NULL);
if (beforeIpc)
beforeIpc->setPreviewImageListener (NULL);
@@ -361,9 +361,9 @@ void EditorPanel::close () {
delete iarea->imageArea->mainCropWindow;
iarea->imageArea->mainCropWindow = NULL;
rtengine::StagedImageProcessor::destroy (ipc);
rtengine::StagedImageProcessor::destroy (ipc);
ipc = NULL;
iarea->imageArea->setPreviewHandler (NULL);
iarea->imageArea->setImProcCoordinator (NULL);
navigator->previewWindow->setPreviewHandler (NULL);
@@ -373,17 +373,17 @@ void EditorPanel::close () {
openThm->decreaseRef ();
}
}
}
void EditorPanel::saveProfile () {
ProcParams params;
ipc->getParams (&params);
if (options.saveParamsFile)
params.save (openThm->getFileName() + paramFileExtension);
if (openThm && options.saveParamsCache)
if (openThm && options.saveParamsCache)
openThm->setProcParams (params, EDITOR);
}
@@ -397,7 +397,7 @@ Glib::ustring EditorPanel::getFileName () {
return openThm->getFileName ();
}
// TODO!!!
// TODO!!!
void EditorPanel::procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited) {
// if (ev!=EvPhotoLoaded)
@@ -417,7 +417,7 @@ int setprocstate (void* data) {
if (p->epih->destroyed) {
if (p->epih->pending == 1)
delete p->epih;
else
else
p->epih->pending--;
delete p;
gdk_threads_leave ();
@@ -457,7 +457,7 @@ void EditorPanel::refreshProcessingState (bool state) {
if (wlast)
statusBox->remove (*wlast);
}
if (state)
if (state)
statusBox->pack_end (*red, Gtk::PACK_SHRINK, 4);
else
statusBox->pack_end (*green, Gtk::PACK_SHRINK, 4);
@@ -486,7 +486,7 @@ int disperror (void* data) {
if (p->epih->destroyed) {
if (p->epih->pending == 1)
delete p->epih;
else
else
p->epih->pending--;
delete p;
gdk_threads_leave ();
@@ -515,13 +515,13 @@ void EditorPanel::info_toggled () {
const rtengine::ImageMetaData* idata = ipc->getInitialImage()->getMetaData();
if (idata && idata->hasExif())
infoString = Glib::ustring::compose ("%1 %2\nF/%3 %4 sec\n%5: %6\n%7: %8 mm\n",
infoString = Glib::ustring::compose ("%1 %2\nF/%3 %4 sec\n%5: %6\n%7: %8 mm\n",
Glib::ustring(idata->getMake()), Glib::ustring(idata->getModel()),
Glib::ustring(idata->apertureToString(idata->getFNumber())), Glib::ustring(idata->shutterToString(idata->getShutterSpeed())),
M("QINFO_ISO"), idata->getISOSpeed(),
M("QINFO_FOCALLENGTH"), idata->getFocalLen())
+ Glib::ustring::compose ("%1: %2", M("QINFO_LENS"), Glib::ustring(idata->getLens()));
else
else
infoString = M("QINFO_NOEXIF");
iarea->imageArea->setInfoText (infoString);
@@ -531,7 +531,7 @@ void EditorPanel::info_toggled () {
void EditorPanel::hideHistoryActivated () {
removeIfThere (hpanedl, leftbox, false);
if (hidehp->get_active())
if (hidehp->get_active())
hpanedl->pack1 (*leftbox, false, true);
options.showHistory = hidehp->get_active();
}
@@ -583,7 +583,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
iarea->imageArea->zoomPanel->zoom11Clicked();
return true;
case GDK_f:
case GDK_F:
case GDK_F:
iarea->imageArea->zoomPanel->zoomFitClicked();
return true;
}
@@ -613,8 +613,8 @@ 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)
tpc->profileChange (&openThm->getProcParams(), rtengine::EvProfileChangeNotification, M("PROGRESSDLG_PROFILECHANGEDINBROWSER"));
}
bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname, SaveFormat sf, bool findNewNameIfNeeded){
@@ -719,7 +719,7 @@ void EditorPanel::saveAsPressed () {
SaveFormat sf = saveAsDialog->getFormat ();
if (getExtension (fname)!=sf.format)
fname = fname + "." + sf.format;
options.saveFormat = sf;
if (saveAsDialog->getImmediately ()) {
@@ -731,7 +731,7 @@ void EditorPanel::saveAsPressed () {
if (response==Gtk::RESPONSE_NO)
return;
}
// save image
// save image
rtengine::procparams::ProcParams pparams;
ipc->getParams (&pparams);
rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
@@ -901,12 +901,12 @@ void EditorPanel::beforeAfterToggled () {
removeIfThere (afterBox, afterLabel, false);
if (beforeIarea) {
if (beforeIpc)
if (beforeIpc)
beforeIpc->stopProcessing ();
iarea->setBeforeAfterViews (NULL, iarea);
delete beforeIarea;
beforeIarea = NULL;
if (beforeIpc)
if (beforeIpc)
beforeIpc->setPreviewImageListener (NULL);
delete beforePreviewHandler;
beforePreviewHandler = NULL;
@@ -944,7 +944,7 @@ void EditorPanel::beforeAfterToggled () {
iarea->setBeforeAfterViews (beforeIarea, iarea);
beforeIarea->setBeforeAfterViews (beforeIarea, iarea);
rtengine::procparams::ProcParams params;
if (history->getBeforeLineParams (params))
historyBeforeLineChanged (params);
@@ -952,7 +952,7 @@ void EditorPanel::beforeAfterToggled () {
}
void EditorPanel::histogramChanged (unsigned int* rh, unsigned int* gh, unsigned int* bh, unsigned int* lh, unsigned int* bcrgb, unsigned int* bcl) {
histogramPanel->histogramChanged (rh, gh, bh, lh);
histogramPanel->histogramChanged (rh, gh, bh, lh);
tpc->updateCurveBackgroundHistogram (bcrgb, bcl);
}