From b856e210aed86d7c8da5bd4f1d4b969da8fbbd2f Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 8 Dec 2015 19:00:35 +0100 Subject: [PATCH 01/19] Fix Win32 Debug build part one --- rtengine/improcfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 8180c353f..f21748a3b 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5824,7 +5824,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (EditBuffer *editBuffer, }; #ifdef _DEBUG - #pragma omp parallel default(shared) firstprivate(highlight, ccut, clut, chromaticity, bwToning, rstprotection, avoidColorShift, LCredsk, protectRed, protectRedH, gamutLch, lold, lnew, MunsDebugInfo, pW) if (multiThread) + #pragma omp parallel default(shared) firstprivate(lold, lnew, MunsDebugInfo, pW) if (multiThread) #else #pragma omp parallel if (multiThread) #endif From 031c41af60469314ccceef649c0683bf04a5205b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 9 Dec 2015 01:54:47 +0100 Subject: [PATCH 02/19] Fix Win32 Debug build part two --- rtengine/ipvibrance.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 2c91fbf01..3e6ff97f2 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -188,7 +188,7 @@ void ImProcFunctions::vibrance (LabImage* lab) MunsDebugInfo = new MunsellDebugInfo(); } - #pragma omp parallel default(shared) firstprivate(lab, width, height, chromaPastel, chromaSatur, highlight, limitpastelsatur, transitionweighting, protectskins, avoidcolorshift, MunsDebugInfo) reduction(+: negat, moreRGB, negsat, moresat) if (multiThread) + #pragma omp parallel default(shared) firstprivate(lab, MunsDebugInfo) reduction(+: negat, moreRGB, negsat, moresat) if (multiThread) #else #pragma omp parallel default(shared) if (multiThread) #endif From 26e094d56e996e76e995fd921ade7dcd0972171f Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Wed, 9 Dec 2015 14:04:02 +0100 Subject: [PATCH 03/19] Prevent segfault when invalid theme in options file, fixes #2991 --- rtgui/main.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtgui/main.cc b/rtgui/main.cc index bbfca0c52..4ca8b94d7 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -278,6 +278,12 @@ int main(int argc, char **argv) if (options.theme.empty()) { options.theme = "21-Gray-Gray"; + } else { + std::string themeFile = argv0 + "/themes/" + options.theme + ".gtkrc"; + if (!std::ifstream(themeFile)) { + printf ("Current theme in options file is invalid: %s\nChanging to 21-Gray-Gray\n", options.theme.c_str()); + options.theme = "21-Gray-Gray"; + } } if (!options.useSystemTheme) { From 09062a95076bb3c2b3c63fb053047df5780be226 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 9 Dec 2015 15:44:28 +0100 Subject: [PATCH 04/19] Fix build problem with latest commit --- rtgui/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index 4ca8b94d7..03b85654e 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -280,7 +280,7 @@ int main(int argc, char **argv) options.theme = "21-Gray-Gray"; } else { std::string themeFile = argv0 + "/themes/" + options.theme + ".gtkrc"; - if (!std::ifstream(themeFile)) { + if (!std::ifstream(themeFile.c_str())) { printf ("Current theme in options file is invalid: %s\nChanging to 21-Gray-Gray\n", options.theme.c_str()); options.theme = "21-Gray-Gray"; } From 4e0e3230ccde4e4290c78859cccf19c088525f6a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 16 Dec 2015 16:56:26 +0100 Subject: [PATCH 05/19] Segfault in Denoise Auto Multizone mode when smoothing set to max in preferences, fixes #3022 --- rtengine/simpleprocess.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 91b7df178..665a3a236 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -191,8 +191,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p float *ry = new float [nbtl]; float *sk = new float [nbtl]; float *pcsk = new float [nbtl]; - float *Max_R_ = new float [nbtl]; - float *Max_B_ = new float [nbtl]; // printf("expert=%d\n",settings->leveldnautsimpl); if(settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { @@ -371,11 +369,11 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p MaxRMoy += max_r[k]; if(max_r[k] > MaxR) { - MaxR = Max_R_[k]; + MaxR = max_r[k]; } if(max_b[k] > MaxB) { - MaxB = Max_B_[k]; + MaxB = max_b[k]; } } @@ -713,8 +711,6 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p delete [] ry; delete [] sk; delete [] pcsk; - delete [] Max_R_; - delete [] Max_B_; imgsrc->convertColorSpace(baseImg, params.icm, currWB); From d3ac22531bc4899f0ae8b4f3c45cdb1daca3d09c Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 8 Nov 2015 11:32:14 +0100 Subject: [PATCH 06/19] Extend the file browser so that it will only show the original image if several files of different formats are present. --- rtgui/filebrowser.cc | 99 ++++++++++++++++++++++++++++++++++ rtgui/thumbbrowserentrybase.cc | 13 ++++- rtgui/thumbbrowserentrybase.h | 26 +++++---- 3 files changed, 127 insertions(+), 11 deletions(-) diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 294c074bb..5e1dd734e 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -19,6 +19,7 @@ * along with RawTherapee. If not, see . */ #include "filebrowser.h" +#include #include #include "options.h" #include "multilangmgr.h" @@ -32,6 +33,96 @@ extern Options options; +namespace +{ + +const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) +{ + // We use the parsed extensions as a priority list, + // i.e. what comes earlier in the list is considered an original of what comes later. + typedef std::vector ExtensionVector; + typedef ExtensionVector::const_iterator ExtensionIterator; + + const ExtensionVector& originalExtensions = options.parsedExtensions; + + // Extract extension from basename + const Glib::ustring basename = Glib::path_get_basename (entry->filename.lowercase()); + + const Glib::ustring::size_type pos = basename.find_last_of ('.'); + if (pos >= basename.length () - 1) { + return NULL; + } + + const Glib::ustring extension = basename.substr (pos + 1); + + // Try to find a matching original extension + for (ExtensionIterator originalExtension = originalExtensions.begin(); originalExtension != originalExtensions.end(); ++originalExtension) { + if (*originalExtension == extension) { + return &*originalExtension; + } + } + + return NULL; +} + +ThumbBrowserEntryBase* selectOriginalEntry (ThumbBrowserEntryBase* original, ThumbBrowserEntryBase* candidate) +{ + // The candidate will become the new original, if it has an original extension + // and if its extension is higher in the list than the old original. + if (const Glib::ustring* candidateExtension = getOriginalExtension (candidate)) { + if (original == NULL) { + return candidate; + } else if (const Glib::ustring* originalExtension = getOriginalExtension (original)) { + return candidateExtension < originalExtension ? candidate : original; + } + } else { + return original; + } +} + +void findOriginalEntries (const std::vector& entries) +{ + typedef std::vector EntryVector; + typedef EntryVector::const_iterator EntryIterator; + typedef std::map BasenameMap; + typedef BasenameMap::const_iterator BasenameIterator; + + // Sort all entries into buckets by basename without extension + BasenameMap byBasename; + + for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { + const Glib::ustring basename = Glib::path_get_basename ((*entry)->filename.lowercase()); + + const Glib::ustring::size_type pos = basename.find_last_of ('.'); + if (pos >= basename.length () - 1) { + (*entry)->setOriginal (NULL); + continue; + } + + const Glib::ustring withoutExtension = basename.substr (0, pos); + + byBasename[withoutExtension].push_back (*entry); + } + + // Find the original image for each bucket + for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) { + const EntryVector& entries = bucket->second; + ThumbBrowserEntryBase* original = NULL; + + // Select the most likely original in a first pass... + for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { + original = selectOriginalEntry (original, *entry); + } + + // ...and link all other images to it in a second pass. + for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { + (*entry)->setOriginal (*entry != original ? original : NULL); + } + } +} + +} + FileBrowser::FileBrowser () : tbl(NULL), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) { @@ -1370,6 +1461,10 @@ void FileBrowser::applyFilter (const BrowserFilter& filter) MYWRITERLOCK(l, entryRW); // Don't make this a writer lock! HOMBRE: Why? 'selected' is modified here #endif + if (true/* TODO: filterOriginal */) { + findOriginalEntries(fd); + } + for (size_t i = 0; i < fd.size(); i++) { if (checkFilter (fd[i])) { numFiltered++; @@ -1400,6 +1495,10 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry FileBrowserEntry* entry = static_cast(entryb); + if (true/* TODO: filterOriginal */ && entry->getOriginal() != NULL) { + return false; + } + // return false if basic filter settings are not satisfied if ((filter.showRanked[entry->thumbnail->getRank()] == false ) || (filter.showCLabeled[entry->thumbnail->getColorLabel()] == false ) || diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index f9f8f9f1e..d1d7adc51 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -26,7 +26,7 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) prex(0), prey(0), upperMargin(6), borderWidth(1), textGap(6), sideMargin(8), lowerMargin(8), preview(NULL), dispname(Glib::path_get_basename (fname)), buttonSet(NULL), width(0), height(0), exp_width(0), exp_height(0), startx(0), starty(0), ofsX(0), ofsY(0), redrawRequests(0), - parent(NULL), bbSelected(false), bbFramed(false), bbPreview(NULL), + parent(NULL), original(NULL), bbSelected(false), bbFramed(false), bbPreview(NULL), thumbnail(NULL), filename(fname), shortname(dispname), exifline(""), datetimeline(""), selected(false), drawable(false), filtered(false), framed(false), processing(false), italicstyle(false), edited(false), recentlysaved(false), updatepriority(false), withFilename(WFNAME_NONE) {} @@ -544,6 +544,17 @@ bool ThumbBrowserEntryBase::insideWindow (int x, int y, int w, int h) return !(ofsX + startx > x + w || ofsX + startx + exp_width < x || ofsY + starty > y + h || ofsY + starty + exp_height < y); } +std::vector > ThumbBrowserEntryBase::getIconsOnImageArea() +{ + return std::vector >(); +} + +void ThumbBrowserEntryBase::getIconSize(int& w, int& h) +{ + w = 0; + h = 0; +} + bool ThumbBrowserEntryBase::motionNotify (int x, int y) { diff --git a/rtgui/thumbbrowserentrybase.h b/rtgui/thumbbrowserentrybase.h index e910aedd0..1b7f0691a 100644 --- a/rtgui/thumbbrowserentrybase.h +++ b/rtgui/thumbbrowserentrybase.h @@ -72,6 +72,7 @@ protected: int redrawRequests; ThumbBrowserBase* parent; + ThumbBrowserEntryBase* original; Glib::RefPtr backBuffer; bool bbSelected, bbFramed; @@ -168,22 +169,17 @@ public: return shortname.casefold() > other.shortname.casefold(); } + ThumbBrowserEntryBase* getOriginal () const; + void setOriginal (ThumbBrowserEntryBase* original); + virtual void refreshThumbnailImage () {} virtual void refreshQuickThumbnailImage () {} virtual void calcThumbnailSize () {} virtual void drawProgressBar (Glib::RefPtr win, Glib::RefPtr gc, const Gdk::Color& foregr, const Gdk::Color& backgr, int x, int w, int y, int h) {} - virtual std::vector > getIconsOnImageArea () - { - std::vector > r; - return r; - } - virtual void getIconSize (int& w, int& h) - { - w = 0; - h = 0; - } + virtual std::vector > getIconsOnImageArea (); + virtual void getIconSize (int& w, int& h); virtual bool motionNotify (int x, int y); virtual bool pressNotify (int button, int type, int bstate, int x, int y); @@ -191,4 +187,14 @@ public: virtual Glib::ustring getToolTip (int x, int y); }; +inline ThumbBrowserEntryBase* ThumbBrowserEntryBase::getOriginal() const +{ + return original; +} + +inline void ThumbBrowserEntryBase::setOriginal(ThumbBrowserEntryBase* original) +{ + this->original = original; +} + #endif From ee766b71b83dd9377300da829a821d488bfe39e7 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 8 Nov 2015 12:24:48 +0100 Subject: [PATCH 07/19] Add a button to filter the original files to the file browser. --- rtdata/languages/default | 1 + rtgui/browserfilter.cc | 8 ++++---- rtgui/browserfilter.h | 1 + rtgui/filebrowser.cc | 4 ++-- rtgui/filecatalog.cc | 43 ++++++++++++++++++++++++++++------------ rtgui/filecatalog.h | 5 +++-- 6 files changed, 41 insertions(+), 21 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 84586340e..dbcb29a6a 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -171,6 +171,7 @@ FILEBROWSER_SHOWEDITEDHINT;Show edited images.\nShortcut: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Show not edited images.\nShortcut: 6 FILEBROWSER_SHOWEXIFINFO;Show Exif info.\n\nShortcuts:\ni - Multiple Editor Tabs Mode,\nAlt-i - Single Editor Tab Mode. FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. +FILEBROWSER_SHOWORIGINALHINT;Show only the original images. FILEBROWSER_SHOWRANK1HINT;Show images ranked as 1-star.\nShortcut: 1 FILEBROWSER_SHOWRANK2HINT;Show images ranked as 2-star.\nShortcut: 2 FILEBROWSER_SHOWRANK3HINT;Show images ranked as 3-star.\nShortcut: 3 diff --git a/rtgui/browserfilter.cc b/rtgui/browserfilter.cc index f7d1038ed..6fa663aa3 100644 --- a/rtgui/browserfilter.cc +++ b/rtgui/browserfilter.cc @@ -18,11 +18,11 @@ */ #include "browserfilter.h" -BrowserFilter::BrowserFilter () : exifFilterEnabled (false) +BrowserFilter::BrowserFilter () : exifFilterEnabled (false), + showTrash (true), + showNotTrash (true), + showOriginal (false) { - - showTrash = true; - for (int i = 0; i < 6; i++) { showRanked[i] = true; showCLabeled[i] = true; diff --git a/rtgui/browserfilter.h b/rtgui/browserfilter.h index 6cfa3be62..8880a364d 100644 --- a/rtgui/browserfilter.h +++ b/rtgui/browserfilter.h @@ -30,6 +30,7 @@ public: bool showCLabeled[6]; bool showTrash; bool showNotTrash; + bool showOriginal; bool showEdited[2]; bool showRecentlySaved[2]; bool multiselect; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 5e1dd734e..7d921b328 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -1461,7 +1461,7 @@ void FileBrowser::applyFilter (const BrowserFilter& filter) MYWRITERLOCK(l, entryRW); // Don't make this a writer lock! HOMBRE: Why? 'selected' is modified here #endif - if (true/* TODO: filterOriginal */) { + if (filter.showOriginal) { findOriginalEntries(fd); } @@ -1495,7 +1495,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry FileBrowserEntry* entry = static_cast(entryb); - if (true/* TODO: filterOriginal */ && entry->getOriginal() != NULL) { + if (filter.showOriginal && entry->getOriginal() != NULL) { return false; } diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index d40b7d720..92ce120c2 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -294,8 +294,16 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : bCateg[18] = bNotTrash->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bNotTrash, true)); bNotTrash->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false); + bOriginal = Gtk::manage( new Gtk::ToggleButton () ); + bOriginal->set_label ("O"); // TODO: Add icon... + bOriginal->set_tooltip_markup (M("FILEBROWSER_SHOWORIGINALHINT")); + bOriginal->set_relief (Gtk::RELIEF_NONE); + bCateg[19] = bOriginal->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bOriginal, true)); + bOriginal->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false); + buttonBar->pack_start (*bTrash, Gtk::PACK_SHRINK); buttonBar->pack_start (*bNotTrash, Gtk::PACK_SHRINK); + buttonBar->pack_start (*bOriginal, Gtk::PACK_SHRINK); buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); fileBrowser->trash_changed().connect( sigc::mem_fun(*this, &FileCatalog::trashChanged) ); @@ -318,6 +326,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : // 16 - bRecentlySaved[1] // 17 - bTrash // 18 - bNotTrash + // 19 - bOriginal categoryButtons[0] = bFilterClear; categoryButtons[1] = bUnRanked; @@ -342,6 +351,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : categoryButtons[17] = bTrash; categoryButtons[18] = bNotTrash; + categoryButtons[19] = bOriginal; exifInfo = Gtk::manage(new Gtk::ToggleButton ()); exifInfo->set_image (*Gtk::manage(new RTImage ("info.png"))); @@ -1351,8 +1361,8 @@ void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick // if no modifier key is pressed, if (!(control_down || shift_down)) { - // if we're deselecting non-trashed - if (toggled_button == 18 && (buttons & (1 << toggled_button))) { + // if we're deselecting non-trashed or original + if (toggled_button >= 18 && toggled_button <= 19 && (buttons & (1 << toggled_button))) { categoryButtons[0]->set_active (true); for (int i = 1; i < numButtons; i++) { @@ -1445,9 +1455,15 @@ void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick //if more than one star & color label is selected, do nothing } } - // ...or non-trashed with Control modifier - else if (toggled_button == 18 && control_down) { - bNotTrash->set_active (!bNotTrash->get_active ()); + // ...or non-trashed or original with Control modifier + else if (toggled_button >= 18 && toggled_button <= 19 && control_down) { + Gtk::ToggleButton* categoryButton = categoryButtons[toggled_button]; + categoryButton->set_active (!categoryButton->get_active ()); + + // If it was the first or last one, we reset the clear filter. + if (buttons == 1 || buttons == (1 << toggled_button)) { + bFilterClear->set_active (!categoryButton->get_active ()); + } } bool active_now, active_before; @@ -1554,30 +1570,30 @@ BrowserFilter FileCatalog::getFilter () bool anyCLabelFilterActive = bUnCLabeled->get_active () || bCLabel[0]->get_active () || bCLabel[1]->get_active () || bCLabel[2]->get_active () || bCLabel[3]->get_active () || bCLabel[4]->get_active (); bool anyEditedFilterActive = bEdited[0]->get_active() || bEdited[1]->get_active(); bool anyRecentlySavedFilterActive = bRecentlySaved[0]->get_active() || bRecentlySaved[1]->get_active(); - const bool nonTrashedActive = bNotTrash->get_active(); + const bool anySupplementaryActive = bNotTrash->get_active() || bOriginal->get_active(); /* * filter is setup in 2 steps * Step 1: handle individual filters */ - filter.showRanked[0] = bFilterClear->get_active() || bUnRanked->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showRanked[0] = bFilterClear->get_active() || bUnRanked->get_active () || bTrash->get_active () || anySupplementaryActive || anyCLabelFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive; - filter.showCLabeled[0] = bFilterClear->get_active() || bUnCLabeled->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showCLabeled[0] = bFilterClear->get_active() || bUnCLabeled->get_active () || bTrash->get_active () || anySupplementaryActive || anyRankFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive; for (int i = 1; i <= 5; i++) { - filter.showRanked[i] = bFilterClear->get_active() || bRank[i - 1]->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showRanked[i] = bFilterClear->get_active() || bRank[i - 1]->get_active () || bTrash->get_active () || anySupplementaryActive || anyCLabelFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive; - filter.showCLabeled[i] = bFilterClear->get_active() || bCLabel[i - 1]->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showCLabeled[i] = bFilterClear->get_active() || bCLabel[i - 1]->get_active () || bTrash->get_active () || anySupplementaryActive || anyRankFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive; } for (int i = 0; i < 2; i++) { - filter.showEdited[i] = bFilterClear->get_active() || bEdited[i]->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showEdited[i] = bFilterClear->get_active() || bEdited[i]->get_active () || bTrash->get_active () || anySupplementaryActive || anyRankFilterActive || anyCLabelFilterActive || anyRecentlySavedFilterActive; - filter.showRecentlySaved[i] = bFilterClear->get_active() || bRecentlySaved[i]->get_active () || bTrash->get_active () || nonTrashedActive || + filter.showRecentlySaved[i] = bFilterClear->get_active() || bRecentlySaved[i]->get_active () || bTrash->get_active () || anySupplementaryActive || anyRankFilterActive || anyCLabelFilterActive || anyEditedFilterActive; } @@ -1615,7 +1631,7 @@ BrowserFilter FileCatalog::getFilter () (anyCLabelFilterActive && anyEditedFilterActive ) || (anyCLabelFilterActive && anyRecentlySavedFilterActive ) || (anyEditedFilterActive && anyRecentlySavedFilterActive) || - (nonTrashedActive && (anyRankFilterActive || anyCLabelFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive))) { + (anySupplementaryActive && (anyRankFilterActive || anyCLabelFilterActive || anyEditedFilterActive || anyRecentlySavedFilterActive))) { filter.multiselect = true; filter.showRanked[0] = anyRankFilterActive ? bUnRanked->get_active () : true; @@ -1657,6 +1673,7 @@ BrowserFilter FileCatalog::getFilter () filter.showTrash = bTrash->get_active () || !bNotTrash->get_active (); filter.showNotTrash = !bTrash->get_active (); + filter.showOriginal = bOriginal->get_active(); if (!filterPanel) { filter.exifFilterEnabled = false; diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index 377a6b0da..eda0ff81a 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -108,9 +108,10 @@ private: Gtk::ToggleButton* bRecentlySaved[2]; Gtk::ToggleButton* bTrash; Gtk::ToggleButton* bNotTrash; - Gtk::ToggleButton* categoryButtons[19]; + Gtk::ToggleButton* bOriginal; + Gtk::ToggleButton* categoryButtons[20]; Gtk::ToggleButton* exifInfo; - sigc::connection bCateg[19]; + sigc::connection bCateg[20]; Gtk::Image* iFilterClear, *igFilterClear; Gtk::Image* iranked[5], *igranked[5], *iUnRanked, *igUnRanked; Gtk::Image* iCLabeled[5], *igCLabeled[5], *iUnCLabeled, *igUnCLabeled; From b89cd282e012ec0d82bd80e145b8db2fa32a74a3 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Fri, 13 Nov 2015 20:08:25 +0100 Subject: [PATCH 08/19] Add buttons to the file browser preferences to make the list of extensions user-sortable. --- rtdata/languages/default | 2 ++ rtgui/preferences.cc | 40 ++++++++++++++++++++++++++++++++++++++++ rtgui/preferences.h | 4 ++++ 3 files changed, 46 insertions(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index dbcb29a6a..9b23d2e3b 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1001,6 +1001,8 @@ PREFERENCES_PARSEDEXT;Parsed Extensions PREFERENCES_PARSEDEXTADD;Add extension PREFERENCES_PARSEDEXTADDHINT;Add entered extension to the list. PREFERENCES_PARSEDEXTDELHINT;Delete selected extension from the list. +PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. +PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. PREFERENCES_PREVDEMO;Preview Demosaic Method PREFERENCES_PREVDEMO_FAST;Fast PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index f6feef35f..739f833b1 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1188,12 +1188,20 @@ Gtk::Widget* Preferences::getFileBrowserPanel () hb0->pack_start (*extension); addExt = Gtk::manage( new Gtk::Button () ); delExt = Gtk::manage( new Gtk::Button () ); + moveExtUp = Gtk::manage( new Gtk::Button () ); + moveExtDown = Gtk::manage( new Gtk::Button () ); addExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTADDHINT")); delExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTDELHINT")); + moveExtUp->set_tooltip_text (M("PREFERENCES_PARSEDEXTUPHINT")); + moveExtDown->set_tooltip_text (M("PREFERENCES_PARSEDEXTDOWNHINT")); Gtk::Image* addExtImg = Gtk::manage( new RTImage ("list-add-small.png") ); Gtk::Image* delExtImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); addExt->add (*addExtImg); delExt->add (*delExtImg); + moveExtUp->set_label ("↑"); // TODO: Add arrow up image... + moveExtDown->set_label ("↓"); // TODO: Add arrow down image... + hb0->pack_end (*moveExtDown, Gtk::PACK_SHRINK, 4); + hb0->pack_end (*moveExtUp, Gtk::PACK_SHRINK, 4); hb0->pack_end (*delExt, Gtk::PACK_SHRINK, 4); hb0->pack_end (*addExt, Gtk::PACK_SHRINK, 4); extensions = Gtk::manage( new Gtk::TreeView () ); @@ -1264,6 +1272,8 @@ Gtk::Widget* Preferences::getFileBrowserPanel () addExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); delExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::delExtPressed) ); + moveExtUp->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtUpPressed) ); + moveExtDown->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtDownPressed) ); extension->signal_activate().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); clearThumbnails->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearThumbImagesPressed) ); clearProfiles->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearProfilesPressed) ); @@ -2082,6 +2092,36 @@ void Preferences::delExtPressed () extensionModel->erase (extensions->get_selection()->get_selected ()); } +void Preferences::moveExtUpPressed () +{ + const Glib::RefPtr selection = extensions->get_selection (); + if (!selection) + return; + + const Gtk::TreeModel::iterator selected = selection->get_selected (); + if (!selected || selected == extensionModel->children ().begin ()) + return; + + Gtk::TreeModel::iterator previous = selected; + --previous; + extensionModel->iter_swap (selected, previous); +} + +void Preferences::moveExtDownPressed () +{ + const Glib::RefPtr selection = extensions->get_selection (); + if (!selection) + return; + + const Gtk::TreeModel::iterator selected = selection->get_selected (); + if (!selected) + return; + + Gtk::TreeModel::iterator next = selected; + if (++next) + extensionModel->iter_swap (selected, next); +} + void Preferences::clearProfilesPressed () { diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 76abd0a19..ee885c568 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -144,6 +144,8 @@ protected: Gtk::TreeView* extensions; Gtk::Button* addExt; Gtk::Button* delExt; + Gtk::Button* moveExtUp; + Gtk::Button* moveExtDown; Gtk::CheckButton* overlayedFileNames; Gtk::CheckButton* filmStripOverlayedFileNames; Gtk::CheckButton* sameThumbSize; @@ -242,6 +244,8 @@ public: void selectStartupDir (); void addExtPressed (); void delExtPressed (); + void moveExtUpPressed (); + void moveExtDownPressed (); void darkFrameChanged (); void flatFieldChanged (); void clearProfilesPressed (); From 97814fbf6ed628566ff047e090a712c6f1be06fa Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Thu, 17 Dec 2015 19:45:13 +0100 Subject: [PATCH 09/19] Import icons provided by Beep6581 into source tree. --- .../images/Dark/actions/arrow-down-small.png | Bin 0 -> 353 bytes rtdata/images/Dark/actions/arrow-down.png | Bin 0 -> 475 bytes .../images/Dark/actions/arrow-left-small.png | Bin 0 -> 357 bytes rtdata/images/Dark/actions/arrow-left.png | Bin 0 -> 449 bytes .../images/Dark/actions/arrow-right-small.png | Bin 0 -> 359 bytes rtdata/images/Dark/actions/arrow-right.png | Bin 0 -> 443 bytes rtdata/images/Dark/actions/arrow-up-small.png | Bin 0 -> 315 bytes rtdata/images/Dark/actions/arrow-up.png | Bin 0 -> 472 bytes .../images/Dark/actions/filter-original-1.png | Bin 0 -> 519 bytes .../images/Dark/actions/filter-original-2.png | Bin 0 -> 701 bytes .../images/Light/actions/arrow-down-small.png | Bin 0 -> 381 bytes rtdata/images/Light/actions/arrow-down.png | Bin 0 -> 490 bytes .../images/Light/actions/arrow-left-small.png | Bin 0 -> 360 bytes rtdata/images/Light/actions/arrow-left.png | Bin 0 -> 447 bytes .../Light/actions/arrow-right-small.png | Bin 0 -> 365 bytes rtdata/images/Light/actions/arrow-right.png | Bin 0 -> 445 bytes .../images/Light/actions/arrow-up-small.png | Bin 0 -> 338 bytes rtdata/images/Light/actions/arrow-up.png | Bin 0 -> 468 bytes .../Light/actions/filter-original-1.png | Bin 0 -> 504 bytes .../Light/actions/filter-original-2.png | Bin 0 -> 727 bytes .../scalable/arrow-down-small.file | 1 + .../scalable/arrow-down-small.svg | 134 +++ tools/source_icons/scalable/arrow-down.file | 1 + tools/source_icons/scalable/arrow-down.svg | 134 +++ .../scalable/arrow-left-small.file | 1 + .../scalable/arrow-left-small.svg | 134 +++ tools/source_icons/scalable/arrow-left.file | 1 + tools/source_icons/scalable/arrow-left.svg | 134 +++ .../scalable/arrow-right-small.file | 1 + .../scalable/arrow-right-small.svg | 134 +++ tools/source_icons/scalable/arrow-right.file | 1 + tools/source_icons/scalable/arrow-right.svg | 134 +++ .../source_icons/scalable/arrow-up-small.file | 1 + .../source_icons/scalable/arrow-up-small.svg | 134 +++ tools/source_icons/scalable/arrow-up.file | 1 + tools/source_icons/scalable/arrow-up.svg | 134 +++ .../scalable/filter-original-1.file | 1 + .../scalable/filter-original-1.svg | 738 +++++++++++++++++ .../scalable/filter-original-2.file | 1 + .../scalable/filter-original-2.svg | 768 ++++++++++++++++++ 40 files changed, 2588 insertions(+) create mode 100644 rtdata/images/Dark/actions/arrow-down-small.png create mode 100644 rtdata/images/Dark/actions/arrow-down.png create mode 100644 rtdata/images/Dark/actions/arrow-left-small.png create mode 100644 rtdata/images/Dark/actions/arrow-left.png create mode 100644 rtdata/images/Dark/actions/arrow-right-small.png create mode 100644 rtdata/images/Dark/actions/arrow-right.png create mode 100644 rtdata/images/Dark/actions/arrow-up-small.png create mode 100644 rtdata/images/Dark/actions/arrow-up.png create mode 100644 rtdata/images/Dark/actions/filter-original-1.png create mode 100644 rtdata/images/Dark/actions/filter-original-2.png create mode 100644 rtdata/images/Light/actions/arrow-down-small.png create mode 100644 rtdata/images/Light/actions/arrow-down.png create mode 100644 rtdata/images/Light/actions/arrow-left-small.png create mode 100644 rtdata/images/Light/actions/arrow-left.png create mode 100644 rtdata/images/Light/actions/arrow-right-small.png create mode 100644 rtdata/images/Light/actions/arrow-right.png create mode 100644 rtdata/images/Light/actions/arrow-up-small.png create mode 100644 rtdata/images/Light/actions/arrow-up.png create mode 100644 rtdata/images/Light/actions/filter-original-1.png create mode 100644 rtdata/images/Light/actions/filter-original-2.png create mode 100644 tools/source_icons/scalable/arrow-down-small.file create mode 100644 tools/source_icons/scalable/arrow-down-small.svg create mode 100644 tools/source_icons/scalable/arrow-down.file create mode 100644 tools/source_icons/scalable/arrow-down.svg create mode 100644 tools/source_icons/scalable/arrow-left-small.file create mode 100644 tools/source_icons/scalable/arrow-left-small.svg create mode 100644 tools/source_icons/scalable/arrow-left.file create mode 100644 tools/source_icons/scalable/arrow-left.svg create mode 100644 tools/source_icons/scalable/arrow-right-small.file create mode 100644 tools/source_icons/scalable/arrow-right-small.svg create mode 100644 tools/source_icons/scalable/arrow-right.file create mode 100644 tools/source_icons/scalable/arrow-right.svg create mode 100644 tools/source_icons/scalable/arrow-up-small.file create mode 100644 tools/source_icons/scalable/arrow-up-small.svg create mode 100644 tools/source_icons/scalable/arrow-up.file create mode 100644 tools/source_icons/scalable/arrow-up.svg create mode 100644 tools/source_icons/scalable/filter-original-1.file create mode 100644 tools/source_icons/scalable/filter-original-1.svg create mode 100644 tools/source_icons/scalable/filter-original-2.file create mode 100644 tools/source_icons/scalable/filter-original-2.svg diff --git a/rtdata/images/Dark/actions/arrow-down-small.png b/rtdata/images/Dark/actions/arrow-down-small.png new file mode 100644 index 0000000000000000000000000000000000000000..d631a72f51f3e142be4a1baabcbaaf845eae78ef GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|-b47sn8b z-mQ}yxegf!xT>2vWxVX&^>UF&Of^G)V*Ud^mcS2e>$shkw9a$C(=kQFXl9{ylv}`` z(`O!kZ09^+pS;%h)vi8OH}AtHzWfXi7!y8DJs@Em>ZRG)xkOQr(YRheAuTD5b7Hu{ zA_j&e=D-7IM4W!?Y~1lI+BQ3P(bjo_6T2Q)teZ0HOKpA6q7K22A=6UzfnMLWZgr30 z(a*Ds-_3dc^VL+@wad5OvwE)AAt7MMbGX3u$X^L-trMHxoI8{K-nQ!f#11ppz&pnx r41F($bP0l+XkKD@2G3 literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/arrow-down.png b/rtdata/images/Dark/actions/arrow-down.png new file mode 100644 index 0000000000000000000000000000000000000000..417038d15097eb6b2746a3bf4bef67034fae02a7 GIT binary patch literal 475 zcmV<10VMv3P)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10a!^yK~y-6)sw$U13?hRzun7b3tLk}tb7BTJU}=S2&D97?6uWe z6kp>G^9CZs7f2=IpW>>Mz3k46O(GU18RQE6U}1{+e$0Hs0{=}$(^Qt_p0)NE0Ah^y zlgXsn<>_d^DW&~huXhFjRaKn;cxwgR?RLdE*D*%5AOOH>!RtE9G8J6~4k3KiTCge# zA`%f10H$f0_Q2kI5fK&7H_03;%c%zU2b`Qj)4#^dFAz96DU=iH(9{$O=92{lUD|kAcex#HxVvI{#X}MfRW6b4vJg$EY z27u9MG>2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|+h#7sn8b z-nSDrdL3~PXiG1fK2tzCut}k8-=W0$C7E9oMZ7;szIhk>=28xax5b59;X95Qg>vu| z9**$fduYS4?N_PspU)qS8UD+-gcf?9`?DqIcA2Qtj(DYl`|Z2d_0RY@ZRUE{C#jtY z;g_rHU0wKHN}kQxtn?{wZLRS!1tlq$BbN5Qm#=*PTO2tpnw=paG}Oz*yraU3d$Nip zdjog&+KusNgd~oCbapXg*l^c0AT(#zvXp1mX?AjL54XPF^>yK^$Z4MQo)^BqeDC*U w6JPn{o{bt^%T?=dIENax6#QKM*#3n2uLO_vmp?yT3G^+4r>mdKI;Vst0Lg8S;Q#;t literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/arrow-left.png b/rtdata/images/Dark/actions/arrow-left.png new file mode 100644 index 0000000000000000000000000000000000000000..a30aeadef2ea3e6c4e3dbf3058d1aa27f44cbc95 GIT binary patch literal 449 zcmV;y0Y3hTP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10X|7YK~y-6?UFr913?gmcix%Z3l?bvMFcB*5wSWeA>`~VZES5s z^e3e8Pv}1g*yl)&i(oC-TiMtNA&`T;+glrB)cAFxm3gXRmwEP`Wt5sRqcYxmYPZ{_ zY9Btk?Dcw!Ns^q_>-Cji5qs~c-|z1PL2z!2*{CX2N-24J(CKuR(lk9W#;l8oSZnj2 zh-qB3S}lZOxC>xkYdt3-0KjEgI_KOS5rK#_5fK1VN&%P*T$ZID3p7WQ^I=S~CE)*5=mQ3+LR! zM`MeK^WJAgQQSvSbTcI$)9rS*wARP9T5aB1n~z4L!zhYwzy8???`}n-(YRvfgDlG~ ropWUs;kSw7csogw2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|*`l7sn8b z-nSDK{f-6*xW515o5|bOCM3hDec&&zN#-n*h;Ik@_BlQ9yzpkxqE+u_uFBtcu#7pu z^Jw;co-Vc{?QGoYlBLG!MaBp0R|kYzO>xa;xppi1`JHFinbPdMCq20rwfpVwe?N-d z7%psk>pCsf+$DvmdKI;Vst0Men8 A!vFvP literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/arrow-right.png b/rtdata/images/Dark/actions/arrow-right.png new file mode 100644 index 0000000000000000000000000000000000000000..2f426f9f1078fb029e8ad01bb4713dce3157ffa0 GIT binary patch literal 443 zcmV;s0Yv_ZP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10XRuSK~y-6?U1ob!%!54|J-{M8!2~iQBa)Rbx*;ep?!jao0IR6 z*={1};O5rJsnn2)OC|-MK%}b(jwQLd=QwCf)M{;Yv)^)u`=9R|eqh0ZU(@MyJZ5&L z<;1LFt@UP-B!~TefBjFz0O0%nj_bOoaU8dzD4OV)OAG*>=Pmobe^9H{+TCt<R)r8Kih_v9=6OD3=JPa7FQOYXp*Xx&#<8V2rz7l*#@yd;q@+b_$r%9Qa#jfiP lvn*>jo6W0vj#}`ac>y!(mQWT@9J>Gj002ovPDHLkV1f`6!A<}G literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/arrow-up-small.png b/rtdata/images/Dark/actions/arrow-up-small.png new file mode 100644 index 0000000000000000000000000000000000000000..21f8f61eb5135f54458dc220ae6a60735b7df5b2 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|*%g7sn8b z-m{Z7avcibaV?&F-F^C^j`+t48o$JMb$0*o<~ygCpRIUd<(GP|=f{>VuH9Ptam`Md zJdcilQlYl1UMWs{xX^LlbM3T!9VfQxoc@~9`2F9rIniAw4xM>7nZ-5m&ED_P*C#J~ z=@wcZ&*{VwIY~vGLAQa=Aw5mkc)l~o&49`MA)#N_y#6J4ddH0b7Y7%kXoiMP4trCB z%|DqKcoeiG{xruWB=fqlp1J5z)4D7(?u^XdL+AG}?iDsXA(4MK7w88DPgg&ebxsLQ E0EEGLuK)l5 literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/arrow-up.png b/rtdata/images/Dark/actions/arrow-up.png new file mode 100644 index 0000000000000000000000000000000000000000..2f4a9d228668fb7f0b8351da9d680e516f69c4f9 GIT binary patch literal 472 zcmV;}0Vn>6P)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10aZyvK~y-6-IKje0znjo&)lD#wICGKXkw$r*PvAkV`B`jKzJVu zYYNLH8xmTYZ7FR@j145a0gB;Th{i&65E?znbmx9Kb8;{6Zd|B} zx!Vcc@Apqs^;$%Ph?t02M8tc4GZ+lceg!UyLen(udhZWJgg(C{Nm5nq_IkaIm2BLK z*=%-bW}~t!MIHx;7K=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10fb3JK~y-6?UFG|13?gl-|U6Gh$#{!2zElS5X&G~1};ez()c^H z@<&)$*l1yAnJ#T^@vzWF`~zYkYLFCyNsM@xy;&O-jTf>=ECgS*^Je&V7#{GiH_@a4 z-}kGIi?*RZ(@1{~}o|zAbNB{s4?RcJdZj9ND<9N;zyaC|s3z(T*A;h{d zW(xqMly?9igculOtTs-iQu>?OYPA-XQnxk$t4~IaAP9u^X4m<+aZ>5#38Eg$=md?S^B)ql)ABMQc4V zmH?2?=XosH_x&RPVCKDQwR$0hSYl?YQ}lYhO91^uFcGx?KuX!Mflbt}$4x1<0sw=- z;I>|`_k$oPL{VgQiYSV1YPDK&+?crm0GUi?6Top8hO@SDW9IR3t5hnhpKI53JHz47 zDsF{BAxvyE8Vx70@dJHq(rh*ta=F~;)WPX=`iY1Rrv?6ddIbt=lrrDaS>XTx002ov JPDHLkV1h#>)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10y;@VK~y-6wNyQC6G0H2-P=pJORSS4xv(NAp+v}nhA5JS>$GFun#-&S3r5ye!PA2W_D+Z zt_W%wAx+b30B$pLxP*GzYPC+s6SFk3QqPhkc>+L2008#h3p0y|Ff$7Po2Kd0X0!Qg zC1GPsH3$MV7!2Mx=XwC3wZ?cKfCli0h!SgUOhogA(=;_v6g8c5CqzWvd$!iTYPZ{8 zXYu#;_HF{WH@T)~5%WCXuGMOfiKwh<~qYwdjzDVW)dh+}3yhKRT%N!}9ChlRr93)|h@{j$Hm|I!#!0RUqR z0Kj`sB7#u~h?(u$+S;dC<}Nrk#@skMI{Frd;dc?~udlB|M37|}kAfozg1psgW%J52 zCERE2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|+_>7sn8b z-mMeuy^c8u9E~>;oK_s|ZQ7VUh!>#{s!i-2{Yh^wN%j1c34 zaEAALKi^}wk6<=1X6HP}w`Qwe-(k(`RtftjC9YP`e5!W-bFxxbi-0=A35nvG!(M@`eIsXON{dwKCU<0KW!*~?!3`}|3Xf#F%@K7(U20vGidBC_MRTnqP( zi>i9_`=9CQP3jEoXWneN_B{8tU5zvY!(js(ao3H{=Tzs+diG5F{w+y;=U?;BNQc&? WElD^yWg0LP7(8A5T-G@yGywoe5tIi2 literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/arrow-down.png b/rtdata/images/Light/actions/arrow-down.png new file mode 100644 index 0000000000000000000000000000000000000000..36c366bd3c930ed55c9f9317ecebc59a46bc20c7 GIT binary patch literal 490 zcmV=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10cS}>K~y-6)sw+W0#Ou(|8vLY4h|t=G#GAb;l3A$UZR(2T|Pwg z4()pdHwCROVht{|2}Bu29Ile|T)2z#fBfg?USQuunxP~~;y8}a0l*m3 z?e%))Hcv$Zu2!o@Ns`u{vkvT>>ofDSwYFugJ)!R&D2k${wYDW9PwSun z5Nui}ilP@|%ta6chs-RiGn>tZlgZ?!C<^~4aGvMBUa!9axFjNohGWRX*_s#tilXq1Mq>z| gI~WXJHJ<&`7k?79nj0p3A^-pY07*qoM6N<$f2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|;IQ7sn8b z-nSDrdL3~PaecpMx}xOe4o#+m=L|S~wEs2t)*aD{)~jot`~Q)<%Y|EIr%b{;#hskg z*rdxN3(7gS?cQFw=XCY-(~Re=)C`|@e480L?e4S6eY1ogywxj|X%7_9J!DXmar;}X z-+^t*uKnukxaPGo!s}%0^;*UsDoTni3+`(&9I*Uu%X4`3)@@%H6g($&XU>vaI_098 z0Y_8I%=I&8&Y0QRF(Z<};r{n^t5%saJk`@!xOLz6+WM7KcIC`^ws_s^>CRVs4Qm5M z9?M@kHbYyfs_0zrwOh|EWxj3ly!_?a{`1S1$samyxu!y^qX+0=22WQ%mvv4FO#l&w BmL32A literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/arrow-left.png b/rtdata/images/Light/actions/arrow-left.png new file mode 100644 index 0000000000000000000000000000000000000000..711ad1016b4735c4d693b71919e3afab98e25e42 GIT binary patch literal 447 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fEX7WqAsj$Z!;#Vf2>S zKM-czcvjvR$dD{?jVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw{mw>;fq~J+)5S5w zqWA5j-CoX)0&V60=0-*abH#Z~pQG}GNhv8kH9bA^v2e$c=Yb!1*W|L?ci3P%L#=o2 z@)M1dZKtnkRdJcbp?+iLda1OT`TrV2vkteFF38)SeTwg6e*fOMe0|@`|0- z$xKOxw1bySblnzTe7)(&s<`#;}oNxF{Ne=O&vn-|GG=G z<#RvM+#2=vO4RN3AzIewcIxy!etj?@;8pmG)Uz60ZP#w4FTJww`@UJve+G-VY74J- nU47Lm+idn#`>A<9me(-;`Vn8GX(W3Q7}yM+u6{1-oD!M2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|+(-7sn8b z-nadRUPm27T;Kmt=j36T)X>5s)}+~1Qnv14^Nm|O8N(Bv^08!pe<+u;#lUw)P>_bF zYGaDg`$*RxM~^40US2z=`abKw$nG2EH`Z+IHN5UQN#;xK|8J`s7HOQD8Wf&6OD;9? z+ojUGTRzV+d}h)2*jw?4(1|lX_o|hYm2P zn-Z8A?p4R7JeT2AtjL@al=j#nE@N%{?QOCu3>jivIou3DAH*mBwAZe+IoH4E!0sg;|yz0v=~s>~dF@NtJ&6VTTTp00i_>zopr E0MF5rjQ{`u literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/arrow-right.png b/rtdata/images/Light/actions/arrow-right.png new file mode 100644 index 0000000000000000000000000000000000000000..933e84025cd8ffbda6fd003066fc3b01abf6b12b GIT binary patch literal 445 zcmV;u0Yd(XP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10Xj)UK~y-6?U1ob!%!54|K471VhSas6orCIF3HfL`UHZrYr)O; zaTGxZH($Wj&0WDwNZa5pQo$jnaPB!SMk=M&YB&3B2mbRN&JV0v^Jlu>D*4q9&M}1jo6h)Eec?ZTAqqW`*!>|{I;lp@5ex1&J zb`{6*QM=vVt7Z||VCEV#GXQbUiHHa@*L~mL1OOsp=bW2NCU4AqIUEkJ05AaPN@R@L zYPDLu>8s4lM8p+D#6;voM4WS6<&;vMh#XpLA4j9n{TDG2-DFvoFRDT*6*U@-zSdfO zd?rM6$IPdBo`l n#xX;ZB%L%(_g5lY^Urt(7ax<&*{b^b00000NkvXXu0mjf6C=Bo literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/arrow-up-small.png b/rtdata/images/Light/actions/arrow-up-small.png new file mode 100644 index 0000000000000000000000000000000000000000..9b8884c5e0d3a95b023540860e4b77b2d1cba5b5 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2>S zOAux}KILpRkRe&(8c`CQpH@mmtT}V`<;yxP|j2zDoDqfhgf~!#_lXcTg*N3}yGaa66 ztbhLxQ~laitIA4a^ONPcRA()VtbDJ}kTGjn^8N4YE#=!8&h4DMN-wnZ;F;$W{GTwa96(^b literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/arrow-up.png b/rtdata/images/Light/actions/arrow-up.png new file mode 100644 index 0000000000000000000000000000000000000000..df6b022a3b543747551dbaf9ced99ecdcf4acef2 GIT binary patch literal 468 zcmV;_0W1EAP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10Z~arK~y-6-IGm913?glt6ud_Hen!}xKY70Gl5yoIn=#qt`NL} zC-DUCJwbM^vh@HmGB5)Yl3}J@Xdr>abZ|EMprN7aeO0`siT85EO`u+Y10Ny;t7**GGJRA<6^E_{M z`PDvfS(ax2W<^oVy!TNQMOSUxQdLz?06vI_>bgE9qSsx1-kZaQMx)W`U@&+jB3djK zH}m=Y?T}~h##_^wy@FaXcYU}oR8ZFgWIA`xNlJ#`9ZW)I+~D1yE;052lU z%t6p#@LJ5wp-}{HyuNoD1vC4@UE2zJywz&eR8^G|(a{6`jy?fX&}x<8Hqhb#0000< KMNUMnLSTaEz{R%! literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/filter-original-1.png b/rtdata/images/Light/actions/filter-original-1.png new file mode 100644 index 0000000000000000000000000000000000000000..2daef11fbc1548b6be2ec88e4170164bffa5560f GIT binary patch literal 504 zcmV=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10d+}4K~y-6?UKJr13?gnf3tIN5lI3{5bR9$%poa7@CkeYpF=Aj z!otEv3p-06!9uW51UX2VKL*4|LJC31DJI7S{nFm&@H%tJP=U_gAARnwU!>pU>Y1 zLGYR=X67RR2*Yp>z@^rD&KP4Q4#SXBH*PkY8>4rnR97h_Y{Z#NW{@f#hlt*U5L06b z0EI$9r;4SNrvPA#Ic&9Bfe>QF_A9#GZUaC+QOwNe0HBoW*~q5y>v5A(t^oiux9jzK zzf>woX0}bmL#NY8jvEo3#m5~07tB1bl(G_Mv)OOsRvEnyhr^!hx>j*>9A}W$AD0??g2ZdVz0000=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10#r#vK~y-6wUobZ6G0HhXVyMlE_cWx7nDe`(WMBK2u0A)1R+H! zprJyd<{fwx8Y*6ahJuj^Pe0Ah?kvC! z36}+uBw6!3?*TJ=OQM}ttJS$!l$U{{D0&me@hcG#W)=}q5n<98Rt1l7p4gi3v7R9brA=vkQER{-2FLnws^O#Gm zI669dG#Cs9XJ=>mjQ#iJ!c4{c`}^L;#>T@+rBayLy3000pSTk|jaZ=h?z zh&b)1h!pz&1ZL*BfQW#q8X{U>1VO~$s<(9V06=};FUN8GE{@}znMGBVh-5O#AR++( z==u5i^kkR7SB|Uz0K?(%bGO^Qud1cVKOw5B6R7B)>FF6`zI8gC?n)I0K~NiwMqjcl zd%Gy(d0y}2MMTQXiik=?fQZV>;+z8_vejy}QLoqM7<1q#itZjB9{$X-EJeg$zVEBG zR8JX#4#> zjYcEO%q~sS769}Li4$G=1d=3Kn>?L`GRA1T-Od0&uFKt+egmtzS*k03#e4t&002ov JPDHLkV1irIJZ1m@ literal 0 HcmV?d00001 diff --git a/tools/source_icons/scalable/arrow-down-small.file b/tools/source_icons/scalable/arrow-down-small.file new file mode 100644 index 000000000..df0b971b0 --- /dev/null +++ b/tools/source_icons/scalable/arrow-down-small.file @@ -0,0 +1 @@ +arrow-down-small.png,w16,actions diff --git a/tools/source_icons/scalable/arrow-down-small.svg b/tools/source_icons/scalable/arrow-down-small.svg new file mode 100644 index 000000000..7042bdabd --- /dev/null +++ b/tools/source_icons/scalable/arrow-down-small.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-down.file b/tools/source_icons/scalable/arrow-down.file new file mode 100644 index 000000000..67ebd1f45 --- /dev/null +++ b/tools/source_icons/scalable/arrow-down.file @@ -0,0 +1 @@ +arrow-down.png,w22,actions diff --git a/tools/source_icons/scalable/arrow-down.svg b/tools/source_icons/scalable/arrow-down.svg new file mode 100644 index 000000000..7042bdabd --- /dev/null +++ b/tools/source_icons/scalable/arrow-down.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-left-small.file b/tools/source_icons/scalable/arrow-left-small.file new file mode 100644 index 000000000..fcf5e7094 --- /dev/null +++ b/tools/source_icons/scalable/arrow-left-small.file @@ -0,0 +1 @@ +arrow-left-small.png,w16,actions diff --git a/tools/source_icons/scalable/arrow-left-small.svg b/tools/source_icons/scalable/arrow-left-small.svg new file mode 100644 index 000000000..c0ecb3b13 --- /dev/null +++ b/tools/source_icons/scalable/arrow-left-small.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-left.file b/tools/source_icons/scalable/arrow-left.file new file mode 100644 index 000000000..4ed6a9390 --- /dev/null +++ b/tools/source_icons/scalable/arrow-left.file @@ -0,0 +1 @@ +arrow-left.png,w22,actions diff --git a/tools/source_icons/scalable/arrow-left.svg b/tools/source_icons/scalable/arrow-left.svg new file mode 100644 index 000000000..c0ecb3b13 --- /dev/null +++ b/tools/source_icons/scalable/arrow-left.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-right-small.file b/tools/source_icons/scalable/arrow-right-small.file new file mode 100644 index 000000000..bc480df22 --- /dev/null +++ b/tools/source_icons/scalable/arrow-right-small.file @@ -0,0 +1 @@ +arrow-right-small.png,w16,actions diff --git a/tools/source_icons/scalable/arrow-right-small.svg b/tools/source_icons/scalable/arrow-right-small.svg new file mode 100644 index 000000000..8d1c4694c --- /dev/null +++ b/tools/source_icons/scalable/arrow-right-small.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-right.file b/tools/source_icons/scalable/arrow-right.file new file mode 100644 index 000000000..7040fee0a --- /dev/null +++ b/tools/source_icons/scalable/arrow-right.file @@ -0,0 +1 @@ +arrow-right.png,w22,actions diff --git a/tools/source_icons/scalable/arrow-right.svg b/tools/source_icons/scalable/arrow-right.svg new file mode 100644 index 000000000..8d1c4694c --- /dev/null +++ b/tools/source_icons/scalable/arrow-right.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-up-small.file b/tools/source_icons/scalable/arrow-up-small.file new file mode 100644 index 000000000..e20834553 --- /dev/null +++ b/tools/source_icons/scalable/arrow-up-small.file @@ -0,0 +1 @@ +arrow-up-small.png,w16,actions diff --git a/tools/source_icons/scalable/arrow-up-small.svg b/tools/source_icons/scalable/arrow-up-small.svg new file mode 100644 index 000000000..cb6379f6b --- /dev/null +++ b/tools/source_icons/scalable/arrow-up-small.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/arrow-up.file b/tools/source_icons/scalable/arrow-up.file new file mode 100644 index 000000000..187c9e710 --- /dev/null +++ b/tools/source_icons/scalable/arrow-up.file @@ -0,0 +1 @@ +arrow-up.png,w22,actions diff --git a/tools/source_icons/scalable/arrow-up.svg b/tools/source_icons/scalable/arrow-up.svg new file mode 100644 index 000000000..cb6379f6b --- /dev/null +++ b/tools/source_icons/scalable/arrow-up.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/filter-original-1.file b/tools/source_icons/scalable/filter-original-1.file new file mode 100644 index 000000000..8f2876c7b --- /dev/null +++ b/tools/source_icons/scalable/filter-original-1.file @@ -0,0 +1 @@ +filter-original-1.png,w22,actions diff --git a/tools/source_icons/scalable/filter-original-1.svg b/tools/source_icons/scalable/filter-original-1.svg new file mode 100644 index 000000000..4295c2fdb --- /dev/null +++ b/tools/source_icons/scalable/filter-original-1.svg @@ -0,0 +1,738 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/filter-original-2.file b/tools/source_icons/scalable/filter-original-2.file new file mode 100644 index 000000000..d2e205806 --- /dev/null +++ b/tools/source_icons/scalable/filter-original-2.file @@ -0,0 +1 @@ +filter-original-2.png,w22,actions diff --git a/tools/source_icons/scalable/filter-original-2.svg b/tools/source_icons/scalable/filter-original-2.svg new file mode 100644 index 000000000..e1c436ac0 --- /dev/null +++ b/tools/source_icons/scalable/filter-original-2.svg @@ -0,0 +1,768 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + From 1b4fd2dcb5e1a56c0f17390a741e9be4137937a5 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Thu, 17 Dec 2015 20:01:40 +0100 Subject: [PATCH 10/19] Use the provided images for the filter-original button and the parsed extensions list and extend the filer-original tool tip. --- rtdata/languages/default | 2 +- rtgui/filecatalog.cc | 5 ++++- rtgui/filecatalog.h | 2 +- rtgui/preferences.cc | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 9b23d2e3b..48acb81f9 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -171,7 +171,7 @@ FILEBROWSER_SHOWEDITEDHINT;Show edited images.\nShortcut: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Show not edited images.\nShortcut: 6 FILEBROWSER_SHOWEXIFINFO;Show Exif info.\n\nShortcuts:\ni - Multiple Editor Tabs Mode,\nAlt-i - Single Editor Tab Mode. FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. -FILEBROWSER_SHOWORIGINALHINT;Show only the original images. +FILEBROWSER_SHOWORIGINALHINT;Show only the original images.\n\nThe orignal images are determined by the position of their file extensions in the parsed extensions list in the preferences. Extensions higher up in that list are considered the originals of those below. FILEBROWSER_SHOWRANK1HINT;Show images ranked as 1-star.\nShortcut: 1 FILEBROWSER_SHOWRANK2HINT;Show images ranked as 2-star.\nShortcut: 2 FILEBROWSER_SHOWRANK3HINT;Show images ranked as 3-star.\nShortcut: 3 diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 92ce120c2..3ea7e6db2 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -286,6 +286,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : bTrash->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false); iNotTrash = new RTImage("trash-hide-deleted.png") ; + iOriginal = new RTImage("filter-original-2.png"); bNotTrash = Gtk::manage( new Gtk::ToggleButton () ); bNotTrash->set_image (*iNotTrash); @@ -295,7 +296,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : bNotTrash->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false); bOriginal = Gtk::manage( new Gtk::ToggleButton () ); - bOriginal->set_label ("O"); // TODO: Add icon... + bOriginal->set_image (*iOriginal); bOriginal->set_tooltip_markup (M("FILEBROWSER_SHOWORIGINALHINT")); bOriginal->set_relief (Gtk::RELIEF_NONE); bCateg[19] = bOriginal->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bOriginal, true)); @@ -450,6 +451,8 @@ FileCatalog::~FileCatalog() delete igUnCLabeled; delete iTrashEmpty; delete iTrashFull; + delete iNotTrash; + delete iOriginal; delete iRefreshWhite; delete iRefreshRed; delete iQueryClear; diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index eda0ff81a..b30ebb553 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -118,7 +118,7 @@ private: Gtk::Image* iEdited[2], *igEdited[2]; Gtk::Image* iRecentlySaved[2], *igRecentlySaved[2]; Gtk::Image *iTrashEmpty, *iTrashFull; - Gtk::Image *iNotTrash; + Gtk::Image *iNotTrash, *iOriginal; Gtk::Image *iRefreshWhite, *iRefreshRed; Gtk::Image *iLeftPanel_1_Show, *iLeftPanel_1_Hide, *iRightPanel_1_Show, *iRightPanel_1_Hide; Gtk::Image *iQueryClear; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 739f833b1..dca0eff17 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1196,10 +1196,12 @@ Gtk::Widget* Preferences::getFileBrowserPanel () moveExtDown->set_tooltip_text (M("PREFERENCES_PARSEDEXTDOWNHINT")); Gtk::Image* addExtImg = Gtk::manage( new RTImage ("list-add-small.png") ); Gtk::Image* delExtImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); + Gtk::Image* moveExtUpImg = Gtk::manage( new RTImage ("arrow-up-small.png") ); + Gtk::Image* moveExtDownImg = Gtk::manage( new RTImage ("arrow-down-small.png") ); addExt->add (*addExtImg); delExt->add (*delExtImg); - moveExtUp->set_label ("↑"); // TODO: Add arrow up image... - moveExtDown->set_label ("↓"); // TODO: Add arrow down image... + moveExtUp->set_image (*moveExtUpImg); + moveExtDown->set_image (*moveExtDownImg); hb0->pack_end (*moveExtDown, Gtk::PACK_SHRINK, 4); hb0->pack_end (*moveExtUp, Gtk::PACK_SHRINK, 4); hb0->pack_end (*delExt, Gtk::PACK_SHRINK, 4); From 1ef2229ba43338a53d049d893b6a009635332e28 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sat, 19 Dec 2015 09:18:18 +0100 Subject: [PATCH 11/19] Close #3025 by fixing the fully defining the original selection function. --- rtgui/filebrowser.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 7d921b328..8bb1d69bb 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -67,17 +67,19 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) ThumbBrowserEntryBase* selectOriginalEntry (ThumbBrowserEntryBase* original, ThumbBrowserEntryBase* candidate) { + if (original == NULL) { + return candidate; + } + // The candidate will become the new original, if it has an original extension // and if its extension is higher in the list than the old original. if (const Glib::ustring* candidateExtension = getOriginalExtension (candidate)) { - if (original == NULL) { - return candidate; - } else if (const Glib::ustring* originalExtension = getOriginalExtension (original)) { + if (const Glib::ustring* originalExtension = getOriginalExtension (original)) { return candidateExtension < originalExtension ? candidate : original; } - } else { - return original; } + + return original; } void findOriginalEntries (const std::vector& entries) From c09a00bf16cbb29cb7fc3dccd4d5a76f7d580a68 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sat, 19 Dec 2015 09:39:54 +0100 Subject: [PATCH 12/19] Expose force the old C++ ABI as a build time flag. --- CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 615348484..4724c4001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,14 +13,9 @@ endif () string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE) -# assuming that Linux and Apple users will have gtk2 built by their installed gcc -if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0) - message(STATUS "Gcc Version >= 5.0 ; adding -D_GLIBCXX_USE_CXX11_ABI=0 to build with Gtk2") - add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0) - # see here : https://gcc.gnu.org/gcc-5/changes.html#libstdcxx - endif() +# We might want to build using the old C++ ABI, even when using a new GCC version +if (USE_OLD_CXX_ABI) + add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0) endif() if (UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") From 0a56ba6e87fd57f2239f220ae14ba1fa158a2559 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 19 Dec 2015 18:12:05 +0100 Subject: [PATCH 13/19] Delete COMPILE.txt Deleted COMPILE.txt, refer to: http://rawpedia.rawtherapee.com/Linux http://rawpedia.rawtherapee.com/Windows http://rawpedia.rawtherapee.com/OS_X --- COMPILE.txt | 516 ---------------------------------------------------- 1 file changed, 516 deletions(-) delete mode 100644 COMPILE.txt diff --git a/COMPILE.txt b/COMPILE.txt deleted file mode 100644 index 9b16c1f79..000000000 --- a/COMPILE.txt +++ /dev/null @@ -1,516 +0,0 @@ -If you have problems with the compilation, please ask on the appropriate -RawTherapee forum: http://www.rawtherapee.com/forum/viewforum.php?f=10 - -PREAMBLE --------- - - Some commands span multiple lines, each line of such a command except for the - last one will end in a backslash character, "\". - When copying code, be sure to copy all lines from the first one that ends in \ - till the last line that does not end in a \ character. - - Some parts of code contain . Replace these with whatever - value is needed, e.g. - - CMake is actually used to create the makefiles (scripts that handle the build - process) or specific Integrated Developement Environement (IDE) projects. It - is designed to find all necessary compilation flags for your specific machine, - but everything can be overriden. - - RawTherapee's build mechanism will generate a build information file, named - "AboutThisBuild.txt", and require some parameters that can't be set by CMake, - so it's done in our build script, and may be overridden at your own will. The - build process also enables some sort of cross-compiling, since you can only - choose a specific processor variation of the same type (e.g. core2, athlon64, - which are both an x86 architecture). Real cross-compiling (e.g. building the - Windows version on a Linux platform) has not been tested. - - By default, no processor is specified, so CMake/GCC will build RT for your - machine's processor. You can specify that the build is to be made for a - generic processor by using the -DPROC_TARGET_NUMBER="1" CMake option. - Developers who are providing builds for download from the RawTherapee website - have to set the processor label (a human-readable description of the - processor, set to "undefined" by default) manually with the -DPROC_LABEL="foo" - CMake parameter. - - Note for developers that handle an automated build system: Mercurial is - required in order to produce the build information file, but your build system - will certainly only use the source code without any access to a Mercurial - repository. To generate the needed information, run the script: - ./tools/generateReleaseInfo - After that, you can delete .hg* (the example below uses "-X *.hg*" to exclude - those files and folders instead of deleting them - the end result is the same) - and continue with the normal compile instructions without the need for - mercurial. - - In short, once you cd into your clone of the RawTherapee source code - repository, using version "4.1" as an example: - 1. Check out the desired hg tag: hg update "4.1" - 2. Run tools/generateReleaseInfo to generate ReleaseInfo.cmake: - ./tools/generateReleaseInfo - 3. The repository is now ready to be made into a public tarball: - ./tools/generateSourceTarball - - The build system especially encourages to perform out-of-source builds. This - means that the CMake project is generated in a folder which is not in the - source tree of RawTherapee. This way the source tree stays clean all the time - and multiple different compilation settings can be maintained in parallel - using different binary folders. Further information about out-of-source builds - can be found here: - http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F - - If an in-source build is performed, the CMake logic now warns about this but - does not fail. Especially important for clean out-of-source builds is that the - CMake code does not generate files inside the source tree, e.g. when using - configure_file. Please keep this in mind when altering the CMake files. - - -DEPENDENCIES ------------- - - PACKAGE URL - BZIP2 bzip2>-1.0.4 http://www.bzip.org/ - EXIV2 exiv2>=0.19 http://www.exiv2.org/ - EXPAT expat>=2.1.0 http://expat.sourceforge.net/ - FFTW fftw>=3.2.2 http://fftw.org/ - GCC gcc>=4.7 http://gcc.gnu.org/ - GLIB2 glib-2.0>=2.24 http://www.gtk.org/ - GLIBMM glibmm-2.4>=2.24 http://www.gtkmm.org - GTK+ gtk+-2.0>=2.24.18 http://www.gtk.org/ - GTK2-Engines gtk-engines-2.20.2 http://www.gtk.org/ - GTKMM gtkmm-2.4>=2.22 http://www.gtkmm.org - JPEG libjpeg>=6b http://libjpeg-turbo.virtualgl.org/ - http://jpegclub.org/ - http://www.ijg.org/ - LCMS2 lcms>=2.0a http://www.littlecms.com/ - LIBCANBERRA libcanberra-gtk http://0pointer.de/lennart/projects/libcanberra/ (Linux only) - LIBIPTCDATA libiptcdata>=1.0.2 http://libiptcdata.sourceforge.net - PNG libpng>=1.2.44 http://www.libpng.org/ - SIGC sigc++-2.0 http://libsigc.sourceforge.net/ - TIFF libtiff>=3.9.4 http://www.remotesensing.org/libtiff/ - ZLIB zlib>=1.2.3 http://www.zlib.net/ - - -WINDOWS -------- - - OPTIONAL - - - TortoiseHG - You can make your life a little easier by using a graphical client for - working with Mercurial. One such free and open-soure cross-platform - client is TortoiseHG, you can get it bundled with Mercurial from: - http://tortoisehg.bitbucket.org/ - - - Weird compressed archive formats? - You might need to unpack archives in formats which Windows does not - handle by default. That's no problem, there are a few free programs out - there which handle many more formats than Windows does, and faster too. - We recommend: - http://www.7-zip.org/ - http://peazip.sourceforge.net/ - - - THE TOOLCHAIN - - This document assumes that you install MinGW, CMake and gtkmm respectively - to "C:\MinGW64" (or "C:\MinGW32" for 32-bit), "C:\CMake", and "C:\gtkmm64" (or - "C:\gtkmm" for 32-bit). - These packages must be installed in paths that DO NOT CONTAIN SPACES. - - INSTALL THE TOOLCHAIN - - TDM-GCC On-Demand Installer - http://tdm-gcc.tdragon.net/download - GCC 4.9 is recommended for Win64 builds, as under some conditions older - versions of GCC can cause artifacts. - Download the "tdm-gcc-webdl" option. Run it, select "Create a new - TDM-GCC installation" and choose the appropriate option for your - machine: "MinGW/TDM (32-bit)" if you use a 32-bit machine, or - "MinGW-w64/TDM64 Experimental (32-bit and 64-bit)" if you use a 64-bit - machine. Even though the 64-bit version contains a 32-bit version too, - we had no luck making 32-bit RT builds using it at the time of writing. - Be sure to install with OpenMP support (Components > gcc > openmp). - - - CMake - http://www.cmake.org/cmake/resources/software.html - Use "Windows (Win32 Installer)", the newest version. - - - >=GTK+ 2.24.18 - http://hexchat.github.io/gtk-win32/ - - - gtkmm-2.24 - http://sourceforge.net/projects/gtk-mingw/files/gtkmm2/ - - - INSTALL THE DEPENDENCIES - - RawTherapee depends on additional build-time libraries. There are two ways - you can get these libraries: - - The easy way, you can use the pre-compiled ones available from: - http://www.rawtherapee.com/releases_head/windows/dependencies_for_creating_builds/ - Just unzip them to the base installation dir of MinGW, which should be - C:\MinGW64 if you followed the instructions to the letter. - - Note that this archive might not contain all of the required - libraries. If compilation fails due to missing libraries, then see the - dependency list at the beginning of this document, find the missing - ones, and see below for instructions on where to download them from - and how to install them. Please notify us so that we may update the - archive. - - - The hard way, you will need to download the source code for each and - compile each yourself. See further below for instructions. - - - SET UP THE TOOLCHAIN ENVIRONMENT VARIABLES - - The toolchain installers should have set up some environment variables - for you automatically, but some will be missing. Fire up: - System Properties > Advanced > Environment Variables - - Make sure you have the relevant ones, and that they point to the correct - places: - GTKMM_BASEPATH = "C:\gtkmm" - GTKMM64_BASEPATH = "C:\gtkmm64" - MINGW_BASEPATH = "C:\MinGW64" - PKG_CONFIG_PATH = "C:\MinGW64\lib\pkgconfig;c:\gtkmm64\lib\pkgconfig" - and that PATH contains "C:\gtkmm64\bin;C:\MinGW64\bin;C:\CMake\bin;" - (or the 32-bit counteparts) - - Restart your console to be sure the changes took effect. - - - COMPILE - - Clone or update the RawTherapee repository - You can use TortoiseHG to clone and update the repository, or you can - do it from the command line: - hg clone https://rawtherapee.googlecode.com/hg/ "C:\rtrepo" - If you have already cloned it before, update it: - cd C:\rtrepo - hg pull - hg update -C default - - - Tailor the buildRT.bat batch file to your needs - Copy C:\rtrepo\tools\buildRT.bat to C:\buildRT.bat so that you can make - changes to it and not lose them when you update the repository. - - Edit C:\buildRT.bat and customize as follows: - - If you are building RT for yourself, use - "-DPROC_TARGET_NUMBER:STRING=2" - - If you are building RT to be distributed to other people, use - "-DPROC_TARGET_NUMBER:STRING=1" - - If you want to upload a build, you should set some additional - information about your processor. There are two possibilities: - 1. You pick up a target processor from "ProcessorTargets.cmake". - All you have to do is set the PROC_TARGET_NUMBER parameter - to the desired target number. If you choose the "native" - solution, you have to set the processor label manually - by setting the PROC_LABEL parameter. Please provide a short name, - like "core i5" or "athlon64". Processor frequency is of no use. - 2. You don't need specific processor flags, so you'll let - PROC_TARGET_NUMBER default to 0, but you have to set the - PROC_LABEL parameter. Please provide a short name, like "core i5" - or "athlon64". Specifying the processor frequency is of no use. - - - Run buildRT.bat to compile RawTherapee - C:\buildRT.bat - - - DEPENDENCIES - THE HARD WAY - - The MSYS package is required to build the libraries. Before building them, - check if they are already installed in your gtkmm and MinGW directories. - There shouldn't be two versions of the same library in different places. - - Open an MSYS console, that will create a Linux environment, and compile - the dependencies in the following order: - zlib: - If you have gtkmm-2.22 installed, you should skip this zlib section. - - Download: http://zlib.net/ - - How to build: - cd to the directory you unpacked zlib-1.2.5 to, - make -f win32/Makefile.gcc - - Then, manually copy the files as follows (tip: you can individually - copy the lines below and paste them in MSYS' prompt with the middle - mouse button): - cp -iv zlib1.dll /mingw/bin - cp -iv zconf.h zlib.h /mingw/include - cp -iv libz.a /mingw/lib - cp -iv libzdll.a /mingw/lib/libz.dll.a - - libpng: - If you have gtkmm-2.22 installed, you should skip this libpng section. - - Download: http://sourceforge.net/projects/libpng/files/ - - How to build: - cd to the directory you unpacked lpng144 to. - There are two methods of building libpng: - 1. gtkmm doesn't provide zlib so compile it yourself: - cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/mingw -DCMAKE_BUILD_TYPE:STRING=Release - 2. gtkmm provides zlib so you can reuse it (assuming that you - hadn't compiled zlib as explained above): - cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/mingw -DCMAKE_PREFIX_PATH:PATH=C:/gtkmm -DCMAKE_BUILD_TYPE:STRING=Release - - Then build and install: - make - make install - - libjpeg: - - Download: http://www.ijg.org/ - - How to build: - cd to the directory you unpacked jpeg-8b to. - ./configure --prefix=/mingw - Copy jconfig.txt to jconfig.h (overwrite the existing file). - make - make install - - libtiff: - - Download: ftp://ftp.remotesensing.org/pub/libtiff/ - - How to build: - In the configure process below, set the zlib include and lib path to - the right folder. We're assuming that you're using the one provided - in the gtkmm bundle. - ./configure --prefix=/mingw --with-zlib-include-dir=/c/gtkmm/include --with-zlib-lib-dir=/c/gtkmm/lib - make - cd libtiff - make install - - libiptcdata: - - Download: http://libiptcdata.sourceforge.net/ - - How to build: - ./configure --prefix=/mingw - - Edit the "Makefile" file from the root dir of libiptcdata and - search for "DIST_SUBDIRS =" and "SUBDIRS =". You should only find - one line for each search. From these lines, remove "iptc", then: - make - make install - - LCMS: - - Download LCMS2 - http://sourceforge.net/projects/lcms/files/ - - How to build: - ./configure --prefix=/mingw - make - make install - - Expat: - - Download: http://expat.sourceforge.net/ - - Install - - FFTW: - - Instructions: http://www.fftw.org/install/windows.html - - Specific instructions more suitable for RawTherapee purposes: - 1. Download the official FFTW-64 DLL package from - http://www.fftw.org/download.html - Unpack it to C:\fftw3\ - 2. Start MSYS console and go to your FFTW3 directory - cd /c/fftw3 - 2. In MSYS console, execute: - dlltool --def libfftw3f-3.def --dllname libfftw3f-3.dll --output-lib libfftw3f-3.a - dlltool --def libfftw3l-3.def --dllname libfftw3l-3.dll --output-lib libfftw3l-3.a - dlltool --def libfftw3-3.def --dllname libfftw3-3.dll --output-lib libfftw3-3.a - 3. Copy files: - cp libfftw3f-3.dll /c/MinGW64/bin - cp libfftw3l-3.dll /c/MinGW64/bin - cp libfftw3-3.dll /c/MinGW64/bin - cp libfftw3f-3.a /c/MinGW64/lib - cp fftw3.h /c/MinGW64/include - 4. Create a new text file MinGW64/lib/pkgconfig/fftw3f.pc with the - following contents: - prefix=/mingw64 - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include - Name: fftw3f - Description: FFTW3 Float - Version: 3.3 - Libs: -L${libdir} -lfftw3f-3 -lm - Cflags: -I${includedir} - - - IMPORTANT - - Make sure that the lcms.pc and libiptcdata.pc files located in the - pkgconfig dir have the first line like this: - prefix=/mingw - - If everything has been installed correctly, you should see lines like - the following when running the cmake command (see "COMPILE" below): - -- checking for module 'libiptcdata' - -- found libiptcdata, version 1.0.4 - -- checking for module 'lcms2' - -- found lcms2, version 2.3 - -- Found JPEG: C:/mingw/lib/libjpeg.dll.a - -- Found ZLIB: C:/gtkmm/lib/libz.dll.a - -- Found PNG: C:/gtkmm/lib/libpng.lib - -- Found TIFF: C:/mingw/lib/libtiff.dll.a - - -LINUX ------ - - DEPENDENCIES - - See the list of dependencies at the beginning of this document. - - In Arch, run: - sudo pacman -S bzip2 exiv2 expat fftw glib2 glibmm gtk gtkmm lcms2 \ - libcanberra libiptcdata libjpeg-turbo libpng libsigc++ libtiff zlib - - In Fedora, run: - sudo yum install bzip2-devel cmake exiv2-devel expat-devel fftw-devel \ - gcc-c++ glib2-devel glibmm24-devel gtk+-devel gtk2-engines gtkmm24-devel \ - lcms2-devel libcanberra-devel libiptcdata-devel libjpeg-turbo-devel \ - libpng-devel libsigc++20-devel libtiff-devel zlib-devel - - In Gentoo, run: - sudo emerge -uva app-arch/bzip2 dev-cpp/glibmm dev-cpp/gtkmm \ - dev-libs/expat dev-libs/glib dev-libs/libsigc++ dev-vcs/mercurial \ - media-gfx/exiv2 media-libs/lcms media-libs/libcanberra \ - media-libs/libiptcdata media-libs/libjpeg-turbo media-libs/libpng \ - media-libs/tiff net-misc/curl sci-libs/fftw sys-libs/zlib x11-libs/gtk+ \ - x11-themes/gtk-engines - - In openSUSE, run: - sudo zypper in cmake fftw3-devel gcc-c++ glib2-devel glibmm2-devel \ - gtk2-devel gtkmm2-devel libbz2-devel libcanberra-devel libexpat-devel \ - libiptcdata-devel libjpeg-devel liblcms2-devel libpng-devel \ - libsigc++2-devel libtiff-devel zlib-devel - - In Ubuntu/Debian the requirements can be installed by running: - sudo apt-get update && sudo apt-get install build-essential cmake curl \ - libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev \ - libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev \ - libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff4-dev \ - mercurial zlib1g-dev - - - COMPILE - - The Automatic Way: - The easiest way compile RawTherapee is by using the buildRT script, read - all about it in the forum: - http://rawtherapee.com/forum/viewtopic.php?p=22213#p22213 - - The Manual Way: - - Create and enter a new empty folder outside RawTherapee's source - directory: - mkdir ~/rt-build - cd ~/rt-build - - Type: - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release \ - -DBINDIR=. -DDATADIR=. -DLIBDIR=. - Developers who want to provide a public build have to set the PROC_LABEL - to their processor name, e.g.: - cmake -DPROC_LABEL:STRING=athlon64 -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. \ - - - Type: - make install - - You'll find the compiled program in the subdirectory named like the - value of CMAKE_BUILD_TYPE ("Release" in this example). You can copy it - anywhere you want. By changing the cmake flags, you can change where - the release will compile to. By removing all flags it should go to the - standard system install location. - - You're done. - - - Using Eclipse under Linux: - - Eclipse mercurial plugin: Click "Help > Install New Software". - The Eclipse Update Site for MercurialEclipse is available at this URL: - http://cbes.javaforge.com/update - - Import the RawTherapee Mercurial repository: - "File > new > other > mercurial > Clone existing repository" - Enter this URL: - https://rawtherapee.googlecode.com/hg - - Create and enter a new empty folder outside RawTherapee's source directory. - Configure the source for Eclipse with: - cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. -DCMAKE_BUILD_TYPE=Release - - If you want to upload a build, you should set some additional information - about your processor. There are two possibilities: - 1. You pick up a target processor from "ProcessorTargets.cmake". All you - have to do is set "-D PROC_TARGET_NUMBER:STRING=number" in cmake's - command line to the desired target number. If you choose the 'native' - solution, you have to set the processor label manually by setting "-D - PROC_LABEL:STRING=procLabel" in cmake's command line. Please provide a - short name, like "core i5" or "athlon64" (without double quotes). - Processor frequency is of no use. - 2. You don't need specific processor flags, so you'll let - PROC_TARGET_NUMBER default to 0, but you still have to set the - PROC_LABEL parameter (see point 1 righ above). - - Eclipse does not do 'make install', but only 'make all'. - There are two ways to compile: - 1. type 'make install' in the console or, - 2. in "Project > properties > C/C++ Make Project > Build (incremental - build)" change 'all' to 'install'. - -OS X ----- - - REQUIREMENTS - - - XCode Development Tools (you only need a subset of these, but it is - probably easier to just install all of them) - - MacPorts - - Add following line to /opt/local/etc/macports/variants.conf: - +no_gnome +no_x11 +quartz -x11 - - To install the dependencies, run: - sudo port install cairo pango gdk-pixbuf2 gtk2 libsigcxx2 gtk-osx-application-gtk2 gtkmm - - To install other dependencies and tools. - sudo port install gtk-engines2 lcms2 libiptcdata fftw-3-single cmake - - Install compiler, either - sudo port install gcc47 - or - Clang with OpenMP by follow instructions at https://clang-omp.github.io/ - - If you don't already have Git installed, run: - sudo port install git - - - COMPILE - - - Make build directory. - mkdir build - cd build - - To enable OpenMP, for gcc47, type: - cmake -D CMAKE_C_COMPILER=gcc-mp-4.7 -D CMAKE_CXX_COMPILER=g++-mp-4.7 \ - - - or if using Clang with OpenMP - cmake -v -D CMAKE_BUILD_TYPE=Release \ - -DPROC_TARGET_NUMBER="1" \ - -DBUILD_BUNDLE="ON" \ - -DBINDIR="." \ - -DDATADIR="." \ - -DCACHE_NAME_SUFFIX=4 \ - -DCMAKE_C_COMPILER="/tmp/clang/build_llvm/bin/clang" \ - -DCMAKE_CXX_COMPILER="/tmp/clang/build_llvm/bin/clang++" \ - -DCMAKE_C_FLAGS="-I/opt/local/include/libomp" \ - -DCMAKE_CXX_FLAGS="-I/opt/local/include/libomp" \ - - - If you want to upload a build, you should set some additional information - about your processor. There are two possibilities: - 1. You pick up a target processor from "ProcessorTargets.cmake". All you - have to do is set "-D PROC_TARGET_NUMBER:STRING=number" in cmake's - command line to the desired target number. If you choose the 'native' - solution, you have to set the processor label manually by setting "-D - PROC_LABEL:STRING=procLabel" in cmake's command line. Please provide a - short name, like "core i5" or "athlon64" (without double quotes). - Processor frequency is of no use. - 2. You don't need specific processor flags, so you'll let - PROC_TARGET_NUMBER default to 0, but you still have to set the - PROC_LABEL parameter (see point 1 righ above). - - - Type: - make -j4 install - - Type: - make macosx_bundle - - You will find a disk image in the build directory; this is the - distribution release and can be run on any machine which meets the - architecture requirements you specified in variants.conf earlier. From 46388488ca0db156dee68a58e38c6bbba6aa1ec6 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 19 Dec 2015 18:32:58 +0100 Subject: [PATCH 14/19] Update README.md Removed brief compilation instructions as the RawPedia articles are now up to date and explain everything in relevant detail. --- README.md | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index f0b286ba3..5bc7650e2 100644 --- a/README.md +++ b/README.md @@ -23,42 +23,5 @@ http://git-scm.com/book/en/ ## Compilation, branches and Git Refer to RawPedia for a detailed explanation of how to get the necessary dependencies and how to compile RawTherapee: http://rawpedia.rawtherapee.com/Linux - -The information below is a brief summary of that. - -### Clone the source code -Clone the source code either using HTTPS: -``` -git clone https://github.com/Beep6581/RawTherapee ~/repo-rt -``` -or using SSH (see https://help.github.com/articles/generating-ssh-keys/ ): -``` -git clone git@github.com:Beep6581/RawTherapee.git ~/repo-rt -``` -or update a previously cloned repository: -``` -cd ~/repo-rt && git pull -``` - -### Optionally pick a branch -New features and bug fixes are made on their own branches. Once tested, those branches are merged into the "master" branch. We used to test new features and bug fixes by sharing patches (.diff files) but git makes branching easy and branching makes sharing patches unnecessary. -To test a new feature or bug fix, just checkout [the right branch](https://github.com/Beep6581/RawTherapee/branches/active) before compiling: -``` -git checkout -``` - -### Compile and run -To find out how many threads your CPU supports, run: -`grep -c processor /proc/cpuinfo` -Then replace the number in `-j8` below with this number. This will make compilation faster but it will have no effect on the speed of running RawTherapee. - -Now you will make an out-of-source compilation of RawTherapee, it will be built into the ~/repo-rt/build/release folder, and then you will move this folder to your home directory and rename it to "rt", so make sure there is no ~/rt folder already! -``` -mkdir build && cd build && \ -cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCMAKE_BUILD_TYPE="release" -DPROC_TARGET_NUMBER="2" -DBUILD_BUNDLE="ON" -DBINDIR="." -DDATADIR="." -DCACHE_NAME_SUFFIX=4 .. && \ -make -j8 install && \ -mv release ~/rt -``` - -Run RawTherapee: -`~/rt/rawtherapee` +http://rawpedia.rawtherapee.com/Windows +http://rawpedia.rawtherapee.com/OS_X From d90d803977327ac0e8b6b3df53afd642a6f05d32 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 19 Dec 2015 18:35:08 +0100 Subject: [PATCH 15/19] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bc7650e2..baa566ca0 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,13 @@ Git handbook: http://git-scm.com/book/en/ ## Compilation, branches and Git -Refer to RawPedia for a detailed explanation of how to get the necessary dependencies and how to compile RawTherapee: +Refer to RawPedia for a detailed explanation of how to get the necessary dependencies and how to compile RawTherapee. + +Linux: http://rawpedia.rawtherapee.com/Linux + +Windows: http://rawpedia.rawtherapee.com/Windows + +OS X: http://rawpedia.rawtherapee.com/OS_X From 4d6533746e155e1834f59a65f4514f62659a3fd8 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 19 Dec 2015 19:45:54 +0100 Subject: [PATCH 16/19] Delete WindowsEnvironmentSetup.html Made obsolete by http://rawpedia.rawtherapee.com/Windows --- WindowsEnvironmentSetup.html | 43 ------------------------------------ 1 file changed, 43 deletions(-) delete mode 100644 WindowsEnvironmentSetup.html diff --git a/WindowsEnvironmentSetup.html b/WindowsEnvironmentSetup.html deleted file mode 100644 index 113a8dc6a..000000000 --- a/WindowsEnvironmentSetup.html +++ /dev/null @@ -1,43 +0,0 @@ -

