diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..9bf1f651f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,43 @@
+sudo: required
+dist: trusty
+
+language: cpp
+
+compiler:
+ - gcc
+
+os:
+ - linux
+
+#branches:
+# only:
+# - master
+
+notifications:
+ irc:
+ channels:
+ - "chat.freenode.net#rawtherapee"
+ skip_join: true
+ template:
+ - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
+ email:
+ on_success: change
+ on_failure: always
+
+env:
+ global:
+ - OMP_NUM_THREADS=4
+
+before_install:
+ - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
+ - sudo apt-get -qq update
+ - sudo apt-get install gcc-6.2 g++-6.2
+ - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6.2 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6.2
+ - sudo apt-get install build-essential cmake curl git libbz2-dev libcanberra-gtk3-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk-3-dev libgtkmm-3.0-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev
+
+before_script:
+ - mkdir build
+ - cd build
+ - cmake -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" ..
+
+script: make
diff --git a/rtdata/dcpprofiles/FUJIFILM X100S.dcp b/rtdata/dcpprofiles/FUJIFILM X100S.dcp
new file mode 100644
index 000000000..962d58469
Binary files /dev/null and b/rtdata/dcpprofiles/FUJIFILM X100S.dcp differ
diff --git a/rtdata/dcpprofiles/NIKON D300.dcp b/rtdata/dcpprofiles/NIKON D300.dcp
index 6aafdc616..008383c59 100644
Binary files a/rtdata/dcpprofiles/NIKON D300.dcp and b/rtdata/dcpprofiles/NIKON D300.dcp differ
diff --git a/rtdata/dcpprofiles/NIKON D810.dcp b/rtdata/dcpprofiles/NIKON D810.dcp
index a946c1be2..2a32a1376 100644
Binary files a/rtdata/dcpprofiles/NIKON D810.dcp and b/rtdata/dcpprofiles/NIKON D810.dcp differ
diff --git a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css
index 842dc0698..3832f5bcd 100644
--- a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css
+++ b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css
@@ -2,7 +2,7 @@
This file is part of RawTherapee.
Copyright (c) 2016-2017 TooWaBoo
- Version 2.47 - requires RT 5.0
+ Version 2.49 - requires RT 5.0
RawTherapee is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@
}
#ToolPanelNotebook {
- min-width: 24em;
+ min-width: 24.08334em;
}
#HistoryPanel {
min-width: 18em;
@@ -795,7 +795,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
padding: 0 0.33334em;
}
#ToolPanelNotebook > header tab + tab {
- margin-left: 0.25em;
+ margin-left: 0.33333em;
}
#ToolPanelNotebook > header tab image{
@@ -901,6 +901,11 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
margin: 0;
}
+#MetaPanelNotebook combobox button {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ border-left: none;
+}
#MetaPanelNotebook combobox + button,
#MetaPanelNotebook combobox + button + button {
margin-left: 0.16667em;
@@ -1096,6 +1101,9 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
border-color: @bg-dark-grey;
background-image: none;
}
+#ThresholdAdjuster {
+ margin: 0.08334em 0 0.16667em 0;
+}
#ToolPanelNotebook scrolledwindow viewport.frame {
padding: 0 0.56em;
@@ -1349,13 +1357,14 @@ button.MiddleH {
}
/**/
-/* Base format for Toolbox and dialogs */
+/* Button base format for Toolbox and dialogs */
dialog button,
#MyExpander button,
#BatchQueueButtonsMainContainer button {
min-height: 1.66667em;
min-width: 0;
padding: 0 0.375em;
+ margin: 0.08334em 0;
}
combobox .combo,
dialog combobox .combo,
@@ -1384,7 +1393,7 @@ dialog combobox .combo,
}
buttonbox:not(.dialog-action-area) button{
- margin: 0.16667em 0 0.33334em 0.16667em;
+ margin: 0.08334em 0 0.33334em 0.16667em;
}
#PrefNotebook buttonbox:not(.dialog-action-area) {
margin-right: -5px;
@@ -1408,13 +1417,6 @@ buttonbox:not(.dialog-action-area) button{
}
/**/
-/* Add extra top and bottom space to buttons in toolbox & Preferences*/
-#PrefNotebook stack > box:nth-child(5) combobox,
-#MyExpander button.flat,
-#MyExpander button {
- margin-top: 0.08334em;
- margin-bottom: 0.08334em;
-}
/**/
#MyExpander button.text-button label {
margin: 0;/* x */
@@ -1469,6 +1471,7 @@ window .view button {
min-height: 2em;
min-width: 1.33334em;
padding: 0 0.33334em;
+ margin: 0;
}
dialog .view button.text-button label,
window .view button.text-button label {
@@ -1504,6 +1507,7 @@ window .view header button,
}
#pathbarbox button:last-child {
+ min-height: 2em;
min-width: 2em;
margin: 0;
padding: 0;
@@ -1535,7 +1539,7 @@ popover button.text-button {
border: 0.08334em solid @border-color;
box-shadow: none;
background-image: none;
- margin: 0;
+ margin: 0.083334em 0;
min-height: 1.66667em;
padding: 0 0.66667em;
}
@@ -1625,17 +1629,14 @@ headerbar button.titlebutton.close:active{
/*** end ***************************************************************************************/
/*** Ckeckbox & Radio **************************************************************************/
-checkbox {
- padding:0;
- margin:0;
- min-height: 2em;
-}
+checkbox,
checkbutton,
radiobutton {
padding: 0;
margin: 0;
min-height: 2em;
}
+
check,
radio {
border: calc(0.083334em + 0.18px) solid shade(@text-color, .9);
@@ -1678,16 +1679,6 @@ frame > checkbutton check{
min-height: 1.4em;
margin-left: 0.5em;
}
-#PrefNotebook checkbutton {
- min-height: 1.16667em;
-}
-#PrefNotebook stack > box:nth-child(4) checkbutton,
-#PrefNotebook stack > box:nth-child(5) checkbutton {
- min-height: 1.83334em;
-}
-#PrefNotebook radiobutton {
- min-height: 2em;
-}
#MyExpander button + checkbutton:last-child {
margin-left: 0.33334em;
@@ -1698,7 +1689,7 @@ frame > checkbutton check{
/*** Entry & Spinbutton ************************************************************************/
#MyExpander entry,
entry {
- margin: 0;
+ margin: 0.08334em 0;
padding: 0 0.33334em;
min-height: 1.66667em;
min-width: 0;
@@ -1709,7 +1700,7 @@ entry {
}
spinbutton {
- margin: 0;
+ margin: 0.08334em 0;
padding: 0;
min-height: 1.66667em;
min-width: 0;
diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css
index 4cdb4a308..1741dc352 100644
--- a/rtdata/themes/TooWaBlue-GTK3-20_.css
+++ b/rtdata/themes/TooWaBlue-GTK3-20_.css
@@ -2,7 +2,7 @@
This file is part of RawTherapee.
Copyright (c) 2016-2017 TooWaBoo
- Version 2.47 - requires RT 5.0
+ Version 2.49 - requires RT 5.0
RawTherapee is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@
}
#ToolPanelNotebook {
- min-width: 24em;
+ min-width: 24.08334em;
}
#HistoryPanel {
min-width: 18em;
@@ -795,7 +795,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
padding: 0 0.33334em;
}
#ToolPanelNotebook > header tab + tab {
- margin-left: 0.25em;
+ margin-left: 0.33333em;
}
#ToolPanelNotebook > header tab image{
@@ -901,6 +901,11 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
margin: 0;
}
+#MetaPanelNotebook combobox button {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ border-left: none;
+}
#MetaPanelNotebook combobox + button,
#MetaPanelNotebook combobox + button + button {
margin-left: 0.16667em;
@@ -1096,6 +1101,9 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
border-color: @bg-dark-grey;
background-image: none;
}
+#ThresholdAdjuster {
+ margin: 0.08334em 0 0.16667em 0;
+}
#ToolPanelNotebook scrolledwindow viewport.frame {
padding: 0 0.56em;
@@ -1349,13 +1357,14 @@ button.MiddleH {
}
/**/
-/* Base format for Toolbox and dialogs */
+/* Button base format for Toolbox and dialogs */
dialog button,
#MyExpander button,
#BatchQueueButtonsMainContainer button {
min-height: 1.66667em;
min-width: 0;
padding: 0 0.375em;
+ margin: 0.08334em 0;
}
combobox .combo,
dialog combobox .combo,
@@ -1384,7 +1393,7 @@ dialog combobox .combo,
}
buttonbox:not(.dialog-action-area) button{
- margin: 0.16667em 0 0.33334em 0.16667em;
+ margin: 0.08334em 0 0.33334em 0.16667em;
}
#PrefNotebook buttonbox:not(.dialog-action-area) {
margin-right: -5px;
@@ -1408,13 +1417,6 @@ buttonbox:not(.dialog-action-area) button{
}
/**/
-/* Add extra top and bottom space to buttons in toolbox & Preferences*/
-#PrefNotebook stack > box:nth-child(5) combobox,
-#MyExpander button.flat,
-#MyExpander button {
- margin-top: 0.08334em;
- margin-bottom: 0.08334em;
-}
/**/
#MyExpander button.text-button label {
margin: 0;/* x */
@@ -1469,6 +1471,7 @@ window .view button {
min-height: 2em;
min-width: 1.33334em;
padding: 0 0.33334em;
+ margin: 0;
}
dialog .view button.text-button label,
window .view button.text-button label {
@@ -1504,6 +1507,7 @@ window .view header button,
}
#pathbarbox button:last-child {
+ min-height: 2em;
min-width: 2em;
margin: 0;
padding: 0;
@@ -1535,7 +1539,7 @@ popover button.text-button {
border: 0.08334em solid @border-color;
box-shadow: none;
background-image: none;
- margin: 0;
+ margin: 0.083334em 0;
min-height: 1.66667em;
padding: 0 0.66667em;
}
@@ -1625,17 +1629,14 @@ headerbar button.titlebutton.close:active{
/*** end ***************************************************************************************/
/*** Ckeckbox & Radio **************************************************************************/
-checkbox {
- padding:0;
- margin:0;
- min-height: 2em;
-}
+checkbox,
checkbutton,
radiobutton {
padding: 0;
margin: 0;
min-height: 2em;
}
+
check,
radio {
border: calc(0.083334em + 0.18px) solid shade(@text-color, .9);
@@ -1678,16 +1679,6 @@ frame > checkbutton check{
min-height: 1.4em;
margin-left: 0.5em;
}
-#PrefNotebook checkbutton {
- min-height: 1.16667em;
-}
-#PrefNotebook stack > box:nth-child(4) checkbutton,
-#PrefNotebook stack > box:nth-child(5) checkbutton {
- min-height: 1.83334em;
-}
-#PrefNotebook radiobutton {
- min-height: 2em;
-}
#MyExpander button + checkbutton:last-child {
margin-left: 0.33334em;
@@ -1698,7 +1689,7 @@ frame > checkbutton check{
/*** Entry & Spinbutton ************************************************************************/
#MyExpander entry,
entry {
- margin: 0;
+ margin: 0.08334em 0;
padding: 0 0.33334em;
min-height: 1.66667em;
min-width: 0;
@@ -1709,7 +1700,7 @@ entry {
}
spinbutton {
- margin: 0;
+ margin: 0.08334em 0;
padding: 0;
min-height: 1.66667em;
min-width: 0;
diff --git a/rtgui/options.h b/rtgui/options.h
index b853c07f6..c35668ccc 100644
--- a/rtgui/options.h
+++ b/rtgui/options.h
@@ -42,10 +42,20 @@
// Special name for the Dynamic profile
#define DEFPROFILE_DYNAMIC "Dynamic"
-class SaveFormat
+struct SaveFormat
{
+ SaveFormat() :
+ format("jpg"),
+ pngBits(8),
+ pngCompression(6),
+ jpegQuality(90),
+ jpegSubSamp(2),
+ tiffBits(8),
+ tiffUncompressed(true),
+ saveParams(true)
+ {
+ }
-public:
Glib::ustring format;
int pngBits;
int pngCompression;
@@ -54,7 +64,6 @@ public:
int tiffBits;
bool tiffUncompressed;
bool saveParams;
- SaveFormat () : format("jpg"), pngBits(8), pngCompression(6), jpegQuality(90), jpegSubSamp(2), tiffBits(8), tiffUncompressed(true), saveParams(true) {};
};
enum ThFileType {FT_Invalid = -1, FT_None = 0, FT_Raw = 1, FT_Jpeg = 2, FT_Tiff = 3, FT_Png = 4, FT_Custom = 5, FT_Tiff16 = 6, FT_Png16 = 7, FT_Custom16 = 8};
diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc
index 9ca26d217..865373b60 100644
--- a/rtgui/saveasdlg.cc
+++ b/rtgui/saveasdlg.cc
@@ -21,6 +21,8 @@
#include "guiutils.h"
#include "rtimage.h"
+#include "../rtengine/utils.h"
+
extern Options options;
SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir, Gtk::Window* parent)
@@ -217,41 +219,57 @@ SaveFormat SaveAsDialog::getFormat ()
void SaveAsDialog::okPressed ()
{
-
fname = fchooser->get_filename();
- // checking if the filename field is empty. The user have to click Cancel if he don't want to specify a filename
// NB: There seem to be a bug in Gtkmm2.22 / FileChooserWidget : if you suppress the filename entry and
// click on a folder in the list, the filename field is empty but get_filename will return the folder's path :/
- if (!fname.length() || Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) {
- Glib::ustring msg_ = Glib::ustring("") + M("MAIN_MSG_EMPTYFILENAME") + "";
- Gtk::MessageDialog msgd (*this, msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true);
- msgd.run ();
+ if (Glib::file_test(fname, Glib::FILE_TEST_IS_DIR)) {
+ fname = fchooser->get_current_name();
+ }
+
+ // Checking if the filename field is empty. The user have to click Cancel if he don't want to specify a filename
+ if (fname.empty()) {
+ Gtk::MessageDialog(
+ *this,
+ Glib::ustring("")
+ + M("MAIN_MSG_EMPTYFILENAME")
+ + "",
+ true,
+ Gtk::MESSAGE_WARNING,
+ Gtk::BUTTONS_OK,
+ true
+ ).run();
return;
}
- // resolve extension ambiguities
- SaveFormat sf = formatOpts->getFormat ();
- Glib::ustring extLower = getExtension (fname).lowercase ();
- bool extIsEmpty = (extLower == "");
- bool extIsJpeg = (extLower == "jpg" || extLower == "jpeg" || extLower == "jpe");
- bool extIsTiff = (extLower == "tif" || extLower == "tiff");
- bool extIsPng = (extLower == "png");
+ if (getExtension(fname).empty()) {
+ // Extension is either empty or unfamiliar
+ fname += '.' + formatOpts->getFormat().format;
+ } else if (
+ !rtengine::hasJpegExtension(fname)
+ && !rtengine::hasTiffExtension(fname)
+ && !rtengine::hasPngExtension(fname)
+ ) {
+ // Create dialog to warn user that the filename may have two extensions on the end
+ Gtk::MessageDialog msgd(
+ *this,
+ Glib::ustring("")
+ + M("GENERAL_WARNING")
+ + ": "
+ + M("SAVEDLG_WARNFILENAME")
+ + " \""
+ + Glib::path_get_basename (fname)
+ + '.'
+ + formatOpts->getFormat().format
+ + "\"",
+ true,
+ Gtk::MESSAGE_WARNING,
+ Gtk::BUTTONS_OK_CANCEL,
+ true
+ );
- if (extIsEmpty || !(extIsJpeg || extIsTiff || extIsPng)) {
- // extension is either empty or unfamiliar.
- fname += Glib::ustring (".") + sf.format;
- } else if ( !(sf.format == "jpg" && extIsJpeg)
- && !(sf.format == "tif" && extIsTiff)
- && !(sf.format == "png" && extIsPng ) ) {
- // create dialog to warn user that the filename may have two extensions on the end.
- Glib::ustring msg_ = Glib::ustring ("") + M("GENERAL_WARNING") + ": "
- + M("SAVEDLG_WARNFILENAME") + " \"" + Glib::path_get_basename (fname)
- + "." + sf.format + "\"";
- Gtk::MessageDialog msgd (*this, msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK_CANCEL, true);
-
- if (msgd.run () == Gtk::RESPONSE_OK) {
- fname += Glib::ustring (".") + sf.format;
+ if (msgd.run() == Gtk::RESPONSE_OK) {
+ fname += "." + formatOpts->getFormat().format;
} else {
return;
}