Merge branch 'master' into gtk3
This commit is contained in:
commit
2e720bdeb8
@ -278,10 +278,10 @@ if (OPTION_OMP)
|
||||
endif (OPENMP_FOUND)
|
||||
endif (OPTION_OMP)
|
||||
|
||||
if(USE_EXPERIMENTAL_LANG_VERSIONS)
|
||||
if(USE_EXPERIMENTAL_LANG_VERSIONS OR NOT (SIGC_VERSION VERSION_LESS 2.5.1))
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
||||
endif (USE_EXPERIMENTAL_LANG_VERSIONS)
|
||||
endif ()
|
||||
|
||||
# find out whether we are building out of source
|
||||
get_filename_component(ABS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE)
|
||||
|
@ -1294,6 +1294,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: <b>-</b>
|
||||
!MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: <b>Shift-F4</b>\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: <b>F4</b>
|
||||
!MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: <b>Shift-F3</b>\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: <b>F3</b>
|
||||
!MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: <b>x</b>\n\nAs above, but without clearing active filters:\nShortcut: <b>y</b>\n(Note that the thumbnail of the opened image will not be shown if filtered out).
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_MSG_OPERATIONCANCELLED;Operation cancelled
|
||||
!MAIN_MSG_PATHDOESNTEXIST;The path\n\n<b>%1</b>\n\ndoes not exist. Please set a correct path in Preferences.
|
||||
!MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function!
|
||||
|
@ -1999,4 +1999,5 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: <b>-</b>
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
!HISTORY_MSG_166;Exposure - Reset
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!TP_NEUTRAL;Reset
|
||||
|
@ -788,6 +788,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
|
||||
!MAIN_BUTTON_PREFERENCES;Preferences
|
||||
!MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Put current image to processing queue.\nShortcut: <b>Ctrl+b</b>
|
||||
!MAIN_BUTTON_SAVE_TOOLTIP;Save current image.\nShortcut: <b>Ctrl+s</b>
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor.\nShortcut: <b>Ctrl+e</b>
|
||||
!MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Show/hide all side panels.\nShortcut: <b>m</b>
|
||||
!MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
||||
|
@ -709,6 +709,7 @@
|
||||
!MAIN_BUTTON_PREFERENCES;Preferences
|
||||
!MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Put current image to processing queue.\nShortcut: <b>Ctrl+b</b>
|
||||
!MAIN_BUTTON_SAVE_TOOLTIP;Save current image.\nShortcut: <b>Ctrl+s</b>
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor.\nShortcut: <b>Ctrl+e</b>
|
||||
!MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Show/hide all side panels.\nShortcut: <b>m</b>
|
||||
!MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
||||
|
@ -1912,6 +1912,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!PARTIALPASTE_RETINEX;Retinex
|
||||
!PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file
|
||||
!SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling.
|
||||
|
@ -1558,6 +1558,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_TAB_INSPECT; Inspect
|
||||
!MAIN_TAB_WAVELET;Wavelet
|
||||
!MAIN_TAB_WAVELET_TOOLTIP;Shortcut: <b>Alt-w</b>
|
||||
|
@ -1946,6 +1946,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!PARTIALPASTE_RETINEX;Retinex
|
||||
!PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file
|
||||
!SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling.
|
||||
|
@ -1968,6 +1968,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: <b>-</b>
|
||||
!HISTORY_MSG_166;Exposure - Reset
|
||||
!HISTORY_MSG_412;Retinex - Scales
|
||||
!HISTORY_MSG_416;Retinex
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!TP_COLORTONING_STR;Strength
|
||||
!TP_DIRPYRDENOISE_CUR;Curve
|
||||
!TP_DIRPYRDENOISE_LAB;L*a*b*
|
||||
|
@ -1650,6 +1650,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_TAB_INSPECT; Inspect
|
||||
!MAIN_TAB_WAVELET;Wavelet
|
||||
!MAIN_TAB_WAVELET_TOOLTIP;Shortcut: <b>Alt-w</b>
|
||||
|
@ -1650,6 +1650,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_TAB_INSPECT; Inspect
|
||||
!MAIN_TAB_WAVELET;Wavelet
|
||||
!MAIN_TAB_WAVELET_TOOLTIP;Shortcut: <b>Alt-w</b>
|
||||
|
@ -1501,6 +1501,7 @@ ZOOMPANEL_ZOOMOUT;Удалить <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!MAIN_TAB_INSPECT; Inspect
|
||||
!MAIN_TAB_WAVELET;Wavelet
|
||||
!MAIN_TAB_WAVELET_TOOLTIP;Shortcut: <b>Alt-w</b>
|
||||
|
@ -1777,6 +1777,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: <b>-</b>
|
||||
!HISTORY_MSG_424;Retinex - HL threshold
|
||||
!HISTORY_MSG_425;Retinex - Log base
|
||||
!HISTORY_MSG_426;Retinex - Hue equalizer
|
||||
!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
!PARTIALPASTE_COLORTONING;Color toning
|
||||
!PARTIALPASTE_FLATFIELDCLIPCONTROL;Flat-field clip control
|
||||
!PARTIALPASTE_RETINEX;Retinex
|
||||
|
@ -710,6 +710,7 @@ MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the E
|
||||
MAIN_BUTTON_PREFERENCES;Preferences
|
||||
MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Put current image to processing queue.\nShortcut: <b>Ctrl+b</b>
|
||||
MAIN_BUTTON_SAVE_TOOLTIP;Save current image.\nShortcut: <b>Ctrl+s</b>
|
||||
MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor
|
||||
MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor.\nShortcut: <b>Ctrl+e</b>
|
||||
MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Show/hide all side panels.\nShortcut: <b>m</b>
|
||||
MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
||||
|
@ -24,6 +24,12 @@
|
||||
#include <iostream>
|
||||
#include "mytime.h"
|
||||
|
||||
#ifdef BENCHMARK
|
||||
#define BENCHFUN StopWatch StopFun(__func__);
|
||||
#else
|
||||
#define BENCHFUN
|
||||
#endif
|
||||
|
||||
class StopWatch
|
||||
{
|
||||
public:
|
||||
|
@ -31,12 +31,14 @@
|
||||
#include "procparams.h"
|
||||
#include "sleef.c"
|
||||
#include "opthelper.h"
|
||||
#include "StopWatch.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh)
|
||||
{
|
||||
BENCHFUN
|
||||
#define HCLIP(x) x //is this still necessary???
|
||||
//min(clip_pt,x)
|
||||
|
||||
|
@ -683,29 +683,22 @@ CameraConstantsStore::CameraConstantsStore()
|
||||
{
|
||||
}
|
||||
|
||||
static CameraConstantsStore *global_instance;
|
||||
|
||||
void CameraConstantsStore::initCameraConstants(Glib::ustring baseDir, Glib::ustring userSettingsDir)
|
||||
void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSettingsDir)
|
||||
{
|
||||
if (global_instance) {
|
||||
// should only be called once during init.
|
||||
abort();
|
||||
}
|
||||
|
||||
global_instance = new CameraConstantsStore();
|
||||
global_instance->parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));
|
||||
parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));
|
||||
|
||||
Glib::ustring userFile(Glib::build_filename(userSettingsDir, "camconst.json"));
|
||||
|
||||
if (safe_file_test(userFile, Glib::FILE_TEST_EXISTS)) {
|
||||
global_instance->parse_camera_constants_file(userFile);
|
||||
parse_camera_constants_file(userFile);
|
||||
}
|
||||
}
|
||||
|
||||
CameraConstantsStore *
|
||||
CameraConstantsStore::getInstance(void)
|
||||
{
|
||||
return global_instance;
|
||||
static CameraConstantsStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
CameraConst *
|
||||
|
@ -54,7 +54,7 @@ private:
|
||||
bool parse_camera_constants_file(Glib::ustring filename);
|
||||
|
||||
public:
|
||||
static void initCameraConstants(Glib::ustring baseDir, Glib::ustring userSettingsDir);
|
||||
void init(Glib::ustring baseDir, Glib::ustring userSettingsDir);
|
||||
static CameraConstantsStore *getInstance(void);
|
||||
CameraConst *get(const char make[], const char model[]);
|
||||
};
|
||||
|
@ -1691,18 +1691,8 @@ void DCPProfile::step2ApplyTile(float *rc, float *gc, float *bc, int width, int
|
||||
// Generates as singleton
|
||||
DCPStore* DCPStore::getInstance()
|
||||
{
|
||||
static DCPStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new DCPStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static DCPStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
// Reads all profiles from the given profiles dir
|
||||
|
@ -192,18 +192,8 @@ ICCStore::makeStdGammaProfile(cmsHPROFILE iprof)
|
||||
ICCStore*
|
||||
ICCStore::getInstance(void)
|
||||
{
|
||||
static ICCStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new ICCStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static ICCStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
ICCStore::ICCStore ()
|
||||
|
@ -46,7 +46,7 @@ int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDi
|
||||
|
||||
dcpStore->init (baseDir + "/dcpprofiles");
|
||||
|
||||
CameraConstantsStore::initCameraConstants (baseDir, userSettingsDir);
|
||||
CameraConstantsStore::getInstance ()->init (baseDir, userSettingsDir);
|
||||
profileStore.init ();
|
||||
ProcParams::init ();
|
||||
Color::init ();
|
||||
|
@ -781,18 +781,8 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el)
|
||||
// Generates as singleton
|
||||
LCPStore* LCPStore::getInstance()
|
||||
{
|
||||
static LCPStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new LCPStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static LCPStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
LCPProfile* LCPStore::getProfile (Glib::ustring filename)
|
||||
|
@ -2783,17 +2783,11 @@ TagDirectory* ExifManager::parseTIFF (FILE* f, bool skipIgnored)
|
||||
return parse (f, 0, skipIgnored);
|
||||
}
|
||||
|
||||
std::vector<Tag*> ExifManager::defTags;
|
||||
|
||||
// forthis: the byte order will be taken from directory "forthis"
|
||||
const std::vector<Tag*>& ExifManager::getDefaultTIFFTags (TagDirectory* forthis)
|
||||
std::vector<Tag*> ExifManager::getDefaultTIFFTags (TagDirectory* forthis)
|
||||
{
|
||||
std::vector<Tag*> defTags;
|
||||
|
||||
for (size_t i = 0; i < defTags.size(); i++) {
|
||||
delete defTags[i];
|
||||
}
|
||||
|
||||
defTags.clear ();
|
||||
defTags.reserve (12);
|
||||
defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "ImageWidth"), 0, LONG));
|
||||
defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "ImageHeight"), 0, LONG));
|
||||
defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "XResolution"), 300, RATIONAL));
|
||||
@ -2843,14 +2837,16 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro
|
||||
cl->applyChange (i->first, i->second);
|
||||
}
|
||||
|
||||
getDefaultTIFFTags (cl);
|
||||
const std::vector<Tag*> defTags = getDefaultTIFFTags (cl);
|
||||
|
||||
defTags[0]->setInt (W, 0, LONG);
|
||||
defTags[1]->setInt (H, 0, LONG);
|
||||
defTags[8]->setInt (8, 0, SHORT);
|
||||
|
||||
for (int i = defTags.size() - 1; i >= 0; i--) {
|
||||
cl->replaceTag (defTags[i]->clone (cl));
|
||||
Tag* defTag = defTags[i];
|
||||
cl->replaceTag (defTag->clone (cl));
|
||||
delete defTag;
|
||||
}
|
||||
|
||||
cl->sort ();
|
||||
@ -2928,7 +2924,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro
|
||||
}
|
||||
|
||||
// append default properties
|
||||
getDefaultTIFFTags (cl);
|
||||
const std::vector<Tag*> defTags = getDefaultTIFFTags (cl);
|
||||
|
||||
defTags[0]->setInt (W, 0, LONG);
|
||||
defTags[1]->setInt (H, 0, LONG);
|
||||
@ -2939,7 +2935,9 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro
|
||||
}
|
||||
|
||||
for (int i = defTags.size() - 1; i >= 0; i--) {
|
||||
cl->replaceTag (defTags[i]->clone (cl));
|
||||
Tag* defTag = defTags[i];
|
||||
cl->replaceTag (defTag->clone (cl));
|
||||
delete defTag;
|
||||
}
|
||||
|
||||
// calculate strip offsets
|
||||
|
@ -306,8 +306,6 @@ public:
|
||||
class ExifManager
|
||||
{
|
||||
|
||||
static std::vector<Tag*> defTags;
|
||||
|
||||
static Tag* saveCIFFMNTag (FILE* f, TagDirectory* root, int len, const char* name);
|
||||
public:
|
||||
static TagDirectory* parse (FILE*f, int base, bool skipIgnored = true);
|
||||
@ -316,7 +314,10 @@ public:
|
||||
static TagDirectory* parseCIFF (FILE* f, int base, int length);
|
||||
static void parseCIFF (FILE* f, int base, int length, TagDirectory* root);
|
||||
|
||||
static const std::vector<Tag*>& getDefaultTIFFTags (TagDirectory* forthis);
|
||||
/// @brief Get default tag for TIFF
|
||||
/// @param forthis The byte order will be taken from the given directory.
|
||||
/// @return The ownership of the return tags is passed to the caller.
|
||||
static std::vector<Tag*> getDefaultTIFFTags (TagDirectory* forthis);
|
||||
static int createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char* buffer);
|
||||
static int createTIFFHeader (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, int bps, const char* profiledata, int profilelen, const char* iptcdata, int iptclen, unsigned char* buffer);
|
||||
};
|
||||
|
@ -30,18 +30,8 @@
|
||||
CacheManager*
|
||||
CacheManager::getInstance(void)
|
||||
{
|
||||
static CacheManager* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new CacheManager();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static CacheManager instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
void CacheManager::init ()
|
||||
|
@ -103,6 +103,12 @@ CoordinateAdjuster::CoordinateAdjuster(CoordinateProvider *provider, CurveEditor
|
||||
createWidgets(defaultAxis);
|
||||
}
|
||||
|
||||
CoordinateAdjuster::~CoordinateAdjuster()
|
||||
{
|
||||
for (std::vector<AxisAdjuster*>::iterator iterator = axisAdjusters.begin(); iterator != axisAdjusters.end(); ++iterator)
|
||||
delete *iterator;
|
||||
}
|
||||
|
||||
void CoordinateAdjuster::createWidgets(const std::vector<Axis> &axis)
|
||||
{
|
||||
unsigned int count = axis.size();
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
/// For more complex adjuster
|
||||
CoordinateAdjuster(CoordinateProvider *provider, CurveEditorSubGroup *parent, const std::vector<Axis> &axis);
|
||||
|
||||
virtual ~CoordinateAdjuster() {}
|
||||
virtual ~CoordinateAdjuster();
|
||||
|
||||
// Update the Axis list, e.g. on Curve change, but MUST have the same axis count
|
||||
void setAxis(const std::vector<Axis> &axis);
|
||||
|
@ -528,7 +528,6 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc)
|
||||
lastSaveAsFileName = removeExtension (Glib::path_get_basename (fname));
|
||||
|
||||
previewHandler = new PreviewHandler ();
|
||||
previewHandler2 = new PreviewHandler ();
|
||||
|
||||
this->isrc = isrc;
|
||||
ipc = rtengine::StagedImageProcessor::create (isrc);
|
||||
|
@ -88,7 +88,6 @@ protected:
|
||||
ImageAreaPanel* iareapanel;
|
||||
PreviewHandler* previewHandler;
|
||||
PreviewHandler* beforePreviewHandler; // for the before-after view
|
||||
PreviewHandler* previewHandler2;
|
||||
Navigator* navigator;
|
||||
ImageAreaPanel* beforeIarea; // for the before-after view
|
||||
Gtk::VBox* beforeBox;
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include "rtimage.h"
|
||||
#include "threadutils.h"
|
||||
|
||||
static EditWindow* editWnd = NULL;
|
||||
|
||||
// Check if the system has more than one display and option is set
|
||||
bool EditWindow::isMultiDisplayEnabled()
|
||||
{
|
||||
@ -35,29 +33,26 @@ bool EditWindow::isMultiDisplayEnabled()
|
||||
// Should only be created once, auto-creates window on correct display
|
||||
EditWindow* EditWindow::getInstance(RTWindow* p)
|
||||
{
|
||||
struct EditWindowInstance
|
||||
{
|
||||
EditWindow editWnd;
|
||||
|
||||
if (editWnd == NULL) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( editWnd == 0 ) {
|
||||
editWnd = new EditWindow(p);
|
||||
|
||||
EditWindowInstance(RTWindow* p) : editWnd(p)
|
||||
{
|
||||
// Determine the other display and maximize the window on that
|
||||
const Glib::RefPtr< Gdk::Window >& wnd = p->get_window();
|
||||
int monNo = p->get_screen()->get_monitor_at_window (wnd);
|
||||
|
||||
Gdk::Rectangle lMonitorRect;
|
||||
editWnd->get_screen()->get_monitor_geometry(isMultiDisplayEnabled() ? (monNo == 0 ? 1 : 0) : monNo, lMonitorRect);
|
||||
editWnd->move(lMonitorRect.get_x(), lMonitorRect.get_y());
|
||||
editWnd->maximize();
|
||||
editWnd->show();
|
||||
} else {
|
||||
editWnd->show_all();
|
||||
editWnd.get_screen()->get_monitor_geometry(isMultiDisplayEnabled() ? (monNo == 0 ? 1 : 0) : monNo, lMonitorRect);
|
||||
editWnd.move(lMonitorRect.get_x(), lMonitorRect.get_y());
|
||||
editWnd.maximize();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return editWnd;
|
||||
static EditWindowInstance instance_(p);
|
||||
instance_.editWnd.show_all();
|
||||
return &instance_.editWnd;
|
||||
}
|
||||
|
||||
EditWindow::EditWindow (RTWindow* p) : parent(p) , isFullscreen(false)
|
||||
|
@ -176,14 +176,17 @@ void ExifPanel::setImageData (const ImageMetaData* id)
|
||||
idata = id;
|
||||
exifTreeModel->clear ();
|
||||
|
||||
const std::vector<Tag*>& defTags = ExifManager::getDefaultTIFFTags (NULL);
|
||||
const std::vector<Tag*> defTags = ExifManager::getDefaultTIFFTags (NULL);
|
||||
|
||||
for (size_t i = 0; i < defTags.size(); i++)
|
||||
if (defTags[i]->nameToString() == "ImageWidth" || defTags[i]->nameToString() == "ImageHeight" || defTags[i]->nameToString() == "BitsPerSample") {
|
||||
addTag (exifTreeModel->children(), defTags[i]->nameToString(), "?", AC_SYSTEM, false);
|
||||
for (size_t i = 0; i < defTags.size(); i++) {
|
||||
Tag* defTag = defTags[i];
|
||||
if (defTag->nameToString() == "ImageWidth" || defTag->nameToString() == "ImageHeight" || defTag->nameToString() == "BitsPerSample") {
|
||||
addTag (exifTreeModel->children(), defTag->nameToString(), "?", AC_SYSTEM, false);
|
||||
} else {
|
||||
addTag (exifTreeModel->children(), defTags[i]->nameToString(), defTags[i]->valueToString(), AC_SYSTEM, false);
|
||||
addTag (exifTreeModel->children(), defTag->nameToString(), defTag->valueToString(), AC_SYSTEM, false);
|
||||
}
|
||||
delete defTag;
|
||||
}
|
||||
|
||||
if (id && id->getExifData ()) {
|
||||
// id->getExifData ()->printAll ();
|
||||
@ -516,6 +519,9 @@ void ExifPanel::editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib
|
||||
}
|
||||
}
|
||||
|
||||
if (iter == root.end())
|
||||
return;
|
||||
|
||||
if (dp == Glib::ustring::npos) {
|
||||
if (value == "#keep" && iter->get_value (exifColumns.action) != AC_SYSTEM) {
|
||||
iter->set_value (exifColumns.icon, iter->get_value (exifColumns.edited) ? editicon : keepicon);
|
||||
|
@ -74,18 +74,8 @@ bool ExtProgAction::Execute(std::vector<Glib::ustring> fileNames)
|
||||
// Generates as singleton
|
||||
ExtProgStore* ExtProgStore::getInstance()
|
||||
{
|
||||
static ExtProgStore* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new ExtProgStore();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static ExtProgStore instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
ExtProgStore::~ExtProgStore()
|
||||
|
@ -169,19 +169,8 @@ PreviewLoader::PreviewLoader():
|
||||
|
||||
PreviewLoader* PreviewLoader::getInstance(void)
|
||||
{
|
||||
// this will not be deleted...
|
||||
static PreviewLoader* instance_ = NULL;
|
||||
|
||||
if ( instance_ == NULL ) {
|
||||
static MyMutex smutex_;
|
||||
MyMutex::MyLock lock(smutex_);
|
||||
|
||||
if ( instance_ == NULL ) {
|
||||
instance_ = new PreviewLoader();
|
||||
}
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static PreviewLoader instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoaderListener* l)
|
||||
|
@ -175,14 +175,8 @@ public:
|
||||
ThumbImageUpdater*
|
||||
ThumbImageUpdater::getInstance(void)
|
||||
{
|
||||
// this will not be deleted...
|
||||
static ThumbImageUpdater* instance_ = 0;
|
||||
|
||||
if ( instance_ == 0 ) {
|
||||
instance_ = new ThumbImageUpdater();
|
||||
}
|
||||
|
||||
return instance_;
|
||||
static ThumbImageUpdater instance_;
|
||||
return &instance_;
|
||||
}
|
||||
|
||||
ThumbImageUpdater::ThumbImageUpdater():
|
||||
|
Loading…
x
Reference in New Issue
Block a user