merge with dev

This commit is contained in:
Desmis
2018-05-13 17:41:51 +02:00
15 changed files with 70 additions and 22 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -25,8 +25,10 @@
"Panasonic DC-FZ82": ["Panasonic DMC-FZ80", "Panasonic DMC-FZ85"],
"Panasonic DC-TZ91": ["Panasonic DC-TZ90", "Panasonic DC-TZ92", "Panasonic DC-TZ93", "Panasonic DC-ZS70"],
"Panasonic DMC-G8": ["Panasonic DMC-G80", "Panasonic DMC-G81", "Panasonic DMC-G85"],
"Panasonic DMC-GX85": ["Panasonic DMC-GX80", "Panasonic DMC-GX7MK2"],
"Panasonic DMC-LX15": ["Panasonic DMC-LX9", "Panasonic DMC-LX10"],
"Panasonic DC-TZ100": ["Panasonic DC-ZS100", "Panasonic DC-ZS110", "Panasonic DC-TZ101", "Panasonic DC-TZ110"],
"Panasonic DMC-TZ61": ["Panasonic DMC-TZ60", "Panasonic DMC-ZS40"],
"Panasonic DMC-TZ71": ["Panasonic DMC-TZ70", "Panasonic DMC-ZS50"],
"Panasonic DMC-TZ81": ["Panasonic DMC-TZ80", "Panasonic DMC-TZ85", "Panasonic DMC-ZS60"]
}

View File

