merge with dev

This commit is contained in:
Desmis
2020-02-06 11:44:03 +01:00
41 changed files with 2286 additions and 1021 deletions

View File

@@ -55,6 +55,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
fslistener(nullptr),
iatlistener(nullptr),
hbToolBar1STB(nullptr),
progressImage(nullptr),
progressLabel(nullptr),
hasValidCurrentEFS(false),
filterPanel(nullptr),
exportPanel(nullptr),
@@ -705,35 +707,38 @@ void FileCatalog::_refreshProgressBar ()
// The second, usually longer pass is done multithreaded down in the single entries and is NOT measured by this
if (!inTabMode && (!previewsToLoad || std::floor(100.f * previewsLoaded / previewsToLoad) != std::floor(100.f * (previewsLoaded - 1) / previewsToLoad))) {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
Gtk::Label *label = nullptr;
if (!progressImage || !progressLabel) {
// create tab label once
Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
progressImage = Gtk::manage(new RTImage("folder-closed.png"));
progressLabel = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER")));
grid->attach_next_to(*progressImage, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*progressLabel, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->set_tooltip_markup(M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
grid->show_all();
if (options.mainNBVertical) {
progressLabel->set_angle(90);
}
if (nb) {
nb->set_tab_label(*filepanel, *grid);
}
}
if (!previewsToLoad) {
grid->attach_next_to(*Gtk::manage(new RTImage("folder-closed.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
progressImage->changeImage("folder-closed.png");
int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded);
label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") +
(filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
+ Glib::ustring::format(previewsLoaded) +
(filteredCount != previewsLoaded ? "]" : ")")));
progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") +
(filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
+ Glib::ustring::format(previewsLoaded) +
(filteredCount != previewsLoaded ? "]" : ")"));
} else {
grid->attach_next_to(*Gtk::manage(new RTImage("magnifier.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" ));
progressImage->changeImage("magnifier.png");
progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") + " ["
+ Glib::ustring::format(previewsLoaded) + "/"
+ Glib::ustring::format(previewsToLoad) + "]" );
filepanel->loadingThumbs("", (double)previewsLoaded / previewsToLoad);
}
if (options.mainNBVertical) {
label->set_angle(90);
}
grid->attach_next_to(*label, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->set_tooltip_markup(M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
grid->show_all();
if (nb) {
nb->set_tab_label(*filepanel, *grid);
}
}
}

View File

@@ -124,6 +124,9 @@ private:
Gtk::Button* zoomInButton;
Gtk::Button* zoomOutButton;
RTImage* progressImage;
Gtk::Label* progressLabel;
MyMutex dirEFSMutex;
ExifFilterSettings dirEFS;
ExifFilterSettings currentEFS;

View File

@@ -58,7 +58,7 @@ PdSharpening::PdSharpening() :
pack_start(*hb);
Gtk::VBox* rld = Gtk::manage(new Gtk::VBox());
dradius = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS"), 0.4, 1.15, 0.01, 0.75));
dradius = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS"), 0.4, 2.0, 0.01, 0.75));
dradius->addAutoButton();
dradius->setAutoValue(true);
dradiusOffset = Gtk::manage(new Adjuster(M("TP_SHARPENING_RADIUS_BOOST"), -0.5, 0.5, 0.01, 0.0));

View File

@@ -87,7 +87,16 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
}
//GDK_SCROLL_SMOOTH can come in as many events with small deltas, don't quantize these to +/-1.0 so trackpads work well
double coef;
double scroll_unit;
if (arrangement == TB_Vertical) {
scroll_unit = vscroll.get_adjustment()->get_step_increment();
} else {
scroll_unit = hscroll.get_adjustment()->get_step_increment();
}
if(direction == GDK_SCROLL_SMOOTH) {
#ifdef GDK_WINDOWING_QUARTZ
scroll_unit = 1.0;
#endif
coef = delta;
} else if (direction == GDK_SCROLL_DOWN) {
coef = +1.0;
@@ -99,7 +108,7 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
if (direction == GDK_SCROLL_UP || direction == GDK_SCROLL_DOWN || direction == GDK_SCROLL_SMOOTH) {
if (arrangement == TB_Vertical) {
double currValue = vscroll.get_value();
double newValue = rtengine::LIM<double>(currValue + coef * vscroll.get_adjustment()->get_step_increment(),
double newValue = rtengine::LIM<double>(currValue + coef * scroll_unit,
vscroll.get_adjustment()->get_lower (),
vscroll.get_adjustment()->get_upper());
if (newValue != currValue) {
@@ -107,7 +116,7 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY)
}
} else {
double currValue = hscroll.get_value();
double newValue = rtengine::LIM<double>(currValue + coef * hscroll.get_adjustment()->get_step_increment(),
double newValue = rtengine::LIM<double>(currValue + coef * scroll_unit,
hscroll.get_adjustment()->get_lower(),
hscroll.get_adjustment()->get_upper());
if (newValue != currValue) {