Building RawTherapee in Windows 64

-12 November 2011
-
-
-This short guide outlines setting up a development environment for building RawTherapee (64 bit) in Windows.
-Apology and warning: the procedure is convoluted. Prepare for frustration if you deviate even one bit. Sorry.
-
-Step 0:
-Use TortoiseHg to grab the latest RawTherapee, put it in a directory whose name doesn't contain spaces. This is more or less simple but well documented, please figure it out yourself.
-
-Step 1:
-Download the latest CMake. Install it into C:\CMake.
-
-Step 2:
-Download a rather specific version of gtkmm64. Install it into C:\gtkmm64.
-
-Step 3:
-Download a rather specific build of MinGW. When installing, uncheck "Check for updated files...", check "Experimental (32 and 64 bit)", check the "openmp" component under Components->gcc, install into C:\MinGW64.
-
-Step 4:
-Download the latest Precompiled package for 64bit Windows. Unzip the file contents (already organized into several subdirectories) into C:\MinGW64.
-
-Step 5:
-Download a rather specific build of MSYS. Install to C:\msys. At the end it asks for your MinGW directory, make sure you give it C:/MinGW64. That's a forward slash, and it matters.
-
-Step 6:
-Create a file named build.bat in your RawTherapee source directory with the following content:
-
-set GTKMM_BASEPATH=C:\gtkmm64
-set GTKMM64_BASEPATH=C:\gtkmm64
-set MINGW_BASEPATH=C:\MinGW64
-set PATH=%PATH%;C:\gtkmm64\bin;C:\MinGW64\bin;C:\CMake\bin
-set PKG_CONFIG_PATH=C:\MinGW64\lib\pkgconfig;c:\gtkmm64\lib\pkgconfig
-
-cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DPROC_TARGET_NUMBER:STRING=2
-mingw32-make -j2 install
-pause
-
-
-
-Running the batch file above after completing all steps properly should slowly but flawlessly build RawTherapee.
-If it doesn't work, please tell us about it at the RawTherapee forum. Maybe this document needs updating.
-Do not rest until it builds. A complicated build sucks, but out of date or inaccurate build documentation is unacceptable.
From f63ebce657aa4fddd6e0dfea73c60925a98f3d23 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 19 Dec 2015 22:10:31 +0100 Subject: [PATCH 17/19] Updating the path of Inkscape/64 on Windows --- tools/source_icons/script/svg2png.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/source_icons/script/svg2png.bash b/tools/source_icons/script/svg2png.bash index 2e9c4bb5a..27642a52c 100755 --- a/tools/source_icons/script/svg2png.bash +++ b/tools/source_icons/script/svg2png.bash @@ -49,7 +49,7 @@ do echo "#! /bin/bash" > $DIR_TMP/$FILE_NAME.bash if [[ $OSTYPE == msys || $OSTYPE == MSYS ]]; then - awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "\"/c/Program Files (x86)/Inkscape/inkscape.exe\" " s " --export-png=" d "/" $1 " -" $2}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash + awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "\"/c/Program Files/Inkscape/inkscape.exe\" " s " --export-png=" d "/" $1 " -" $2}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash else awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "inkscape " s " --export-png=" d "/" $1 " -" $2}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash fi From 7227ccc63c6446b00e65da049a57997a631c3e08 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 19 Dec 2015 22:50:38 +0100 Subject: [PATCH 18/19] Fixes #3003 Detect pango-querymodules version from Homebrew on OS X --- rtdata/osx/macosx_bundle.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/rtdata/osx/macosx_bundle.sh b/rtdata/osx/macosx_bundle.sh index 6667548c5..670343b08 100644 --- a/rtdata/osx/macosx_bundle.sh +++ b/rtdata/osx/macosx_bundle.sh @@ -41,6 +41,18 @@ if test ! -n "${MINIMUM_SYSTEM_VERSION}"; then MINIMUM_SYSTEM_VERSION=$(sw_vers -productVersion | cut -d. -f-2) fi +# check for pango-querymodules. Pango 1.38.0 and above do not include it. +# https://github.com/Homebrew/homebrew/issues/44764#issuecomment-146795820 +PangoVer="$(brew list --versions pango)" +PangoVer="${PangoVer//./}" +# Only check the first 4 digits, so that "1.36.99" (13699) doesn't test greater than "1.38.0" (1380) +PangoVer="${PangoVer:0:4}" +if [[ "$PangoVer" -ge "1380" ]]; then + ExistPangoQuerymodules="false" +else + ExistPangoQuerymodules="true" +fi + case ${PROC_BIT_DEPTH} in 64) arch=x86_64;; 32) arch=i386;; @@ -93,13 +105,13 @@ install -d "${ETC}"/{gtk-2.0,pango} cp "${GTK_PREFIX}"/etc/gtk-2.0/im-multipress.conf "${ETC}"/gtk-2.0 "${GTK_PREFIX}"/bin/gdk-pixbuf-query-loaders "${LIB}"/gdk-pixbuf-2.0/*/loaders/*.so > "${ETC}"/gtk-2.0/gdk-pixbuf.loaders "${GTK_PREFIX}"/bin/gtk-query-immodules-2.0 "${LIB}"/gtk-2.0/*/immodules/*.so > "${ETC}"/gtk-2.0/gtk.immodules -"${GTK_PREFIX}"/bin/pango-querymodules "${LIB}"/pango/*/modules/*.so > "${ETC}"/pango/pango.modules sed -i "" -e "s|${PWD}|/tmp|" "${ETC}"/gtk-2.0/gdk-pixbuf.loaders \ - "${ETC}"/gtk-2.0/gtk.immodules \ - "${ETC}"/pango/pango.modules -printf "[Pango]\nModuleFiles = /tmp/${ETC}/pango/pango.modules" > "${ETC}"/pango/pangorc - - + "${ETC}"/gtk-2.0/gtk.immodules +if [[ "$ExistPangoQuerymodules" = "true" ]]; then + "${GTK_PREFIX}"/bin/pango-querymodules "${LIB}"/pango/*/modules/*.so > "${ETC}"/pango/pango.modules + sed -i "" -e "s|${PWD}|/tmp|" "${ETC}"/pango/pango.modules + printf "[Pango]\nModuleFiles = /tmp/${ETC}/pango/pango.modules" > "${ETC}"/pango/pangorc +fi message "Copying shared files from ${GTK_PREFIX}" cp -R "${GTK_PREFIX}"/share/mime "${MACOS}"/share From 13e7260a237333687a25a1bff105c7c41c103379 Mon Sep 17 00:00:00 2001 From: Harshula Jayasuriya Date: Sun, 20 Dec 2015 13:26:27 +0100 Subject: [PATCH 19/19] Close #2964: Fix Segmentation fault in rtengine::processImage due to crop When a pp3 contains negative values for X & Y in the Crop section these get parsed into array indexing code without being checked and set to 0. This results in a segmentation fault because the code tries to index the '-1' element of the array. --- rtengine/simpleprocess.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 665a3a236..da44b25e3 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -77,6 +77,14 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p params.crop.w = fw; params.crop.h = fh; } else { + if (params.crop.x < 0) { + params.crop.x = 0; + } + + if (params.crop.y < 0) { + params.crop.y = 0; + } + if ((params.crop.x + params.crop.w) > fw) { // crop overflow in the width dimension ; we trim it params.crop.w = fw - params.crop.x;