@@ -1938,6 +1938,15 @@ Camera constants:
}
},
{ // Quality X, no white-frames nor black-frames yet, see #4550
"make_model": [ "Panasonic DC-GX9" ],
"dcraw_matrix": [ 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 ], // ColorMatrix2 from Adobe DNG Converter 10.3
"ranges": {
"black": 16,
"white": 4080
}
},
{ // Quality B, Same as Panasonic G7
"make_model": [ "Panasonic DMC-G8", "Panasonic DMC-G80", "Panasonic DMC-G81", "Panasonic DMC-G85" ],
"dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], // DNG_v9.7 D65

View File

@@ -535,6 +535,7 @@ public:
buffer = new unsigned char[written + 1];
memcpy(buffer, utf8Str, written);
buffer[written] = 0;
g_free(utf8Str);
} else if (!memcmp(value, "\0\0\0\0\0\0\0\0", 8)) {
// local charset string, whatever it is
memcpy(buffer, value + 8, count - 8);

View File

@@ -127,6 +127,9 @@ void findOriginalEntries (const std::vector<ThumbBrowserEntryBase*>& entries)
FileBrowser::FileBrowser () :
menuLabel(nullptr),
#ifdef WIN32
miOpenDefaultViewer(nullptr),
#endif
selectDF(nullptr),
thisIsDF(nullptr),
autoDF(nullptr),
@@ -225,8 +228,6 @@ FileBrowser::FileBrowser () :
* *********************/
#if defined(WIN32)
Gtk::manage(miOpenDefaultViewer = new Gtk::MenuItem (M("FILEBROWSER_OPENDEFAULTVIEWER")));
#else
miOpenDefaultViewer = nullptr;
#endif
// Build a list of menu items
@@ -240,7 +241,7 @@ FileBrowser::FileBrowser () :
}
// Attach them to menu
if (!mMenuExtProgs.empty() || miOpenDefaultViewer != nullptr) {
if (!mMenuExtProgs.empty() || miOpenDefaultViewer) {
amiExtProg = new Gtk::MenuItem*[mMenuExtProgs.size()];
int itemNo = 0;
@@ -249,11 +250,12 @@ FileBrowser::FileBrowser () :
p++;
Gtk::Menu* submenuExtProg = Gtk::manage (new Gtk::Menu());
if (miOpenDefaultViewer != nullptr) {
#ifdef WIN32
if (miOpenDefaultViewer) {
submenuExtProg->attach (*miOpenDefaultViewer, 0, 1, p, p + 1);
p++;
}
#endif
for (auto it = mMenuExtProgs.begin(); it != mMenuExtProgs.end(); it++, itemNo++) {
submenuExtProg->attach (*Gtk::manage(amiExtProg[itemNo] = new Gtk::MenuItem ((*it).first)), 0, 1, p, p + 1);
p++;
@@ -262,11 +264,12 @@ FileBrowser::FileBrowser () :
submenuExtProg->show_all ();
menuExtProg->set_submenu (*submenuExtProg);
} else {
if (miOpenDefaultViewer != nullptr) {
#ifdef WIN32
if (miOpenDefaultViewer) {
pmenu->attach (*miOpenDefaultViewer, 0, 1, p, p + 1);
p++;
}
#endif
for (auto it = mMenuExtProgs.begin(); it != mMenuExtProgs.end(); it++, itemNo++) {
pmenu->attach (*Gtk::manage(amiExtProg[itemNo] = new Gtk::MenuItem ((*it).first)), 0, 1, p, p + 1);
p++;
@@ -419,9 +422,11 @@ FileBrowser::FileBrowser () :
amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i]));
}
if (miOpenDefaultViewer != nullptr) {
#ifdef WIN32
if (miOpenDefaultViewer) {
miOpenDefaultViewer->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), miOpenDefaultViewer));
}
#endif
trash->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), trash));
untrash->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), untrash));
@@ -984,8 +989,10 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
tbl->clearFromCacheRequested (mselected, true);
//queue_draw ();
} else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) {
#ifdef WIN32
} else if (miOpenDefaultViewer && m == miOpenDefaultViewer) {
openDefaultViewer(1);
#endif
}
}
@@ -1091,6 +1098,7 @@ void FileBrowser::partPasteProfile ()
}
}
#ifdef WIN32
void FileBrowser::openDefaultViewer (int destination)
{
bool success = true;
@@ -1104,10 +1112,11 @@ void FileBrowser::openDefaultViewer (int destination)
}
if (!success) {
Gtk::MessageDialog msgd (M("MAIN_MSG_IMAGEUNPROCESSED"), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
Gtk::MessageDialog msgd(getToplevelWindow(this), M("MAIN_MSG_IMAGEUNPROCESSED"), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.run ();
}
}
#endif
bool FileBrowser::keyPressed (GdkEventKey* event)
{
@@ -1186,6 +1195,7 @@ bool FileBrowser::keyPressed (GdkEventKey* event)
}
openRequested(mselected);
#ifdef WIN32
} else if (event->keyval == GDK_KEY_F5) {
int dest = 1;
@@ -1197,6 +1207,7 @@ bool FileBrowser::keyPressed (GdkEventKey* event)
openDefaultViewer (dest);
return true;
#endif
} else if (event->keyval == GDK_KEY_Page_Up) {
scrollPage(GDK_SCROLL_UP);
return true;

View File

@@ -190,7 +190,9 @@ public:
void selectImage (Glib::ustring fname);
void openNextPreviousEditorImage (Glib::ustring fname, eRTNav eNextPrevious);
#ifdef WIN32
void openDefaultViewer (int destination);
#endif
void thumbRearrangementNeeded ();
void _thumbRearrangementNeeded ();

View File

@@ -349,6 +349,10 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
spotsize->signal_changed().connect( sigc::mem_fun(*this, &WhiteBalance::spotSizeChanged) );
}
WhiteBalance::~WhiteBalance()
{
idle_register.destroy();
}
void WhiteBalance::enabledChanged()
{
@@ -895,12 +899,28 @@ inline Gtk::TreeRow WhiteBalance::getActiveMethod ()
void WhiteBalance::WBChanged(double temperature, double greenVal)
{
GThreadLock lock;
disableListener();
setEnabled(true);
temp->setValue(temperature);
green->setValue(greenVal);
temp->setDefault(temperature);
green->setDefault(greenVal);
enableListener();
struct Data {
WhiteBalance* self;
double temperature;
double green_val;
};
const auto func = [](gpointer data) -> gboolean {
WhiteBalance* const self = static_cast<WhiteBalance*>(static_cast<Data*>(data)->self);
const double temperature = static_cast<Data*>(data)->temperature;
const double green_val = static_cast<Data*>(data)->green_val;
delete static_cast<Data*>(data);
self->disableListener();
self->setEnabled(true);
self->temp->setValue(temperature);
self->green->setValue(green_val);
self->temp->setDefault(temperature);
self->green->setDefault(green_val);
self->enableListener();
return FALSE;
};
idle_register.add(func, new Data{this, temperature, greenVal});
}

View File

@@ -77,6 +77,9 @@ protected:
int custom_temp;
double custom_green;
double custom_equal;
IdleRegister idle_register;
void cache_customWB (int temp, double green); //cache custom WB setting to allow its recall
void cache_customTemp (int temp); //cache Temperature only to allow its recall
void cache_customGreen (double green); //cache Green only to allow its recall
@@ -92,7 +95,7 @@ protected:
public:
WhiteBalance ();
~WhiteBalance () {};
~WhiteBalance ();
static void init ();
static void cleanup ();