From 8e13d469d8888d720199bedc38fcacf940a34d29 Mon Sep 17 00:00:00 2001
From: Benitoite
Date: Wed, 26 Jul 2017 09:38:54 -0700
Subject: [PATCH 01/12] Uses FontFamily= and FontSize= instead of Font=
https://github.com/Beep6581/RawTherapee/issues/3984
---
rtdata/options/options.osx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx
index 4d35255cd..54beadb25 100644
--- a/rtdata/options/options.osx
+++ b/rtdata/options/options.osx
@@ -24,7 +24,8 @@ PathTemplate=%p1/converted/%f
CustomProfileBuilder=
[GUI]
-Font=Sans 12
+FontFamily=Arial Regular
+FontSize=12
# Set here an absolute or relative path (to the rawtherapee.exe file) to the directory containing your own profiles.
# If MultiUser=true, each user will have their own "options" file, and can set a common or different absolu path
From 1c006d147288ac4d2a85bc73a5203bc7829983b3 Mon Sep 17 00:00:00 2001
From: Benitoite
Date: Fri, 28 Jul 2017 09:39:25 -0700
Subject: [PATCH 02/12] macOS reports and sets screen resolution
https://github.com/Beep6581/RawTherapee/issues/3984#issuecomment-318476962
---
rtgui/main.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/rtgui/main.cc b/rtgui/main.cc
index 099751f06..5a0322973 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -254,6 +254,15 @@ RTWindow *create_rt_window()
Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita";
Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true;
+#if defined(__APPLE__)
+ double resolution = screen->get_resolution ();
+ printf("Screen resolution is %.1f", (float)resolution);
+
+ // This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines...
+ // Do not confuse with screen scaling, where everything is scaled up !
+ screen->set_resolution (96.);
+#endif
+
Glib::RefPtr regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css");
if (!regex->match(options.theme + ".css") || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) {
From 02cf9e3b1270a8d3de4eb9c7865b98cd4dabbeb5 Mon Sep 17 00:00:00 2001
From: Benitoite
Date: Fri, 28 Jul 2017 09:44:11 -0700
Subject: [PATCH 03/12] FontFamily= & CPFontFamily=
https://github.com/Beep6581/RawTherapee/issues/3984#issuecomment-318476962
---
rtdata/options/options.osx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx
index 54beadb25..25696cb85 100644
--- a/rtdata/options/options.osx
+++ b/rtdata/options/options.osx
@@ -23,10 +23,6 @@ PathTemplate=%p1/converted/%f
# Parameters:
CustomProfileBuilder=
-[GUI]
-FontFamily=Arial Regular
-FontSize=12
-
# Set here an absolute or relative path (to the rawtherapee.exe file) to the directory containing your own profiles.
# If MultiUser=true, each user will have their own "options" file, and can set a common or different absolu path
#Directory=profiles
@@ -40,3 +36,7 @@ FontSize=12
# Default profile name (without extension) to use for standard (8bits) images
#ImgDefault=Neutral
+
+[GUI]
+FontFamily=Helvetica Regular
+CPFontFamily=Helvetica Regular
From 28871e1aa91c4ea6e51fb4901abb335675cacf0a Mon Sep 17 00:00:00 2001
From: Philip Rinn
Date: Mon, 31 Jul 2017 12:44:16 +0200
Subject: [PATCH 04/12] Update appstream metadata to current format
---
rawtherapee.appdata.xml | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/rawtherapee.appdata.xml b/rawtherapee.appdata.xml
index 3bcab8918..c1a1bf6a7 100644
--- a/rawtherapee.appdata.xml
+++ b/rawtherapee.appdata.xml
@@ -1,6 +1,6 @@
-
+
rawtherapee.desktop
CC-BY-SA-4.0
GPL-3.0+
@@ -15,13 +15,27 @@
- http://rawpedia.rawtherapee.com/images/9/99/Rt-5-misty1.jpg
- http://rawpedia.rawtherapee.com/images/2/2f/Rt-5-cc24-lcp.jpg
- http://rawtherapee.com/images/screenshots/rt-42_07-hdr-landscape.jpg
- http://rawtherapee.com/images/screenshots/rt-42_03-macro-detail-toning.jpg
- http://rawtherapee.com/images/screenshots/rt-42_05-cow-bw-toning.jpg
- http://rawtherapee.com/images/screenshots/rt-42_08-fb-metadata.jpg
- http://rawtherapee.com/images/screenshots/rt-42_09-queue.jpg
+
+ http://rawpedia.rawtherapee.com/images/9/99/Rt-5-misty1.jpg
+
+
+ http://rawpedia.rawtherapee.com/images/2/2f/Rt-5-cc24-lcp.jpg
+
+
+ http://rawtherapee.com/images/screenshots/rt-42_07-hdr-landscape.jpg
+
+
+ http://rawtherapee.com/images/screenshots/rt-42_03-macro-detail-toning.jpg
+
+
+ http://rawtherapee.com/images/screenshots/rt-42_05-cow-bw-toning.jpg
+
+
+ http://rawtherapee.com/images/screenshots/rt-42_08-fb-metadata.jpg
+
+
+ http://rawtherapee.com/images/screenshots/rt-42_09-queue.jpg
+
raw
@@ -31,5 +45,5 @@
graphics
http://rawtherapee.com/
- contactus_at_rawtherapee.com
-
+ contactus@rawtherapee.com
+
From 5ba3fa1edecb5d89fa4ede8c396113406c9d8a10 Mon Sep 17 00:00:00 2001
From: Philip Rinn
Date: Mon, 31 Jul 2017 12:45:27 +0200
Subject: [PATCH 05/12] Move appstream metadate to new location
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30721a43c..685b418bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,9 +224,9 @@ endif()
if(NOT DEFINED APPDATADIR)
if(UNIX)
if(BUILD_BUNDLE)
- set(APPDATADIR "${DATADIR}/share/appdata")
+ set(APPDATADIR "${DATADIR}/share/metainfo")
else()
- set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
+ set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
endif()
endif()
endif()
From 15eb7e990c48bfc21342d434a48cafc4e61b506c Mon Sep 17 00:00:00 2001
From: Morgan Hardwood
Date: Tue, 1 Aug 2017 17:21:20 +0200
Subject: [PATCH 06/12] Fixes how Batch Processing Add/Set values behave when
count of entries in AdjusterBehavior in options file does not match
ADDSET_PARAM_NUM, #2710
---
rtgui/options.cc | 222 +++++++++++++++++++++----------------------
rtgui/preferences.cc | 19 ++--
2 files changed, 120 insertions(+), 121 deletions(-)
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 07b0f81ad..fad4e9753 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -511,117 +511,117 @@ void Options::setDefaults ()
// Reminder: 0 = SET mode, 1 = ADD mode
baBehav = {
- 0, // ADDSET_TC_EXPCOMP
- 0, // ADDSET_TC_BRIGHTNESS
- 0, // ADDSET_TC_BLACKLEVEL
- 0, // ADDSET_TC_CONTRAST
- 0, // ADDSET_SH_HIGHLIGHTS
- 0, // ADDSET_SH_SHADOWS
- 0, // ADDSET_SH_LOCALCONTRAST
- 0, // ADDSET_LC_BRIGHTNESS
- 0, // ADDSET_LC_CONTRAST
- 0, // ADDSET_SHARP_AMOUNT
- 0, // ADDSET_WB_TEMPERATURE
- 0, // ADDSET_WB_GREEN
- 0, // ADDSET_ROTATE_DEGREE
- 0, // ADDSET_DIST_AMOUNT
- 0, // ADDSET_PERSPECTIVE
- 0, // ADDSET_CA
- 0, // ADDSET_VIGN_AMOUNT
- 0, // ADDSET_VIGN_RADIUS
- 0, // ADDSET_VIGN_STRENGTH
- 0, // ADDSET_VIGN_CENTER
- 0, // ADDSET_LC_CHROMATICITY
- 0, // ADDSET_TC_SATURATION
- 0, // ADDSET_TC_HLCOMPAMOUNT
- 0, // ADDSET_TC_HLCOMPTHRESH
- 0, // ADDSET_TC_SHCOMP
- 0, // ADDSET_DIRPYREQ
- 0, // ADDSET_DIRPYRDN_LUMA
- 0, // ADDSET_DIRPYRDN_LUDET
- 0, // ADDSET_DIRPYRDN_CHROMA
- 0, // ADDSET_DIRPYRDN_CHROMARED
- 0, // ADDSET_DIRPYRDN_CHROMABLUE
- 0, // ADDSET_DIRPYRDN_GAMMA
- 0, // ADDSET_CHMIXER
- 0, // ADDSET_PREPROCESS_GREENEQUIL
- 0, // ADDSET_PREPROCESS_LINEDENOISE
- 0, // ADDSET_RAWCACORR
- 0, // ADDSET_RAWEXPOS_LINEAR
- 0, // ADDSET_RAWEXPOS_PRESER
- 0, // ADDSET_RAWEXPOS_BLACKS
- 0, // ADDSET_SHARPENEDGE_AMOUNT
- 0, // ADDSET_SHARPENMICRO_AMOUNT
- 0, // ADDSET_SHARPENEDGE_PASS
- 0, // ADDSET_SHARPENMICRO_UNIFORMITY
- 0, // ADDSET_VIBRANCE_PASTELS
- 0, // ADDSET_VIBRANCE_SATURATED
- 0, // ADDSET_FREE_OUPUT_GAMMA
- 0, // ADDSET_FREE_OUTPUT_SLOPE
- 0, // ADDSET_CAT_DEGREE
- 0, // ADDSET_CAT_ADAPSCEN
- 0, // ADDSET_CAT_ADAPLUM
- 0, // ADDSET_CAT_LIGHT
- 0, // ADDSET_CAT_RSTPRO
- 0, // ADDSET_CAT_BADPIX
- 0, // ADDSET_CAT_JLIGHT
- 0, // ADDSET_CAT_CHROMA
- 0, // ADDSET_CAT_CONTRAST
- 0, // ADDSET_CAT_CHROMA_S
- 0, // ADDSET_CAT_CHROMA_M
- 0, // ADDSET_CAT_HUE
- 0, // ADDSET_CAT_BADPIX
- 0, // ADDSET_WB_EQUAL
- 0, // ADDSET_GRADIENT_DEGREE
- 0, // ADDSET_GRADIENT_FEATHER
- 0, // ADDSET_GRADIENT_STRENGTH
- 0, // ADDSET_GRADIENT_CENTER
- 0, // ADDSET_PCVIGNETTE_STRENGTH
- 0, // ADDSET_PCVIGNETTE_FEATHER
- 0, // ADDSET_PCVIGNETTE_ROUNDNESS
- 0, // ADDSET_BLACKWHITE_HUES
- 0, // ADDSET_BLACKWHITE_GAMMA
- 0, // ADDSET_DIRPYREQ_THRESHOLD
- 0, // ADDSET_DIRPYREQ_SKINPROTECT
- 0, // ADDSET_COLORTONING_SPLIT
- 0, // ADDSET_COLORTONING_SATTHRESHOLD
- 0, // ADDSET_COLORTONING_SATOPACITY
- 0, // ADDSET_COLORTONING_BALANCE
- 0, // ADDSET_COLORTONING_STRENGTH
- 0, // ADDSET_DIRPYRDN_PASSES
- 0, // ADDSET_RAWFFCLIPCONTROL
- 0, // ADDSET_FILMSIMULATION_STRENGTH
- 0, // ADDSET_WA
- 0, // ADDSET_WA_SKINPROTECT
- 0, // ADDSET_WA_THRESHOLD2
- 0, // ADDSET_WA_THRR
- 0, // ADDSET_WA_THRRH
- 0, // ADDSET_WA_THRESHOLD
- 0, // ADDSET_WA_THRESHOLD2
- 0, // ADDSET_WA_CHRO
- 0, // ADDSET_WA_CHROMA
- 0, // ADDSET_WA_CONTRAST
- 0, // ADDSET_WA_RESCON
- 0, // ADDSET_WA_RESCONH
- 0, // ADDSET_WA_RESCHRO
- 0, // ADDSET_WA_SKYPROTECT
- 0, // ADDSET_WA_EDGRAD
- 0, // ADDSET_WA_EDGVAL
- 0, // ADDSET_WA_STRENGTH
- 0, // ADDSET_WA_EDGEDETECT
- 0, // ADDSET_WA_EDGEDETECTTHR
- 0, // ADDSET_WA_EDGEDETECTTHR2
- 0, // ADDSET_WA_TMRS
- 0, // ADDSET_WA_GAMMA
- 0, // ADDSET_RETI_STR
- 0, // ADDSET_RETI_NEIGH
- 0, // ADDSET_RETI_LIMD
- 0, // ADDSET_RETI_GAIN
- 0, // ADDSET_RETI_OFFS
- 0, // ADDSET_RETI_VART
- 0, // ADDSET_RETI_GAM
- 0, // ADDSET_RETI_SLO
- 0, // ADDSET_WB_TEMPBIAS
+ 1, // ADDSET_TC_EXPCOMP
+ 1, // ADDSET_TC_BRIGHTNESS
+ 1, // ADDSET_TC_BLACKLEVEL
+ 1, // ADDSET_TC_CONTRAST
+ 1, // ADDSET_SH_HIGHLIGHTS
+ 1, // ADDSET_SH_SHADOWS
+ 1, // ADDSET_SH_LOCALCONTRAST
+ 1, // ADDSET_LC_BRIGHTNESS
+ 1, // ADDSET_LC_CONTRAST
+ 1, // ADDSET_SHARP_AMOUNT
+ 1, // ADDSET_WB_TEMPERATURE
+ 1, // ADDSET_WB_GREEN
+ 1, // ADDSET_ROTATE_DEGREE
+ 1, // ADDSET_DIST_AMOUNT
+ 1, // ADDSET_PERSPECTIVE
+ 1, // ADDSET_CA
+ 1, // ADDSET_VIGN_AMOUNT
+ 1, // ADDSET_VIGN_RADIUS
+ 1, // ADDSET_VIGN_STRENGTH
+ 1, // ADDSET_VIGN_CENTER
+ 1, // ADDSET_LC_CHROMATICITY
+ 1, // ADDSET_TC_SATURATION
+ 1, // ADDSET_TC_HLCOMPAMOUNT
+ 1, // ADDSET_TC_HLCOMPTHRESH
+ 1, // ADDSET_TC_SHCOMP
+ 1, // ADDSET_DIRPYREQ
+ 1, // ADDSET_DIRPYRDN_LUMA
+ 1, // ADDSET_DIRPYRDN_LUDET
+ 1, // ADDSET_DIRPYRDN_CHROMA
+ 1, // ADDSET_DIRPYRDN_CHROMARED
+ 1, // ADDSET_DIRPYRDN_CHROMABLUE
+ 1, // ADDSET_DIRPYRDN_GAMMA
+ 1, // ADDSET_CHMIXER
+ 1, // ADDSET_PREPROCESS_GREENEQUIL
+ 1, // ADDSET_PREPROCESS_LINEDENOISE
+ 1, // ADDSET_RAWCACORR
+ 1, // ADDSET_RAWEXPOS_LINEAR
+ 1, // ADDSET_RAWEXPOS_PRESER
+ 1, // ADDSET_RAWEXPOS_BLACKS
+ 1, // ADDSET_SHARPENEDGE_AMOUNT
+ 1, // ADDSET_SHARPENMICRO_AMOUNT
+ 1, // ADDSET_SHARPENEDGE_PASS
+ 1, // ADDSET_SHARPENMICRO_UNIFORMITY
+ 1, // ADDSET_VIBRANCE_PASTELS
+ 1, // ADDSET_VIBRANCE_SATURATED
+ 1, // ADDSET_FREE_OUPUT_GAMMA
+ 1, // ADDSET_FREE_OUTPUT_SLOPE
+ 1, // ADDSET_CAT_DEGREE
+ 1, // ADDSET_CAT_ADAPSCEN
+ 1, // ADDSET_CAT_ADAPLUM
+ 1, // ADDSET_CAT_LIGHT
+ 1, // ADDSET_CAT_RSTPRO
+ 1, // ADDSET_CAT_BADPIX
+ 1, // ADDSET_CAT_JLIGHT
+ 1, // ADDSET_CAT_CHROMA
+ 1, // ADDSET_CAT_CONTRAST
+ 1, // ADDSET_CAT_CHROMA_S
+ 1, // ADDSET_CAT_CHROMA_M
+ 1, // ADDSET_CAT_HUE
+ 1, // ADDSET_CAT_BADPIX
+ 1, // ADDSET_WB_EQUAL
+ 1, // ADDSET_GRADIENT_DEGREE
+ 1, // ADDSET_GRADIENT_FEATHER
+ 1, // ADDSET_GRADIENT_STRENGTH
+ 1, // ADDSET_GRADIENT_CENTER
+ 1, // ADDSET_PCVIGNETTE_STRENGTH
+ 1, // ADDSET_PCVIGNETTE_FEATHER
+ 1, // ADDSET_PCVIGNETTE_ROUNDNESS
+ 1, // ADDSET_BLACKWHITE_HUES
+ 1, // ADDSET_BLACKWHITE_GAMMA
+ 1, // ADDSET_DIRPYREQ_THRESHOLD
+ 1, // ADDSET_DIRPYREQ_SKINPROTECT
+ 1, // ADDSET_COLORTONING_SPLIT
+ 1, // ADDSET_COLORTONING_SATTHRESHOLD
+ 1, // ADDSET_COLORTONING_SATOPACITY
+ 1, // ADDSET_COLORTONING_BALANCE
+ 1, // ADDSET_COLORTONING_STRENGTH
+ 1, // ADDSET_DIRPYRDN_PASSES
+ 1, // ADDSET_RAWFFCLIPCONTROL
+ 1, // ADDSET_FILMSIMULATION_STRENGTH
+ 1, // ADDSET_WA
+ 1, // ADDSET_WA_SKINPROTECT
+ 1, // ADDSET_WA_THRESHOLD2
+ 1, // ADDSET_WA_THRR
+ 1, // ADDSET_WA_THRRH
+ 1, // ADDSET_WA_THRESHOLD
+ 1, // ADDSET_WA_THRESHOLD2
+ 1, // ADDSET_WA_CHRO
+ 1, // ADDSET_WA_CHROMA
+ 1, // ADDSET_WA_CONTRAST
+ 1, // ADDSET_WA_RESCON
+ 1, // ADDSET_WA_RESCONH
+ 1, // ADDSET_WA_RESCHRO
+ 1, // ADDSET_WA_SKYPROTECT
+ 1, // ADDSET_WA_EDGRAD
+ 1, // ADDSET_WA_EDGVAL
+ 1, // ADDSET_WA_STRENGTH
+ 1, // ADDSET_WA_EDGEDETECT
+ 1, // ADDSET_WA_EDGEDETECTTHR
+ 1, // ADDSET_WA_EDGEDETECTTHR2
+ 1, // ADDSET_WA_TMRS
+ 1, // ADDSET_WA_GAMMA
+ 1, // ADDSET_RETI_STR
+ 1, // ADDSET_RETI_NEIGH
+ 1, // ADDSET_RETI_LIMD
+ 1, // ADDSET_RETI_GAIN
+ 1, // ADDSET_RETI_OFFS
+ 1, // ADDSET_RETI_VART
+ 1, // ADDSET_RETI_GAM
+ 1, // ADDSET_RETI_SLO
+ 1, // ADDSET_WB_TEMPBIAS
};
rtSettings.darkFramesPath = "";
diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc
index d211add4f..bc5dd5975 100644
--- a/rtgui/preferences.cc
+++ b/rtgui/preferences.cc
@@ -1987,16 +1987,15 @@ void Preferences::fillPreferences ()
addc.block (true);
setc.block (true);
- if (moptions.baBehav.size() == ADDSET_PARAM_NUM) {
- for (size_t i = 0; i < moptions.baBehav.size(); i++)
- for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++)
- for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++)
- if (adjs->get_value (behavColumns.addsetid) == (int)i) {
- adjs->set_value (behavColumns.badd, moptions.baBehav[i] == 1);
- adjs->set_value (behavColumns.bset, moptions.baBehav[i] != 1);
- break;
- }
- }
+ moptions.baBehav.resize (ADDSET_PARAM_NUM);
+ for (size_t i = 0; i < moptions.baBehav.size(); i++)
+ for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++)
+ for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++)
+ if (adjs->get_value (behavColumns.addsetid) == (int)i) {
+ adjs->set_value (behavColumns.badd, moptions.baBehav[i] == 1);
+ adjs->set_value (behavColumns.bset, moptions.baBehav[i] != 1);
+ break;
+ }
addc.block (false);
setc.block (false);
From 7e05ea8827d59fa397312332ffcac2c56df211ef Mon Sep 17 00:00:00 2001
From: Benitoite
Date: Wed, 2 Aug 2017 12:21:28 -0700
Subject: [PATCH 07/12] Update main.cc
---
rtgui/main.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/rtgui/main.cc b/rtgui/main.cc
index 5a0322973..10cbe72b1 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -255,9 +255,6 @@ RTWindow *create_rt_window()
Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true;
#if defined(__APPLE__)
- double resolution = screen->get_resolution ();
- printf("Screen resolution is %.1f", (float)resolution);
-
// This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines...
// Do not confuse with screen scaling, where everything is scaled up !
screen->set_resolution (96.);
From 7a7e9d323dda1b1b8b52dfbd448e27b20c859d0e Mon Sep 17 00:00:00 2001
From: Hombre57
Date: Sat, 5 Aug 2017 15:29:55 +0200
Subject: [PATCH 08/12] Bugfix in PreviewWindow (attempt to fix issue #3773)
---
rtgui/previewwindow.cc | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc
index 66f49f61e..015c30d4c 100644
--- a/rtgui/previewwindow.cc
+++ b/rtgui/previewwindow.cc
@@ -211,16 +211,15 @@ bool PreviewWindow::on_motion_notify_event (GdkEventMotion* event)
int x, y, w, h;
getObservedFrameArea (x, y, w, h);
if (x>imgX || y>imgY || w < imgW || h < imgH) {
- bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6;
- bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6;
+ bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6;
CursorShape newType = cursor_type;
if (isMoving) {
- mainCropWin->remoteMove ((event->x - press_x) / zoom, (event->y - press_y) / zoom);
+ mainCropWin->remoteMove ((int)((event->x - (double)press_x) / zoom), (int)((event->y - (double)press_y) / zoom));
press_x = event->x;
press_y = event->y;
- } else if (inside && !moreInside) {
+ } else if (inside) {
newType = CSClosedHand;
} else {
newType = CSArrow;
@@ -247,18 +246,10 @@ bool PreviewWindow::on_button_press_event (GdkEventButton* event)
if (x>imgX || y>imgY || w < imgW || h < imgH) {
if (!isMoving) {
- bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6;
- bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6;
isMoving = true;
- if (!inside || moreInside) {
- mainCropWin->remoteMove ((event->x - (x + w / 2)) / zoom, (event->y - (y + h / 2)) / zoom);
- press_x = x + w / 2;
- press_y = y + h / 2;
- } else {
- press_x = event->x;
- press_y = event->y;
- }
+ press_x = event->x;
+ press_y = event->y;
if (cursor_type != CSClosedHand) {
cursor_type = CSClosedHand;
From 3518c6ad7a4a27648abd8b59a06128a3e801df14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fl=C3=B6ssie?=
Date: Mon, 7 Aug 2017 20:09:23 +0200
Subject: [PATCH 09/12] Fix unaligned store in `ImProcFunctions::Lanczos()`
(fixes #4005)
---
rtengine/ipresize.cc | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/rtengine/ipresize.cc b/rtengine/ipresize.cc
index dde43fe6c..644e180c7 100644
--- a/rtengine/ipresize.cc
+++ b/rtengine/ipresize.cc
@@ -18,9 +18,12 @@
*/
#include "improcfun.h"
+
+#include "alignedbuffer.h"
+#include "opthelper.h"
#include "rt_math.h"
#include "sleef.c"
-#include "opthelper.h"
+
//#define PROFILE
#ifdef PROFILE
@@ -180,9 +183,9 @@ SSEFUNCTION void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, f
const int support = static_cast (2.0f * a / sc) + 1;
// storage for precomputed parameters for horizontal interpolation
- float * wwh = new float[support * dst->W];
- int * jj0 = new int[dst->W];
- int * jj1 = new int[dst->W];
+ float* const wwh = new float[support * dst->W];
+ int* const jj0 = new int[dst->W];
+ int* const jj1 = new int[dst->W];
// Phase 1: precompute coefficients for horizontal interpolation
for (int j = 0; j < dst->W; j++) {
@@ -218,9 +221,12 @@ SSEFUNCTION void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, f
#endif
{
// temporal storage for vertically-interpolated row of pixels
- float * lL = new float[src->W];
- float * la = new float[src->W];
- float * lb = new float[src->W];
+ AlignedBuffer aligned_buffer_ll(src->W);
+ AlignedBuffer aligned_buffer_la(src->W);
+ AlignedBuffer aligned_buffer_lb(src->W);
+ float* const lL = aligned_buffer_ll.data;
+ float* const la = aligned_buffer_la.data;
+ float* const lb = aligned_buffer_lb.data;
// weights for interpolation in y direction
float w[support] ALIGNED64;
@@ -315,10 +321,6 @@ SSEFUNCTION void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, f
dst->b[i][j] = b;
}
}
-
- delete[] lL;
- delete[] la;
- delete[] lb;
}
delete[] jj0;
delete[] jj1;
From b183a0b3c7e50d05ef0ff9bcaafb617178070b22 Mon Sep 17 00:00:00 2001
From: Hombre57
Date: Mon, 7 Aug 2017 21:05:00 +0200
Subject: [PATCH 10/12] Solving issue #4000 on behalf of heckflosse
---
rtengine/rawimage.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc
index 7b6ee8782..f36e798d9 100644
--- a/rtengine/rawimage.cc
+++ b/rtengine/rawimage.cc
@@ -112,7 +112,7 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac
}
}
- if ( this->get_cam_mul(0) == -1 || forceAutoWB) {
+ if (data && (this->get_cam_mul(0) == -1 || forceAutoWB)) {
memset(dsum, 0, sizeof dsum);
if (this->isBayer()) {
@@ -552,7 +552,7 @@ int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, Pro
crop_masked_pixels();
free (raw_image);
raw_image = nullptr;
- } else {
+ } else {
if (get_maker() == "Sigma" && cc && cc->has_rawCrop()) { // foveon images
int lm, tm, w, h;
cc->get_rawCrop(lm, tm, w, h);
From 8c3c2f3e886d073a9cbfdb182f0087d0a43b230d Mon Sep 17 00:00:00 2001
From: Alberto Griggio
Date: Tue, 8 Aug 2017 22:40:46 +0200
Subject: [PATCH 11/12] show message dialog about the expected usage when
running RT as GIMP plugin
---
rtdata/languages/default | 2 ++
rtgui/main.cc | 16 ++++++++++++++++
rtgui/options.cc | 5 +++++
rtgui/options.h | 1 +
4 files changed, 24 insertions(+)
diff --git a/rtdata/languages/default b/rtdata/languages/default
index 5f1b4666c..0c065a91d 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -2129,3 +2129,5 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f
ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: f
ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: +
ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: -
+GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP.
+DONT_SHOW_AGAIN;Don't show this message again.
diff --git a/rtgui/main.cc b/rtgui/main.cc
index 10cbe72b1..455749fdd 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -416,6 +416,19 @@ private:
RTWindow *rtWindow;
};
+void show_gimp_plugin_info_dialog(Gtk::Window *parent)
+{
+ if (options.gimpPluginShowInfoDialog) {
+ Gtk::MessageDialog info(*parent, M("GIMP_PLUGIN_INFO"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true);
+ Gtk::Box *box = info.get_message_area();
+ Gtk::CheckButton dontshowagain(M("DONT_SHOW_AGAIN"));
+ dontshowagain.show();
+ box->pack_start(dontshowagain);
+ info.run();
+ options.gimpPluginShowInfoDialog = !dontshowagain.get_active();
+ }
+}
+
} // namespace
@@ -602,6 +615,9 @@ int main(int argc, char **argv)
Gtk::Main m(&argc, &argv);
gdk_threads_enter();
const std::unique_ptr rtWindow(create_rt_window());
+ if (gimpPlugin) {
+ show_gimp_plugin_info_dialog(rtWindow.get());
+ }
m.run(*rtWindow);
gdk_threads_leave();
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 07b0f81ad..5bc7ab684 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -724,6 +724,7 @@ void Options::setDefaults ()
lastProfilingReferenceDir = "";
lastBWCurvesDir = "";
lastLensProfileDir = "";
+ gimpPluginShowInfoDialog = true;
maxRecentFolders = 15;
}
@@ -1852,6 +1853,9 @@ int Options::readFromFile (Glib::ustring fname)
safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir);
safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir);
+ if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) {
+ gimpPluginShowInfoDialog = keyFile.get_boolean("Dialogs", "GimpPluginShowInfoDialog");
+ }
}
// --------------------------------------------------------------------------------------------------------
@@ -2217,6 +2221,7 @@ int Options::saveToFile (Glib::ustring fname)
keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir);
keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir);
+ keyFile.set_boolean("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog);
keyData = keyFile.to_data ();
diff --git a/rtgui/options.h b/rtgui/options.h
index 9253b7e2f..13025ee7c 100644
--- a/rtgui/options.h
+++ b/rtgui/options.h
@@ -315,6 +315,7 @@ public:
Glib::ustring lastProfilingReferenceDir;
Glib::ustring lastBWCurvesDir;
Glib::ustring lastLensProfileDir;
+ bool gimpPluginShowInfoDialog;
size_t maxRecentFolders; // max. number of recent folders stored in options file
std::vector recentFolders; // List containing all recent folders
From 7ab16c1b93a1679781e474dca1518dc91002a580 Mon Sep 17 00:00:00 2001
From: Alberto Griggio
Date: Tue, 8 Aug 2017 22:58:51 +0200
Subject: [PATCH 12/12] fixed double deallocation in
`EditorPanel::saveImmediately`
---
rtgui/editorpanel.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc
index 389c16a4e..8d2d6251a 100644
--- a/rtgui/editorpanel.cc
+++ b/rtgui/editorpanel.cc
@@ -1901,10 +1901,10 @@ bool EditorPanel::saveImmediately(const Glib::ustring &filename, const SaveForma
{
rtengine::procparams::ProcParams pparams;
ipc->getParams (&pparams);
- std::unique_ptr job(rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams));
+ rtengine::ProcessingJob *job = rtengine::ProcessingJob::create(ipc->getInitialImage(), pparams);
// save immediately
- rtengine::IImage16 *img = rtengine::processImage(job.get(), err, nullptr, options.tunnelMetaData, false);
+ rtengine::IImage16 *img = rtengine::processImage(job, err, nullptr, options.tunnelMetaData, false);
int err = 0;
if (sf.format == "tif") {