merge with dev

This commit is contained in:
Desmis 2019-07-24 10:45:52 +02:00
commit beab5c5254
131 changed files with 452 additions and 976 deletions

View File

@ -829,6 +829,8 @@ HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;(Bildschleier entfernen)\nMaske anzeigen
HISTORY_MSG_DEHAZE_STRENGTH;(Bildschleier entfernen)\nIntensität
HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;(Sensor—Matrix)\nFarbinterpolation\nAuto-Kontrastschwelle
HISTORY_MSG_DUALDEMOSAIC_CONTRAST;(Sensor-Matrix)\nFarbinterpolation\nKontrastschwelle
HISTORY_MSG_FILMNEGATIVE_ENABLED;(Filmnegativ)
HISTORY_MSG_FILMNEGATIVE_VALUES;(Filmnegativ) - Werte
HISTORY_MSG_HISTMATCHING;(Belichtung)\nAuto-Tonwertkurve
HISTORY_MSG_ICM_OUTPUT_PRIMARIES;(Farbmanagement)\nAusgabeprofil\nVorlagen
HISTORY_MSG_ICM_OUTPUT_TEMP;(Farbmanagement)\nAusgabeprofil\nIccV4-Illuminant D
@ -1065,6 +1067,7 @@ PARTIALPASTE_EQUALIZER;Wavelet
PARTIALPASTE_EVERYTHING;Alle Parameter aktivieren / deaktivieren
PARTIALPASTE_EXIFCHANGES;Änderungen an Exif-Daten
PARTIALPASTE_EXPOSURE;Belichtung
PARTIALPASTE_FILMNEGATIVE;Filmnegativ
PARTIALPASTE_FILMSIMULATION;Filmsimulation
PARTIALPASTE_FLATFIELDAUTOSELECT;Weißbild: Automatische Auswahl
PARTIALPASTE_FLATFIELDBLURRADIUS;Weißbild: Unschärferadius
@ -1718,6 +1721,12 @@ TP_EXPOSURE_TCMODE_STANDARD;Standard
TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Gewichteter Standard
TP_EXPOS_BLACKPOINT_LABEL;Schwarzpunkt
TP_EXPOS_WHITEPOINT_LABEL;Weißpunkt
TP_FILMNEGATIVE_BLUE;Blauverhältnis
TP_FILMNEGATIVE_GREEN;Bezugsexponent (Kontrast)
TP_FILMNEGATIVE_GUESS_TOOLTIP;Berechnet die Exponenten durch Auswahl zweier neutraler\nReferenzpunkte im Bild. Weiß (Hellgrau) und Schwarz (Dunkelgrau).\nDie Reihenfolge spielt keine Rolle. Die Exponenten werden aktualisiert,\nnachdem der zweite Punkt ausgewählt wurde.
TP_FILMNEGATIVE_LABEL;Filmnegativ
TP_FILMNEGATIVE_PICK;Weißen und schwarzen Bereich auswählen
TP_FILMNEGATIVE_RED;Rotverhältnis
TP_FILMSIMULATION_LABEL;Filmsimulation
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee sucht nach Hald-CLUT-Bildern, die für die Filmsimulation benötigt werden, in einem Ordner, der viel Zeit benötigt.\nGehen Sie zu\n< Einstellungen > Bildbearbeitung > Filmsimulation >\nund prüfen Sie welcher Order benutzt wird. Wählen Sie den Ordner aus, der nur die Hald-CLUT-Bilder beinhaltet, oder einen leeren Ordner, wenn Sie die Filsimulation nicht verwenden möchten.\n\nWeitere Informationen über die Filmsimulation finden Sie auf RawPedia.\n\nMöchten Sie die Suche beenden?
TP_FILMSIMULATION_STRENGTH;Intensität
@ -2362,16 +2371,3 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen.\nTaste: <b>Alt</b> + <b>f</b>
ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: <b>+</b>
ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: <b>-</b>
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
HISTORY_MSG_FILMNEGATIVE_ENABLED;(Filmnegativ)
HISTORY_MSG_FILMNEGATIVE_VALUES;(Filmnegativ) - Werte
PARTIALPASTE_FILMNEGATIVE;Filmnegativ
TP_FILMNEGATIVE_BLUE;Blauverhältnis
TP_FILMNEGATIVE_GREEN;Bezugsexponent (Kontrast)
TP_FILMNEGATIVE_GUESS_TOOLTIP;Berechnet die Exponenten durch Auswahl zweier neutraler\nReferenzpunkte im Bild. Weiß (Hellgrau) und Schwarz (Dunkelgrau).\nDie Reihenfolge spielt keine Rolle. Die Exponenten werden aktualisiert,\nnachdem der zweite Punkt ausgewählt wurde.
TP_FILMNEGATIVE_LABEL;Filmnegativ
TP_FILMNEGATIVE_PICK;Weißen und schwarzen Bereich auswählen
TP_FILMNEGATIVE_RED;Rotverhältnis

View File

@ -152,8 +152,12 @@ FILEBROWSER_COLORLABEL_TOOLTIP;カラー・ラベル\n\nドロップダウン・
FILEBROWSER_COPYPROFILE;プロファイルをコピー
FILEBROWSER_CURRENT_NAME;現在の名前:
FILEBROWSER_DARKFRAME;ダークフレーム
FILEBROWSER_DELETEDIALOG_ALL;ゴミ箱の中にある<b>%1</b>枚のファイル全てを<b>完全<b>に削除しますか?
FILEBROWSER_DELETEDIALOG_HEADER;ファイル削除確認
FILEBROWSER_DELETEDIALOG_SELECTED;選択した<b>%1</b>枚のファイルを<b>完全<b>に削除しますか?
FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;キュー処理に保持されているファイルを<b>含め</b>、選択した<b>%1</b>枚のファイルを<b>完全<b>に削除しますか?
FILEBROWSER_EMPTYTRASH;ゴミ箱を空にする
FILEBROWSER_EMPTYTRASHHINT;ゴミ箱の中のファイルを全て<b>完全に</b> 削除します
FILEBROWSER_EXTPROGMENU;..で開く
FILEBROWSER_FLATFIELD;フラットフィールド
FILEBROWSER_MOVETODARKFDIR;ダークフレーム・ディレクトリに移動
@ -187,6 +191,8 @@ FILEBROWSER_POPUPRANK2;ランク 2 **
FILEBROWSER_POPUPRANK3;ランク 3 ***
FILEBROWSER_POPUPRANK4;ランク 4 ****
FILEBROWSER_POPUPRANK5;ランク 5 *****
FILEBROWSER_POPUPREMOVE;完全に削除
FILEBROWSER_POPUPREMOVEINCLPROC;キュー処理に保持されているファイルを含めて完全に削除
FILEBROWSER_POPUPRENAME;名前変更
FILEBROWSER_POPUPSELECTALL;全選択
FILEBROWSER_POPUPTRASH;ゴミ箱へ移動
@ -213,6 +219,7 @@ FILEBROWSER_SHOWDIRHINT;全ての絞り込みをクリア\nショートカット
FILEBROWSER_SHOWEDITEDHINT;編集済み画像を表示\nショートカット: <b>7</b>
FILEBROWSER_SHOWEDITEDNOTHINT;未編集画像を表示\nショートカット: <b>6</b>
FILEBROWSER_SHOWEXIFINFO;EXIF情報を表示\nショートカット: <b>i</b>\n\nシングル・エディタ・タブのショートカット: <b>Alt-i</b>
FILEBROWSER_SHOWNOTTRASHHINT;ゴミ箱の中にある画像だけを表示
FILEBROWSER_SHOWORIGINALHINT;元画像だけを表示\n\nファイル名は同じだが拡張子が異なる画像がある場合は、環境設定の中のファイルブラウザタブにある拡張子リストの上位に位置する拡張子を持った画像を元画像とする。
FILEBROWSER_SHOWRANK1HINT;1つ星ランクを表示\nショートカット: <b>1</b>
FILEBROWSER_SHOWRANK2HINT;2つ星ランクを表示\nショートカット: <b>2</b>
@ -771,6 +778,8 @@ HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;霞除去 - 深度マップの表示
HISTORY_MSG_DEHAZE_STRENGTH;霞除去 - 強さ
HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;デュアルデモザイク - 自動しきい値
HISTORY_MSG_DUALDEMOSAIC_CONTRAST;AMaZE+VNG4 - コントラストのしきい値
HISTORY_MSG_FILMNEGATIVE_ENABLED;ネガフィルム
HISTORY_MSG_FILMNEGATIVE_VALUES;ネガフィルムの値
HISTORY_MSG_HISTMATCHING;トーンカーブの自動調節
HISTORY_MSG_ICM_OUTPUT_PRIMARIES;出力 - プライマリ
HISTORY_MSG_ICM_OUTPUT_TEMP;出力 - ICC-v4 光源 D
@ -1007,6 +1016,7 @@ PARTIALPASTE_EQUALIZER;ウェーブレット
PARTIALPASTE_EVERYTHING;すべて
PARTIALPASTE_EXIFCHANGES;exifデータを変える
PARTIALPASTE_EXPOSURE;露光量
PARTIALPASTE_FILMNEGATIVE;ネガフィルム
PARTIALPASTE_FILMSIMULATION;フィルムシミュレーション
PARTIALPASTE_FLATFIELDAUTOSELECT;フラットフィールド 自動選択
PARTIALPASTE_FLATFIELDBLURRADIUS;フラットフィールド ぼかし半径
@ -1065,6 +1075,7 @@ PREFERENCES_APPEARANCE_COLORPICKERFONT;カラーピッカーのフォント
PREFERENCES_APPEARANCE_CROPMASKCOLOR;切り抜きのマスクカラー
PREFERENCES_APPEARANCE_MAINFONT;メインフォント
PREFERENCES_APPEARANCE_NAVGUIDECOLOR;ナビゲーターのガイドカラー
PREFERENCES_APPEARANCE_PSEUDOHIDPI;擬似HiDPIモード
PREFERENCES_APPEARANCE_THEME;テーマ
PREFERENCES_APPLNEXTSTARTUP;要再起動
PREFERENCES_AUTOMONPROFILE;OSのメインモニター・プロファイルを使用
@ -1284,6 +1295,7 @@ QUEUE_FORMAT_TITLE;ファイル形式
QUEUE_LOCATION_FOLDER;フォルダに保存
QUEUE_LOCATION_TEMPLATE;テンプレートを使う
QUEUE_LOCATION_TEMPLATE_TOOLTIP;次の書式文字を使用することができます:\n<b>%f</b>, <b>%d1</b>, <b>%d2</b>, ..., <b>%p1</b>, <b>%p2</b>, ...<b>%r</b>\n\nこれらの書式文字は画像パス名のそれぞれ別々の部分、画像の属性を参照します\n\n例えば、次の画像を処理中の場合は:\n\n<b><i>/home/tom/photos/2010-10-31/dsc0042.nef</i></b>\n書式文字の意味するものは:\n<b>%d4</b> = <i>home</i>\n<b>%d3</b> = <i>tom</i>\n<b>%d2</b> = <i>photos</i>\n<b>%d1</b> = <i>2010-10-31</i>\n<b>%f</b> = <i>dsc0042</i>\n<b>%p1</b> = <i>/home/tom/photos/2010-10-31/</i>\n<b>%p2</b> = <i>/home/tom/photos/</i>\n<b>%p3</b> = <i>/home/tom/</i>\n<b>%p4</b> = <i>/home/</i>\n\n<b>%r</b>は写真のランクに置き換えられます。評価なしはrは'0 'に置換されます。画像がごみ箱にある場合、rは'X'に置換されます\n\n元画像と同じ場所に出力したい場合はこのように書きます:\n<b>%p1/%f</b>\n\n処理画像のディレクトリ下 "<i>converted</i>" という名前のディレクトリに出力画像を保存したい場合このように書きます:\n<b>%p1/converted/%f</b>\n\n"<i>/home/tom/photos/converted/2010-10-31</i>" という名前のディレクトリに出力画像を保存したい場合はこのように書きます:\n<b>%p2/converted/%d1/%f</b>
QUEUE_LOCATION_TITLE;出力の場所
QUEUE_STARTSTOP_TOOLTIP;キューにある画像の現像を始める、或いは中止する\n\nショートカット: <b>Ctrl</b>+<b>s</b>
SAMPLEFORMAT_0;データ形式不明
SAMPLEFORMAT_1;符号なし8ビット
@ -1658,6 +1670,12 @@ TP_EXPOSURE_TCMODE_STANDARD;標準
TP_EXPOSURE_TCMODE_WEIGHTEDSTD;加重平均
TP_EXPOS_BLACKPOINT_LABEL;raw ブラック・ポイント
TP_EXPOS_WHITEPOINT_LABEL;raw ホワイト・ポイント
TP_FILMNEGATIVE_BLUE;ブルーの比率
TP_FILMNEGATIVE_GREEN;参考指数(コントラスト)
TP_FILMNEGATIVE_GUESS_TOOLTIP;画像の中でニュートラルな参考ポイントを2点選んで指数を計算します;白い(明るいグレー)1点と黒い(暗いグレー)1点を選びます。順番は関係ありません。2つ目のポイントが選択されると指数が更新されます。
TP_FILMNEGATIVE_LABEL;ネガフィルム
TP_FILMNEGATIVE_PICK;白と黒のポイントをピックアップする
TP_FILMNEGATIVE_RED;レッドの比率
TP_FILMSIMULATION_LABEL;フィルムシミュレーション
TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapeeはフィルムシミュレーション機能に使う画像をHald CLUTフォルダーの中から探すよう設計されていますプログラムに組み込むにはフォルダーが大き過ぎるため。\n変更するには、環境設定 > 画像処理 > フィルムシミュレーションと進み\nどのフォルダーが使われているか確認します。機能を利用する場合は、Hald CLUTだけが入っているフォルダーを指定するか、 この機能を使わない場合はそのフォルダーを空にしておきます。\n\n詳しくはRawPediaを参照して下さい。\n\nフィルム画像のスキャンを止めますか
TP_FILMSIMULATION_STRENGTH;強さ
@ -2301,25 +2319,3 @@ ZOOMPANEL_ZOOMFITSCREEN;画像全体を画面に合わせる\nショートカッ
ZOOMPANEL_ZOOMIN;ズームイン\nショートカット: <b>+</b>
ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: <b>-</b>
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
!FILEBROWSER_DELETEDIALOG_ALL;Are you sure you want to <b>permanently</b> delete all <b>%1</b> files in trash?
!FILEBROWSER_DELETEDIALOG_SELECTED;Are you sure you want to <b>permanently</b> delete the selected <b>%1</b> files?
!FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;Are you sure you want to <b>permanently</b> delete the selected <b>%1</b> files, <b>including</b> a queue-processed version?
!FILEBROWSER_EMPTYTRASHHINT;<b>Permanently</b> delete all files in trash.
!FILEBROWSER_POPUPREMOVE;Delete permanently
!FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version
!FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash.
!HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
!HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
!PARTIALPASTE_FILMNEGATIVE;Film Negative
!PREFERENCES_APPEARANCE_PSEUDOHIDPI;Pseudo-HiDPI mode
!QUEUE_LOCATION_TITLE;Output Location
!TP_FILMNEGATIVE_BLUE;Blue ratio
!TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
!TP_FILMNEGATIVE_GUESS_TOOLTIP;Calculate exponents by picking two neutral reference spots in the image; one white (light gray) and one black (dark gray). The order does not matter. The exponents will be updated after the second spot is picked.
!TP_FILMNEGATIVE_LABEL;Film Negative
!TP_FILMNEGATIVE_PICK;Pick white and black spots
!TP_FILMNEGATIVE_RED;Red ratio

View File

@ -5653,7 +5653,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
double ImProcFunctions::getAutoDistor (const Glib::ustring &fname, int thumb_size)
{
if (fname != "") {
if (!fname.empty()) {
rtengine::RawMetaDataLocation ri;
int w_raw = -1, h_raw = thumb_size;
int w_thumb = -1, h_thumb = thumb_size;

View File

@ -39,11 +39,11 @@ namespace
Glib::ustring expandRelativePath(const Glib::ustring &procparams_fname, const Glib::ustring &prefix, Glib::ustring embedded_fname)
{
if (embedded_fname == "" || !Glib::path_is_absolute(procparams_fname)) {
if (embedded_fname.empty() || !Glib::path_is_absolute(procparams_fname)) {
return embedded_fname;
}
if (prefix != "") {
if (!prefix.empty()) {
if (embedded_fname.length() < prefix.length() || embedded_fname.substr(0, prefix.length()) != prefix) {
return embedded_fname;
}
@ -61,7 +61,7 @@ Glib::ustring expandRelativePath(const Glib::ustring &procparams_fname, const Gl
Glib::ustring relativePathIfInside(const Glib::ustring &procparams_fname, bool fnameAbsolute, Glib::ustring embedded_fname)
{
if (fnameAbsolute || embedded_fname == "" || !Glib::path_is_absolute(procparams_fname)) {
if (fnameAbsolute || embedded_fname.empty() || !Glib::path_is_absolute(procparams_fname)) {
return embedded_fname;
}

View File

@ -3843,7 +3843,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed
return false;
}
if (inProfile == "(embedded)" && embedded) {
if (embedded && inProfile == "(embedded)") {
in = embedded;
} else if (inProfile == "(cameraICC)") {
// DCPs have higher quality, so use them first
@ -3852,7 +3852,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed
if (*dcpProf == nullptr) {
in = ICCStore::getInstance()->getStdProfile(camName);
}
} else if (inProfile != "(camera)" && inProfile != "") {
} else if (inProfile != "(camera)" && !inProfile.empty()) {
Glib::ustring normalName = inProfile;
if (!inProfile.compare (0, 5, "file:")) {

View File

@ -1326,7 +1326,7 @@ private:
} else {
// use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma
if (params.icm.outputProfile != "" && params.icm.outputProfile != ColorManagementParams::NoICMString) {
if (!params.icm.outputProfile.empty() && params.icm.outputProfile != ColorManagementParams::NoICMString) {
// if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too
cmsHPROFILE jprof = ICCStore::getInstance()->getProfile (params.icm.outputProfile); //get outProfile

View File

@ -226,7 +226,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement
cmsHPROFILE in = nullptr;
cmsHPROFILE out = ICCStore::getInstance()->workingSpace (cmp.workingProfile);
if (cmp.inputProfile == "(embedded)" || cmp.inputProfile == "" || cmp.inputProfile == "(camera)" || cmp.inputProfile == "(cameraICC)") {
if (cmp.inputProfile == "(embedded)" || cmp.inputProfile.empty() || cmp.inputProfile == "(camera)" || cmp.inputProfile == "(cameraICC)") {
if (embedded) {
in = embedded;
} else {

View File

@ -257,65 +257,18 @@ public:
std::ostringstream af;
if (aff & 1)
if (af.str() == "") {
af << "Center";
} else {
af << ", Center";
} else if (aff & 2)
if (af.str() == "") {
af << "Top";
} else {
af << ", Top";
} else if (aff & 4)
if (af.str() == "") {
af << "Bottom";
} else {
af << ", Bottom";
} else if (aff & 8)
if (af.str() == "") {
af << "Left";
} else {
af << ", Left";
} else if (aff & 16)
if (af.str() == "") {
af << "Right";
} else {
af << ", Right";
} else if (aff & 32)
if (af.str() == "") {
af << "Upper-left";
} else {
af << ", Upper-left";
} else if (aff & 64)
if (af.str() == "") {
af << "Upper-right";
} else {
af << ", Upper-right";
} else if (aff & 128)
if (af.str() == "") {
af << " Lower-left";
} else {
af << ", Lower-left";
} else if (aff & 256)
if (af.str() == "") {
af << "Lower-right";
} else {
af << ", Lower-right";
} else if (aff & 512)
if (af.str() == "") {
af << "Far Left";
} else {
af << ", Far Left";
} else if (aff & 1024) {
if (af.str() == "") {
af << "Far Right";
} else {
af << ", Far Right";
if (aff) {
for (size_t i = 0; i < afpchoices.size(); ++i) {
if (aff & (1 << i)) {
if (!af.str().empty()) {
af << ", ";
}
af << afpchoices.at(i);
}
}
}
str << "AFPointsInFocus = " << af.str();
str << "AFPointsInFocus = " << (af.str().empty() ? "None" : af.str());
return str.str();
}
};
@ -553,7 +506,7 @@ public:
std::map<std::string, std::string>::const_iterator r = lenses.find (lid.str());
if (r != lenses.end()) {
if (r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses
if (r == lenses.begin() && !EffectiveMaxApertureString.empty()) { // first entry is for unchipped lenses
Tag *FLTag = t->getParent()->getRoot()->findTag ("FocalLength");
ld << "Lens = MF ";

View File

@ -30,7 +30,7 @@ class AdjusterListener
public:
virtual ~AdjusterListener() = default;
virtual void adjusterChanged (Adjuster* a, double newval) = 0;
virtual void adjusterAutoToggled (Adjuster* a, bool newval) = 0;
virtual void adjusterAutoToggled (Adjuster* a, bool newval) {}
};
typedef double(*double2double_fun)(double val);

View File

@ -667,7 +667,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
Glib::ustring fname;
SaveFormat saveFormat;
if (processing->outFileName == "") { // auto file name
if (processing->outFileName.empty()) { // auto file name
Glib::ustring s = calcAutoFileNameBase (processing->filename, processing->sequence);
saveFormat = options.saveFormatBatch;
fname = autoCompleteFileName (s, saveFormat.format);
@ -686,7 +686,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
//printf ("fname=%s, %s\n", fname.c_str(), removeExtension(fname).c_str());
if (img && fname != "") {
if (img && !fname.empty()) {
int err = 0;
if (saveFormat.format == "tif") {

View File

@ -27,6 +27,10 @@ Cairo::RefPtr<RTSurface> BatchQueueButtonSet::cancelIcon;
Cairo::RefPtr<RTSurface> BatchQueueButtonSet::headIcon;
Cairo::RefPtr<RTSurface> BatchQueueButtonSet::tailIcon;
Glib::ustring BatchQueueButtonSet::moveHeadToolTip;
Glib::ustring BatchQueueButtonSet::moveEndToolTip;
Glib::ustring BatchQueueButtonSet::cancelJobToolTip;
BatchQueueButtonSet::BatchQueueButtonSet (BatchQueueEntry* myEntry)
{
@ -34,10 +38,13 @@ BatchQueueButtonSet::BatchQueueButtonSet (BatchQueueEntry* myEntry)
cancelIcon = Cairo::RefPtr<RTSurface>(new RTSurface("cancel-small.png"));
headIcon = Cairo::RefPtr<RTSurface>(new RTSurface("goto-start-small.png"));
tailIcon = Cairo::RefPtr<RTSurface>(new RTSurface("goto-end-small.png"));
moveHeadToolTip = M("FILEBROWSER_POPUPMOVEHEAD");
moveEndToolTip = M("FILEBROWSER_POPUPMOVEEND");
cancelJobToolTip = M("FILEBROWSER_POPUPCANCELJOB");
iconsLoaded = true;
}
add (new LWButton (headIcon, 8, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_POPUPMOVEHEAD")));
add (new LWButton (tailIcon, 9, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_POPUPMOVEEND")));
add (new LWButton (cancelIcon, 10, myEntry, LWButton::Right, LWButton::Center, M("FILEBROWSER_POPUPCANCELJOB")));
add(new LWButton(headIcon, 8, myEntry, LWButton::Left, LWButton::Center, &moveHeadToolTip));
add(new LWButton(tailIcon, 9, myEntry, LWButton::Left, LWButton::Center, &moveEndToolTip));
add(new LWButton(cancelIcon, 10, myEntry, LWButton::Right, LWButton::Center, &cancelJobToolTip));
}

View File

@ -34,6 +34,10 @@ public:
static Cairo::RefPtr<RTSurface> headIcon;
static Cairo::RefPtr<RTSurface> tailIcon;
static Glib::ustring moveHeadToolTip;
static Glib::ustring moveEndToolTip;
static Glib::ustring cancelJobToolTip;
explicit BatchQueueButtonSet (BatchQueueEntry* myEntry);
};

View File

@ -148,7 +148,7 @@ void BatchQueueEntry::removeButtonSet ()
buttonSet = nullptr;
}
std::vector<Glib::RefPtr<Gdk::Pixbuf> > BatchQueueEntry::getIconsOnImageArea ()
std::vector<Glib::RefPtr<Gdk::Pixbuf>> BatchQueueEntry::getIconsOnImageArea ()
{
std::vector<Glib::RefPtr<Gdk::Pixbuf> > ret;
@ -160,7 +160,7 @@ std::vector<Glib::RefPtr<Gdk::Pixbuf> > BatchQueueEntry::getIconsOnImageArea ()
return ret;
}
void BatchQueueEntry::getIconSize (int& w, int& h)
void BatchQueueEntry::getIconSize (int& w, int& h) const
{
w = savedAsIcon->get_width ();
@ -168,7 +168,7 @@ void BatchQueueEntry::getIconSize (int& w, int& h)
}
Glib::ustring BatchQueueEntry::getToolTip (int x, int y)
Glib::ustring BatchQueueEntry::getToolTip (int x, int y) const
{
// get the parent class' tooltip first
Glib::ustring tooltip = ThumbBrowserEntryBase::getToolTip(x, y);

View File

@ -68,9 +68,9 @@ public:
void removeButtonSet ();
std::vector<Glib::RefPtr<Gdk::Pixbuf> > getIconsOnImageArea () override;
void getIconSize (int& w, int& h) override;
Glib::ustring getToolTip (int x, int y) override;
std::vector<Glib::RefPtr<Gdk::Pixbuf>> getIconsOnImageArea () override;
void getIconSize (int& w, int& h) const override;
Glib::ustring getToolTip (int x, int y) const override;
// bqentryupdatelistener interface
void updateImage (guint8* img, int w, int h, int origw, int origh, guint8* newOPreview) override;

View File

@ -143,10 +143,6 @@ void BayerPreProcess::adjusterChanged(Adjuster* a, double newval)
}
}
void BayerPreProcess::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void BayerPreProcess::setBatchMode(bool batchMode)
{
ToolPanel::setBatchMode(batchMode);

View File

@ -47,7 +47,6 @@ public:
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void hotDeadPixelChanged();
void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);

View File

@ -152,10 +152,6 @@ void BayerRAWExposure::adjusterChanged(Adjuster* a, double newval)
}
}
void BayerRAWExposure::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void BayerRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval)
{
if (c == PextwoGreen) {

View File

@ -43,7 +43,6 @@ public:
void setBatchMode (bool batchMode) override;
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void checkBoxToggled (CheckBox* c, CheckValue newval) override;
void setAdjusterBehavior (bool pexblackadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;

View File

@ -1150,10 +1150,6 @@ void BlackWhite::adjusterChanged(Adjuster* a, double newval)
}
}
void BlackWhite::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void BlackWhite::updateRGBLabel ()
{
if (!batchMode) {

View File

@ -55,7 +55,6 @@ public:
void updateRGBLabel ();
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool bwadd, bool bwgadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
void enabledcc_toggled ();

View File

@ -101,10 +101,6 @@ void CACorrection::adjusterChanged (Adjuster* a, double newval)
}
}
void CACorrection::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void CACorrection::setAdjusterBehavior (bool badd)
{

View File

@ -40,7 +40,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool badd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
};

View File

@ -182,10 +182,6 @@ void ChMixer::adjusterChanged(Adjuster* a, double newval)
}
}
void ChMixer::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void ChMixer::enabledChanged()
{
if (listener) {

View File

@ -42,7 +42,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool rgbadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
void enabledChanged() override;

View File

@ -1372,10 +1372,6 @@ void ColorToning::adjusterChanged(Adjuster* a, double newval)
}
}
void ColorToning::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void ColorToning::setBatchMode (bool batchMode)
{
ToolPanel::setBatchMode (batchMode);

View File

@ -33,7 +33,6 @@ public:
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void trimValues (rtengine::procparams::ProcParams* pp) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd);
void neutral_pressed ();
//void neutralCurves_pressed ();

View File

@ -38,6 +38,13 @@
using namespace rtengine;
bool CropWindow::initialized = false;
Glib::ustring CropWindow::zoomOuttt;
Glib::ustring CropWindow::zoomIntt;
Glib::ustring CropWindow::zoom100tt;
Glib::ustring CropWindow::closett;
CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow)
: ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false),
fitZoomEnabled(true), fitZoom(false), cursor_type(CSArrow), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")),
@ -61,11 +68,18 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet
titleHeight = ih;
bZoomOut = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-minus-small.png")), 0, nullptr, LWButton::Left, LWButton::Center, "Zoom Out");
bZoomIn = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-plus-small.png")), 1, nullptr, LWButton::Left, LWButton::Center, "Zoom In");
bZoom100 = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-1to1-small.png")), 2, nullptr, LWButton::Left, LWButton::Center, "Zoom 100/%");
//bZoomFit = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-fit.png")), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit");
bClose = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("cancel-small.png")), 4, nullptr, LWButton::Right, LWButton::Center, "Close");
if (!initialized) {
zoomOuttt = "Zoom Out";
zoomIntt = "Zoom In";
zoom100tt = "Zoom 100/%";
closett = "Close";
initialized = true;
}
bZoomOut = new LWButton(Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-minus-small.png")), 0, nullptr, LWButton::Left, LWButton::Center, &zoomOuttt);
bZoomIn = new LWButton(Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-plus-small.png")), 1, nullptr, LWButton::Left, LWButton::Center, &zoomIntt);
bZoom100 = new LWButton(Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-1to1-small.png")), 2, nullptr, LWButton::Left, LWButton::Center, &zoom100tt);
//bZoomFit = new LWButton (Cairo::RefPtr<RTSurface>(new RTSurface("magnifier-fit.png")), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit");
bClose = new LWButton(Cairo::RefPtr<RTSurface>(new RTSurface("cancel-small.png")), 4, nullptr, LWButton::Right, LWButton::Center, &closett);
buttonSet.add (bZoomOut);
buttonSet.add (bZoomIn);

View File

@ -47,6 +47,12 @@ public:
class ImageArea;
class CropWindow : public LWButtonListener, public CropDisplayHandler, public EditCoordSystem, public ObjectMOBuffer
{
static bool initialized;
static Glib::ustring zoomOuttt;
static Glib::ustring zoomIntt;
static Glib::ustring zoom100tt;
static Glib::ustring closett;
// state management
ImgEditState state; // current state of user (see enum State)

View File

@ -125,7 +125,7 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
Glib::ustring fname = Glib::path_get_basename(dfp->GetCurrentImageFilePath());
Glib::ustring filetype;
if (fname != "") {
if (!fname.empty()) {
// get image filetype, set filter to the same as current image's filetype
std::string::size_type idx;
idx = fname.rfind('.');

View File

@ -164,10 +164,6 @@ void Defringe::adjusterChanged(Adjuster* a, double newval)
}
}
void Defringe::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void Defringe::enabledChanged ()
{

View File

@ -50,7 +50,6 @@ public:
void curveChanged () override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override;

View File

@ -48,6 +48,5 @@ public:
void enabledChanged() override;
void showDepthMapChanged();
void setAdjusterBehavior(bool strengthAdd);
void adjusterAutoToggled(Adjuster* a, bool newval) override {}
};

View File

@ -1246,10 +1246,6 @@ void DiagonalCurveEditorSubGroup::adjusterChanged(Adjuster* a, double newval)
parent->curveChanged ();
}
void DiagonalCurveEditorSubGroup::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
/*
* Listener called when the mouse is over a parametric curve's slider
*/

View File

@ -105,7 +105,6 @@ protected:
const std::vector<double> getCurveFromGUI (int type) override;
void shcChanged () override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
bool adjusterEntered (GdkEventCrossing* ev, int ac);
bool adjusterLeft (GdkEventCrossing* ev, int ac);
void setSubGroupRangeLabels(Glib::ustring r1, Glib::ustring r2, Glib::ustring r3, Glib::ustring r4);

View File

@ -988,10 +988,6 @@ void DirPyrDenoise::adjusterChanged(Adjuster* a, double newval)
}
}
void DirPyrDenoise::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void DirPyrDenoise::enabledChanged ()
{

View File

@ -51,7 +51,6 @@ public:
void autoOpenCurve () override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void medianChanged ();
void chromaChanged (double autchroma, double autred, double autblue) override;

View File

@ -373,10 +373,6 @@ void DirPyrEqualizer::adjusterChanged(Adjuster* a, double newval)
}
}
void DirPyrEqualizer::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void DirPyrEqualizer::enabledChanged ()
{

View File

@ -65,7 +65,6 @@ public:
void trimValues (rtengine::procparams::ProcParams* pp) override;
void cbdlMethodChanged();
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged() override;
void gamutlabToggled ();
void lumaneutralPressed ();

View File

@ -95,10 +95,6 @@ void Distortion::adjusterChanged(Adjuster* a, double newval)
}
}
void Distortion::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void Distortion::setBatchMode (bool batchMode)
{

View File

@ -43,7 +43,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool vadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
void idPressed ();

View File

@ -159,10 +159,6 @@ void EdgePreservingDecompositionUI::adjusterChanged(Adjuster* a, double newval)
}
}
void EdgePreservingDecompositionUI::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void EdgePreservingDecompositionUI::enabledChanged ()
{
if (listener) {

View File

@ -42,7 +42,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void setAdjusterBehavior (bool stAdd, bool gAdd, bool esAdd, bool scAdd, bool rAdd);
};

View File

@ -496,7 +496,7 @@ void ExifPanel::addPressed ()
Glib::ustring sel = getSelection (true);
if (sel == "") {
if (sel.empty()) {
tcombo->set_active_text ("Exif.UserComment");
} else {
tcombo->set_active_text (sel);
@ -658,7 +658,7 @@ Glib::ustring ExifPanel::getSelection (bool onlyeditable)
void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string prefix)
{
if (prefix != "") {
if (!prefix.empty()) {
prefix = prefix + ".";
}

View File

@ -119,10 +119,6 @@ void FattalToneMapping::adjusterChanged(Adjuster* a, double newval)
}
}
void FattalToneMapping::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void FattalToneMapping::enabledChanged ()
{
if (listener) {

View File

@ -42,7 +42,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd);
};

View File

@ -97,7 +97,7 @@ void FavoritBrowser::dirSelected (const Glib::ustring& dirname, const Glib::ustr
void FavoritBrowser::addPressed ()
{
if (lastSelectedDir == "") {
if (lastSelectedDir.empty()) {
return;
}

View File

@ -592,15 +592,16 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry)
{
entry->selected = false;
entry->drawable = false;
entry->framed = editedFiles.find (entry->filename) != editedFiles.end();
entry->framed = editedFiles.find(entry->filename) != editedFiles.end();
// add button set to the thumbbrowserentry
entry->addButtonSet (new FileThumbnailButtonSet (entry));
entry->getThumbButtonSet()->setRank (entry->thumbnail->getRank());
entry->getThumbButtonSet()->setColorLabel (entry->thumbnail->getColorLabel());
entry->getThumbButtonSet()->setInTrash (entry->thumbnail->getStage());
entry->getThumbButtonSet()->setButtonListener (this);
entry->resize (getThumbnailHeight());
entry->addButtonSet(new FileThumbnailButtonSet(entry));
entry->getThumbButtonSet()->setRank(entry->thumbnail->getRank());
entry->getThumbButtonSet()->setColorLabel(entry->thumbnail->getColorLabel());
entry->getThumbButtonSet()->setInTrash(entry->thumbnail->getStage());
entry->getThumbButtonSet()->setButtonListener(this);
entry->resize(getThumbnailHeight());
entry->filtered = !checkFilter(entry);
// find place in abc order
{
@ -619,9 +620,9 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry)
entry
);
initEntry (entry);
initEntry(entry);
}
redraw ();
redraw(false);
}
FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname)

View File

@ -119,39 +119,37 @@ void FileBrowserEntry::calcThumbnailSize ()
}
}
std::vector<Glib::RefPtr<Gdk::Pixbuf> > FileBrowserEntry::getIconsOnImageArea ()
std::vector<Glib::RefPtr<Gdk::Pixbuf>> FileBrowserEntry::getIconsOnImageArea ()
{
std::vector<Glib::RefPtr<Gdk::Pixbuf> > ret;
if (!thumbnail) {
return ret;
return {};
}
std::vector<Glib::RefPtr<Gdk::Pixbuf>> ret;
if (thumbnail->hasProcParams() && editedIcon) {
ret.push_back (editedIcon);
ret.push_back(editedIcon);
}
if (thumbnail->isRecentlySaved() && recentlySavedIcon) {
ret.push_back (recentlySavedIcon);
ret.push_back(recentlySavedIcon);
}
if (thumbnail->isEnqueued () && enqueuedIcon) {
ret.push_back (enqueuedIcon);
ret.push_back(enqueuedIcon);
}
return ret;
}
std::vector<Glib::RefPtr<Gdk::Pixbuf> > FileBrowserEntry::getSpecificityIconsOnImageArea ()
std::vector<Glib::RefPtr<Gdk::Pixbuf>> FileBrowserEntry::getSpecificityIconsOnImageArea ()
{
std::vector<Glib::RefPtr<Gdk::Pixbuf> > ret;
if (!thumbnail) {
return ret;
return {};
}
std::vector<Glib::RefPtr<Gdk::Pixbuf>> ret;
if (thumbnail->isHDR() && hdr) {
ret.push_back (hdr);
}
@ -188,7 +186,7 @@ void FileBrowserEntry::customBackBufferUpdate (Cairo::RefPtr<Cairo::Context> c)
}
}
void FileBrowserEntry::getIconSize (int& w, int& h)
void FileBrowserEntry::getIconSize (int& w, int& h) const
{
w = editedIcon->get_width ();
@ -286,34 +284,29 @@ void FileBrowserEntry::_updateImage(rtengine::IImage8* img, double s, const rten
bool FileBrowserEntry::motionNotify (int x, int y)
{
bool b = ThumbBrowserEntryBase::motionNotify (x, y);
const bool b = ThumbBrowserEntryBase::motionNotify(x, y);
int ix = x - startx - ofsX;
int iy = y - starty - ofsY;
const int ix = x - startx - ofsX;
const int iy = y - starty - ofsY;
Inspector* inspector = parent->getInspector();
if (inspector && inspector->isActive() && !parent->isInTabMode()) {
rtengine::Coord2D coord(-1., -1.);
getPosInImgSpace(x, y, coord);
const rtengine::Coord2D coord(getPosInImgSpace(x, y));
if (coord.x != -1.) {
if (!wasInside) {
inspector->switchImage(filename);
wasInside = true;
}
wasInside = true;
inspector->mouseMove(coord, 0);
} else {
if (wasInside) {
wasInside = false;
rtengine::Coord2D coord(-1, -1);
}
wasInside = false;
}
}
if (inside (x, y)) {
updateCursor (ix, iy);
if (inside(x, y)) {
updateCursor(ix, iy);
}
if (state == SRotateSelecting) {

View File

@ -93,9 +93,9 @@ public:
void refreshQuickThumbnailImage () override;
void calcThumbnailSize () override;
std::vector<Glib::RefPtr<Gdk::Pixbuf> > getIconsOnImageArea () override;
std::vector<Glib::RefPtr<Gdk::Pixbuf> > getSpecificityIconsOnImageArea () override;
void getIconSize (int& w, int& h) override;
std::vector<Glib::RefPtr<Gdk::Pixbuf>> getIconsOnImageArea () override;
std::vector<Glib::RefPtr<Gdk::Pixbuf>> getSpecificityIconsOnImageArea () override;
void getIconSize (int& w, int& h) const override;
// thumbnaillistener interface
void procParamsChanged (Thumbnail* thm, int whoChangedIt) override;

View File

@ -563,44 +563,49 @@ void FileCatalog::closeDir ()
redrawAll ();
}
std::vector<Glib::ustring> FileCatalog::getFileList ()
std::vector<Glib::ustring> FileCatalog::getFileList()
{
std::vector<Glib::ustring> names;
std::set<Glib::ustring> extensions;
for (const auto& parsedExt : options.parsedExtensions) {
extensions.emplace (parsedExt.lowercase ());
}
const std::set<std::string>& extensions = options.parsedExtensionsSet;
try {
auto dir = Gio::File::create_for_path (selectedDirectory);
const auto dir = Gio::File::create_for_path(selectedDirectory);
auto enumerator = dir->enumerate_children ("standard::name");
auto enumerator = dir->enumerate_children("standard::name,standard::type,standard::is-hidden");
while (true) {
try {
auto file = enumerator->next_file ();
const auto file = enumerator->next_file();
if (!file) {
break;
}
const Glib::ustring fname = file->get_name ();
auto lastdot = fname.find_last_of ('.');
if (lastdot >= fname.length () - 1) {
if (file->get_file_type() == Gio::FILE_TYPE_DIRECTORY) {
continue;
}
const auto fext = fname.substr (lastdot + 1).lowercase ();
if (extensions.count (fext) == 0) {
if (!options.fbShowHidden && file->is_hidden()) {
continue;
}
names.emplace_back (Glib::build_filename (selectedDirectory, fname));
const Glib::ustring fname = file->get_name();
const auto lastdot = fname.find_last_of('.');
if (lastdot >= fname.length() - 1) {
continue;
}
if (extensions.find(fname.substr(lastdot + 1).lowercase()) == extensions.end()) {
continue;
}
names.push_back(Glib::build_filename(selectedDirectory, fname));
} catch (Glib::Exception& exception) {
if (options.rtSettings.verbose) {
std::cerr << exception.what () << std::endl;
std::cerr << exception.what() << std::endl;
}
}
}
@ -620,13 +625,13 @@ void FileCatalog::dirSelected (const Glib::ustring& dirname, const Glib::ustring
{
try {
Glib::RefPtr<Gio::File> dir = Gio::File::create_for_path (dirname);
const Glib::RefPtr<Gio::File> dir = Gio::File::create_for_path(dirname);
if (!dir) {
return;
}
closeDir ();
closeDir();
previewsToLoad = 0;
previewsLoaded = 0;
@ -636,16 +641,14 @@ void FileCatalog::dirSelected (const Glib::ustring& dirname, const Glib::ustring
}
selectedDirectory = dir->get_parse_name();
//printf("FileCatalog::dirSelected selectedDirectory = %s\n",selectedDirectory.c_str());
BrowsePath->set_text (selectedDirectory);
buttonBrowsePath->set_image (*iRefreshWhite);
fileNameList = getFileList ();
BrowsePath->set_text(selectedDirectory);
buttonBrowsePath->set_image(*iRefreshWhite);
fileNameList = getFileList();
for (unsigned int i = 0; i < fileNameList.size(); i++) {
Glib::RefPtr<Gio::File> f = Gio::File::create_for_path(fileNameList[i]);
if (f->get_parse_name() != openfile) { // if we opened a file at the beginning don't add it again
checkAndAddFile (f);
if (openfile.empty() || fileNameList[i] != openfile) { // if we opened a file at the beginning don't add it again
addFile(fileNameList[i]);
}
}
@ -696,34 +699,33 @@ void FileCatalog::_refreshProgressBar ()
// In tab mode, no progress bar at all
// Also mention that this progress bar only measures the FIRST pass (quick thumbnails)
// The second, usually longer pass is done multithreaded down in the single entries and is NOT measured by this
if (!inTabMode) {
if (!inTabMode && (!previewsToLoad || std::floor(100.f * previewsLoaded / previewsToLoad) != std::floor(100.f * (previewsLoaded - 1) / previewsToLoad))) {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
Gtk::Grid* grid = Gtk::manage (new Gtk::Grid ());
Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
Gtk::Label *label = nullptr;
if (!previewsToLoad ) {
grid->attach_next_to(*Gtk::manage (new RTImage ("folder-closed.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
if (!previewsToLoad) {
grid->attach_next_to(*Gtk::manage(new RTImage("folder-closed.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded);
label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") +
(filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
+ Glib::ustring::format(previewsLoaded) +
(filteredCount != previewsLoaded ? "]" : ")")));
label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") +
(filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
+ Glib::ustring::format(previewsLoaded) +
(filteredCount != previewsLoaded ? "]" : ")")));
} else {
grid->attach_next_to(*Gtk::manage (new RTImage ("magnifier.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" ));
grid->attach_next_to(*Gtk::manage(new RTImage("magnifier.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
label = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" ));
filepanel->loadingThumbs("", (double)previewsLoaded / previewsToLoad);
}
if( options.mainNBVertical ) {
if (options.mainNBVertical) {
label->set_angle(90);
}
grid->attach_next_to(*label, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
grid->show_all ();
grid->set_tooltip_markup(M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
grid->show_all();
if (nb) {
nb->set_tab_label(*filepanel, *grid);
@ -1005,12 +1007,16 @@ void FileCatalog::copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, b
Gtk::FileChooserDialog fc (getToplevelWindow (this), fc_title, Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER );
fc.add_button( M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL);
fc.add_button( M("GENERAL_OK"), Gtk::RESPONSE_OK);
// open dialog at the 1-st file's path
fc.set_filename(tbe[0]->filename);
if (!options.lastCopyMovePath.empty() && Glib::file_test(options.lastCopyMovePath, Glib::FILE_TEST_IS_DIR)) {
fc.set_current_folder(options.lastCopyMovePath);
} else {
// open dialog at the 1-st file's path
fc.set_current_folder(Glib::path_get_dirname(tbe[0]->filename));
}
//!!! TODO prevent dialog closing on "enter" key press
if( fc.run() == Gtk::RESPONSE_OK ) {
Glib::ustring dest_Dir = fc.get_current_folder();
options.lastCopyMovePath = fc.get_current_folder();
// iterate through selected files
for (unsigned int i = 0; i < tbe.size(); i++) {
@ -1027,10 +1033,10 @@ void FileCatalog::copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, b
Glib::ustring fname_Ext = getExtension(fname);
// construct destination File Paths
Glib::ustring dest_fPath = Glib::build_filename (dest_Dir, fname);
Glib::ustring dest_fPath = Glib::build_filename (options.lastCopyMovePath, fname);
Glib::ustring dest_fPath_param = dest_fPath + paramFileExtension;
if (moveRequested && (src_Dir == dest_Dir)) {
if (moveRequested && (src_Dir == options.lastCopyMovePath)) {
continue;
}
@ -1085,7 +1091,7 @@ void FileCatalog::copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, b
// adjust destination fname to avoid conflicts (append "_<index>", preserve extension)
Glib::ustring dest_fname = Glib::ustring::compose("%1%2%3%4%5", fname_noExt, "_", i_copyindex, ".", fname_Ext);
// re-construct destination File Paths
dest_fPath = Glib::build_filename (dest_Dir, dest_fname);
dest_fPath = Glib::build_filename (options.lastCopyMovePath, dest_fname);
dest_fPath_param = dest_fPath + paramFileExtension;
i_copyindex++;
}
@ -1677,49 +1683,46 @@ void FileCatalog::reparseDirectory ()
return;
}
if (!Glib::file_test (selectedDirectory, Glib::FILE_TEST_IS_DIR)) {
closeDir ();
if (!Glib::file_test(selectedDirectory, Glib::FILE_TEST_IS_DIR)) {
closeDir();
return;
}
std::vector<Glib::ustring> nfileNameList = getFileList ();
// check if a thumbnailed file has been deleted
const std::vector<ThumbBrowserEntryBase*>& t = fileBrowser->getEntries ();
const std::vector<ThumbBrowserEntryBase*>& t = fileBrowser->getEntries();
std::vector<Glib::ustring> fileNamesToDel;
for (size_t i = 0; i < t.size(); i++)
if (!Glib::file_test (t[i]->filename, Glib::FILE_TEST_EXISTS)) {
fileNamesToDel.push_back (t[i]->filename);
for (const auto& entry : t) {
if (!Glib::file_test(entry->filename, Glib::FILE_TEST_EXISTS)) {
fileNamesToDel.push_back(entry->filename);
}
for (size_t i = 0; i < fileNamesToDel.size(); i++) {
delete fileBrowser->delEntry (fileNamesToDel[i]);
cacheMgr->deleteEntry (fileNamesToDel[i]);
previewsLoaded--;
}
if (!fileNamesToDel.empty ()) {
for (const auto& toDelete : fileNamesToDel) {
delete fileBrowser->delEntry(toDelete);
cacheMgr->deleteEntry(toDelete);
--previewsLoaded;
}
if (!fileNamesToDel.empty()) {
_refreshProgressBar();
}
// check if a new file has been added
for (size_t i = 0; i < nfileNameList.size(); i++) {
bool found = false;
// build a set of collate-keys for faster search
std::set<std::string> oldNames;
for (const auto& oldName : fileNameList) {
oldNames.insert(oldName.collate_key());
}
for (size_t j = 0; j < fileNameList.size(); j++)
if (nfileNameList[i] == fileNameList[j]) {
found = true;
break;
}
if (!found) {
checkAndAddFile (Gio::File::create_for_parse_name (nfileNameList[i]));
_refreshProgressBar ();
fileNameList = getFileList();
for (const auto& newName : fileNameList) {
if (oldNames.find(newName.collate_key()) == oldNames.end()) {
addFile(newName);
_refreshProgressBar();
}
}
fileNameList = nfileNameList;
}
void FileCatalog::on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal)
@ -1736,85 +1739,55 @@ void FileCatalog::on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Gli
}
}
void FileCatalog::checkAndAddFile (Glib::RefPtr<Gio::File> file)
void FileCatalog::addFile (const Glib::ustring& fName)
{
if (!file) {
return;
}
try {
const auto info = file->query_info("standard::*");
if (!info || info->get_file_type() == Gio::FILE_TYPE_DIRECTORY) {
return;
}
if (!options.fbShowHidden && info->is_hidden()) {
return;
}
Glib::ustring ext;
const auto lastdot = info->get_name().find_last_of('.');
if (lastdot != Glib::ustring::npos) {
ext = info->get_name().substr(lastdot + 1);
}
if (!options.is_extention_enabled(ext)) {
return;
}
previewLoader->add(selectedDirectoryId, file->get_parse_name(), this);
if (!fName.empty()) {
previewLoader->add(selectedDirectoryId, fName, this);
previewsToLoad++;
} catch(Gio::Error&) {}
}
}
void FileCatalog::addAndOpenFile (const Glib::ustring& fname)
{
auto file = Gio::File::create_for_path (fname);
auto file = Gio::File::create_for_path(fname);
if (!file ) {
return;
}
if (!file->query_exists ()) {
if (!file->query_exists()) {
return;
}
try {
auto info = file->query_info ();
const auto info = file->query_info();
if (!info) {
return;
}
Glib::ustring ext;
auto lastdot = info->get_name().find_last_of ('.');
const auto lastdot = info->get_name().find_last_of('.');
if (lastdot != Glib::ustring::npos) {
ext = info->get_name ().substr (lastdot + 1);
}
if (!options.is_extention_enabled(ext)) {
if (!options.is_extention_enabled(info->get_name().substr(lastdot + 1))) {
return;
}
} else {
return;
}
// if supported, load thumbnail first
const auto tmb = cacheMgr->getEntry (file->get_parse_name ());
const auto tmb = cacheMgr->getEntry(file->get_parse_name());
if (!tmb) {
return;
}
FileBrowserEntry* entry = new FileBrowserEntry (tmb, file->get_parse_name ());
previewReady (selectedDirectoryId, entry);
FileBrowserEntry* entry = new FileBrowserEntry(tmb, file->get_parse_name());
previewReady(selectedDirectoryId, entry);
// open the file
tmb->increaseRef ();
tmb->increaseRef();
idle_register.add(
[this, tmb]() -> bool
{
@ -1829,27 +1802,30 @@ void FileCatalog::addAndOpenFile (const Glib::ustring& fname)
void FileCatalog::emptyTrash ()
{
const std::vector<ThumbBrowserEntryBase*> t = fileBrowser->getEntries ();
const auto& t = fileBrowser->getEntries();
std::vector<FileBrowserEntry*> toDel;
for (size_t i = 0; i < t.size(); i++)
if ((static_cast<FileBrowserEntry*>(t[i]))->thumbnail->getStage() == 1) {
toDel.push_back (static_cast<FileBrowserEntry*>(t[i]));
for (const auto entry : t) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getStage() == 1) {
toDel.push_back(static_cast<FileBrowserEntry*>(entry));
}
deleteRequested (toDel, false, false);
trashChanged();
}
if (toDel.size() > 0) {
deleteRequested(toDel, false, false);
trashChanged();
}
}
bool FileCatalog::trashIsEmpty ()
{
const std::vector<ThumbBrowserEntryBase*> t = fileBrowser->getEntries ();
for (size_t i = 0; i < t.size(); i++)
if ((static_cast<FileBrowserEntry*>(t[i]))->thumbnail->getStage() == 1) {
const auto& t = fileBrowser->getEntries();
for (const auto entry : t) {
if ((static_cast<FileBrowserEntry*>(entry))->thumbnail->getStage() == 1) {
return false;
}
}
return true;
}

View File

@ -141,7 +141,7 @@ private:
IdleRegister idle_register;
void addAndOpenFile (const Glib::ustring& fname);
void checkAndAddFile (Glib::RefPtr<Gio::File> info);
void addFile (const Glib::ustring& fName);
std::vector<Glib::ustring> getFileList ();
BrowserFilter getFilter ();
void trashChanged ();

View File

@ -358,7 +358,7 @@ void FilePanel::saveOptions ()
options.browserToolPanelWidth = winW - get_position();
options.browserToolPanelHeight = tpcPaned->get_position ();
if (options.startupDir == STARTUPDIR_LAST && fileCatalog->lastSelectedDir () != "") {
if (options.startupDir == STARTUPDIR_LAST && !fileCatalog->lastSelectedDir().empty()) {
options.startupPath = fileCatalog->lastSelectedDir ();
}

View File

@ -29,12 +29,14 @@ Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::unRankIcon;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::trashIcon;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::unTrashIcon;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::processIcon;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_0;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_1;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_2;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_3;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_4;
Cairo::RefPtr<RTSurface> FileThumbnailButtonSet::colorLabelIcon_5;
std::array<Cairo::RefPtr<RTSurface>, 6> FileThumbnailButtonSet::colorLabelIcon;
Glib::ustring FileThumbnailButtonSet::processToolTip;
Glib::ustring FileThumbnailButtonSet::unrankToolTip;
Glib::ustring FileThumbnailButtonSet::trashToolTip;
Glib::ustring FileThumbnailButtonSet::untrashToolTip;
Glib::ustring FileThumbnailButtonSet::colorLabelToolTip;
std::array<Glib::ustring, 5> FileThumbnailButtonSet::rankToolTip;
FileThumbnailButtonSet::FileThumbnailButtonSet (FileBrowserEntry* myEntry)
{
@ -46,73 +48,57 @@ FileThumbnailButtonSet::FileThumbnailButtonSet (FileBrowserEntry* myEntry)
trashIcon = Cairo::RefPtr<RTSurface>(new RTSurface("trash-small.png"));
unTrashIcon = Cairo::RefPtr<RTSurface>(new RTSurface("trash-remove-small.png"));
processIcon = Cairo::RefPtr<RTSurface>(new RTSurface("gears-small.png"));
colorLabelIcon[0] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-empty-gray-small.png"));
colorLabelIcon[1] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-red-small.png"));
colorLabelIcon[2] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-yellow-small.png"));
colorLabelIcon[3] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-green-small.png"));
colorLabelIcon[4] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-blue-small.png"));
colorLabelIcon[5] = Cairo::RefPtr<RTSurface>(new RTSurface("circle-purple-small.png"));
processToolTip = M("FILEBROWSER_POPUPPROCESS");
unrankToolTip = M("FILEBROWSER_UNRANK_TOOLTIP");
trashToolTip = M("FILEBROWSER_POPUPTRASH");
untrashToolTip = M("FILEBROWSER_POPUPUNTRASH");
colorLabelToolTip = M("FILEBROWSER_COLORLABEL_TOOLTIP");
rankToolTip[0] = M("FILEBROWSER_RANK1_TOOLTIP");
rankToolTip[1] = M("FILEBROWSER_RANK2_TOOLTIP");
rankToolTip[2] = M("FILEBROWSER_RANK3_TOOLTIP");
rankToolTip[3] = M("FILEBROWSER_RANK4_TOOLTIP");
rankToolTip[4] = M("FILEBROWSER_RANK5_TOOLTIP");
colorLabelIcon_0 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-empty-gray-small.png"));
colorLabelIcon_1 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-red-small.png"));
colorLabelIcon_2 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-yellow-small.png"));
colorLabelIcon_3 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-green-small.png"));
colorLabelIcon_4 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-blue-small.png"));
colorLabelIcon_5 = Cairo::RefPtr<RTSurface>(new RTSurface("circle-purple-small.png"));;
iconsLoaded = true;
}
add (new LWButton (processIcon, 6, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_POPUPPROCESS")));
add (new LWButton (unRankIcon, 0, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_UNRANK_TOOLTIP")));
add(new LWButton(processIcon, 6, myEntry, LWButton::Left, LWButton::Center, &processToolTip));
add(new LWButton(unRankIcon, 0, myEntry, LWButton::Left, LWButton::Center, &unrankToolTip));
for (int i = 0; i < 5; i++) {
add (new LWButton (rankIcon, i + 1, myEntry, LWButton::Left));
add(new LWButton(rankIcon, i + 1, myEntry, LWButton::Left, LWButton::Center, &rankToolTip[i]));
}
add (new LWButton (trashIcon, 7, myEntry, LWButton::Right, LWButton::Center, M("FILEBROWSER_POPUPTRASH")));
add (new LWButton (colorLabelIcon_0, 8, myEntry, LWButton::Right, LWButton::Center, M("FILEBROWSER_COLORLABEL_TOOLTIP")));
buttons[2]->setToolTip (M("FILEBROWSER_RANK1_TOOLTIP"));
buttons[3]->setToolTip (M("FILEBROWSER_RANK2_TOOLTIP"));
buttons[4]->setToolTip (M("FILEBROWSER_RANK3_TOOLTIP"));
buttons[5]->setToolTip (M("FILEBROWSER_RANK4_TOOLTIP"));
buttons[6]->setToolTip (M("FILEBROWSER_RANK5_TOOLTIP"));
add(new LWButton(trashIcon, 7, myEntry, LWButton::Right, LWButton::Center, &trashToolTip));
add(new LWButton(colorLabelIcon[0], 8, myEntry, LWButton::Right, LWButton::Center, &colorLabelToolTip));
}
void FileThumbnailButtonSet::setRank (int stars)
{
for (int i = 1; i <= 5; i++) {
buttons[i + 1]->setIcon (i <= stars ? rankIcon : gRankIcon);
buttons[i + 1]->setIcon(i <= stars ? rankIcon : gRankIcon);
}
}
void FileThumbnailButtonSet::setColorLabel (int colorLabel)
{
if (colorLabel == 0) {
buttons[8]->setIcon (colorLabelIcon_0); //transparent label
}
if (colorLabel == 1) {
buttons[8]->setIcon (colorLabelIcon_1);
}
if (colorLabel == 2) {
buttons[8]->setIcon (colorLabelIcon_2);
}
if (colorLabel == 3) {
buttons[8]->setIcon (colorLabelIcon_3);
}
if (colorLabel == 4) {
buttons[8]->setIcon (colorLabelIcon_4);
}
if (colorLabel == 5) {
buttons[8]->setIcon (colorLabelIcon_5);
if (colorLabel >= 0 && colorLabel <= 5) {
buttons[8]->setIcon(colorLabelIcon[colorLabel]);
}
}
void FileThumbnailButtonSet::setInTrash (bool inTrash)
{
buttons[7]->setIcon (inTrash ? unTrashIcon : trashIcon);
buttons[7]->setToolTip (inTrash ? M("FILEBROWSER_POPUPUNTRASH") : M("FILEBROWSER_POPUPTRASH"));
buttons[7]->setIcon(inTrash ? unTrashIcon : trashIcon);
buttons[7]->setToolTip(inTrash ? &untrashToolTip : &trashToolTip);
}

View File

@ -19,6 +19,8 @@
#ifndef _FILETHUMBNAILBUTTONSET_
#define _FILETHUMBNAILBUTTONSET_
#include <array>
#include "lwbuttonset.h"
#include <gtkmm.h>
#include "filebrowserentry.h"
@ -38,12 +40,14 @@ public:
static Cairo::RefPtr<RTSurface> unTrashIcon;
static Cairo::RefPtr<RTSurface> processIcon;
static Cairo::RefPtr<RTSurface> colorLabelIcon_0;
static Cairo::RefPtr<RTSurface> colorLabelIcon_1;
static Cairo::RefPtr<RTSurface> colorLabelIcon_2;
static Cairo::RefPtr<RTSurface> colorLabelIcon_3;
static Cairo::RefPtr<RTSurface> colorLabelIcon_4;
static Cairo::RefPtr<RTSurface> colorLabelIcon_5;
static std::array<Cairo::RefPtr<RTSurface>, 6> colorLabelIcon;
static Glib::ustring processToolTip;
static Glib::ustring unrankToolTip;
static Glib::ustring trashToolTip;
static Glib::ustring untrashToolTip;
static Glib::ustring colorLabelToolTip;
static std::array<Glib::ustring, 5> rankToolTip;
explicit FileThumbnailButtonSet (FileBrowserEntry* myEntry);
void setRank (int stars);

View File

@ -200,10 +200,6 @@ void FilmNegative::adjusterChanged(Adjuster* a, double newval)
}
}
void FilmNegative::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void FilmNegative::enabledChanged()
{
if (listener) {

View File

@ -55,7 +55,6 @@ public:
void setBatchMode(bool batchMode) override;
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged() override;
void setFilmNegProvider(FilmNegProvider* provider);

View File

@ -115,10 +115,6 @@ void FilmSimulation::adjusterChanged(Adjuster* a, double newval)
}
}
void FilmSimulation::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void FilmSimulation::setBatchMode( bool batchMode )
{
ToolPanel::setBatchMode( batchMode );

View File

@ -56,7 +56,6 @@ public:
FilmSimulation();
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void setBatchMode(bool batchMode) override;
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override;
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override;

View File

@ -192,7 +192,7 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
Glib::ustring fname = Glib::path_get_basename(ffp->GetCurrentImageFilePath());
Glib::ustring filetype;
if (fname != "") {
if (!fname.empty()) {
// get image filetype, set filter to the same as current image's filetype
std::string::size_type idx;
idx = fname.rfind('.');

View File

@ -269,10 +269,6 @@ void Gradient::adjusterChanged(Adjuster* a, double newval)
}
}
void Gradient::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void Gradient::enabledChanged ()
{

View File

@ -43,7 +43,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void setAdjusterBehavior (bool degreeadd, bool featheradd, bool strengthadd, bool centeradd);
void trimValues (rtengine::procparams::ProcParams* pp) override;

View File

@ -389,10 +389,6 @@ void ICCProfileCreator::adjusterChanged(Adjuster* a, double newval)
}
}
void ICCProfileCreator::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void ICCProfileCreator::primariesChanged()
{
if (primaries->get_active_row_number() > 0) {

View File

@ -92,7 +92,6 @@ private:
void illuminantChanged();
void trcPresetsChanged();
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
static std::vector<Glib::ustring> getGamma();
Glib::ustring getPrimariesPresetName(const Glib::ustring &preset);
void getPrimaries(const Glib::ustring &preset, double *p, ColorTemp &temp);

View File

@ -504,7 +504,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
if (pp->icm.inputProfile == "(none)") {
inone->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
iembedded->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else if ((pp->icm.inputProfile == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) {
@ -519,7 +519,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
// If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded).
iembedded->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "(cameraICC)");
} else if ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) {
} else if ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() != Gtk::STATE_INSENSITIVE) {
icamera->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else {
@ -701,10 +701,6 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
}
}
void ICMPanel::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void ICMPanel::wpChanged()
{
if (listener) {
@ -953,7 +949,7 @@ void ICMPanel::setRawMeta(bool raw, const rtengine::FramesData* pMeta)
void ICMPanel::ipSelectionChanged()
{
if (ipDialog->get_filename() == "") {
if (ipDialog->get_filename().empty()) {
return;
}

View File

@ -126,7 +126,6 @@ public:
void setBatchMode(bool batchMode) override;
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void wpChanged();
void wtrcinChanged();

View File

@ -247,7 +247,7 @@ bool ImageArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
(*i)->expose (cr);
}
if (options.showInfo && infotext != "") {
if (options.showInfo && !infotext.empty()) {
iBackBuffer.copySurface(cr);
}

View File

@ -88,10 +88,6 @@ void ImpulseDenoise::adjusterChanged(Adjuster* a, double newval)
}
}
void ImpulseDenoise::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void ImpulseDenoise::enabledChanged ()
{
if (listener) {

View File

@ -40,7 +40,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void setAdjusterBehavior (bool threshadd);

View File

@ -34,7 +34,7 @@ InspectorBuffer::InspectorBuffer(const Glib::ustring &imagePath) : currTransform
// generate thumbnail image
Glib::ustring ext = getExtension (imagePath);
if (ext == "") {
if (ext.empty()) {
imgPath.clear();
return;
}

View File

@ -87,7 +87,7 @@ public:
/** @brief Get the on/off state
*/
bool isActive()
bool isActive() const
{
return active;
};

View File

@ -567,10 +567,6 @@ void LCurve::adjusterChanged(Adjuster* a, double newval)
}
}
void LCurve::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
{

View File

@ -77,7 +77,6 @@ public:
void curveChanged (CurveEditor* ce) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void avoidcolorshift_toggled ();
void lcredsk_toggled();

View File

@ -134,10 +134,6 @@ void LocalContrast::adjusterChanged(Adjuster* a, double newval)
}
}
void LocalContrast::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void LocalContrast::enabledChanged ()
{
if (listener) {

View File

@ -47,7 +47,6 @@ public:
void setBatchMode(bool batchMode) override;
void adjusterChanged(Adjuster *a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged() override;
void setAdjusterBehavior(bool radiusAdd, bool amountAdd, bool darknessAdd, bool lightnessAdd);
};

View File

@ -19,7 +19,7 @@
#include "lwbutton.h"
#include "guiutils.h"
LWButton::LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring tooltip)
LWButton::LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring* tooltip)
: xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(nullptr), actionCode(aCode), actionData(aData), toolTip(tooltip)
{
@ -31,7 +31,7 @@ LWButton::LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignmen
}
}
void LWButton::getSize (int& minw, int& minh)
void LWButton::getSize (int& minw, int& minh) const
{
minw = w;
@ -45,7 +45,13 @@ void LWButton::setPosition (int x, int y)
ypos = y;
}
void LWButton::getPosition (int& x, int& y)
void LWButton::addPosition (int x, int y)
{
xpos += x;
ypos += y;
}
void LWButton::getPosition (int& x, int& y) const
{
x = xpos;
@ -65,7 +71,7 @@ void LWButton::setIcon (Cairo::RefPtr<RTSurface> i)
}
}
Cairo::RefPtr<RTSurface> LWButton::getIcon ()
Cairo::RefPtr<RTSurface> LWButton::getIcon () const
{
return icon;
@ -82,7 +88,7 @@ void LWButton::setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg)
fgb = fg.get_blue ();
}
bool LWButton::inside (int x, int y)
bool LWButton::inside (int x, int y) const
{
return x > xpos && x < xpos + w && y > ypos && y < ypos + h;
@ -210,24 +216,23 @@ void LWButton::redraw (Cairo::RefPtr<Cairo::Context> context)
}
}
void LWButton::getAlignment (Alignment& ha, Alignment& va)
void LWButton::getAlignment (Alignment& ha, Alignment& va) const
{
ha = halign;
va = valign;
}
Glib::ustring LWButton::getToolTip (int x, int y)
Glib::ustring LWButton::getToolTip (int x, int y) const
{
if (inside (x, y)) {
return toolTip;
if (inside(x, y) && toolTip) {
return *toolTip;
} else {
return "";
return {};
}
}
void LWButton::setToolTip (const Glib::ustring& tooltip)
void LWButton::setToolTip (Glib::ustring* tooltip)
{
toolTip = tooltip;

View File

@ -49,26 +49,27 @@ private:
LWButtonListener* listener;
int actionCode;
void* actionData;
Glib::ustring toolTip;
Glib::ustring* toolTip;
public:
LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignment ha = Left, Alignment va = Center, Glib::ustring tooltip = "");
LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignment ha = Left, Alignment va = Center, Glib::ustring* tooltip = nullptr);
void getSize (int& minw, int& minh);
void getAlignment (Alignment& ha, Alignment& va);
void getSize (int& minw, int& minh) const;
void getAlignment (Alignment& ha, Alignment& va) const;
void setPosition (int x, int y);
void getPosition (int& x, int& y);
bool inside (int x, int y);
void addPosition (int x, int y);
void getPosition (int& x, int& y) const;
bool inside (int x, int y) const;
void setIcon (Cairo::RefPtr<RTSurface> i);
Cairo::RefPtr<RTSurface> getIcon ();
Cairo::RefPtr<RTSurface> getIcon () const;
void setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg);
void setToolTip (const Glib::ustring& tooltip);
void setToolTip (Glib::ustring* tooltip);
bool motionNotify (int x, int y);
bool pressNotify (int x, int y);
bool releaseNotify (int x, int y);
Glib::ustring getToolTip (int x, int y);
Glib::ustring getToolTip (int x, int y) const;
void setButtonListener (LWButtonListener* bl)
{

View File

@ -18,44 +18,42 @@
*/
#include "lwbuttonset.h"
LWButtonSet::LWButtonSet () : aw(0), ah(0), ax(0), ay(0)
LWButtonSet::LWButtonSet () : aw(0), ah(0), ax(-1), ay(-1)
{
}
LWButtonSet::~LWButtonSet ()
{
for (size_t i = 0; i < buttons.size(); i++) {
delete buttons[i];
for (const auto entry : buttons) {
delete entry;
}
}
void LWButtonSet::add (LWButton* b)
{
buttons.push_back (b);
}
void LWButtonSet::getMinimalDimensions (int& w, int& h)
void LWButtonSet::getMinimalDimensions (int& w, int& h) const
{
w = 0;
h = 0;
for (size_t i = 0; i < buttons.size(); i++) {
for (const auto entry : buttons) {
int bw, bh;
buttons[i]->getSize (bw, bh);
entry->getSize(bw, bh);
w += bw;
if (bh > h) {
h = bh;
}
h = std::max(bh, h);
}
}
void LWButtonSet::arrangeButtons (int x, int y, int w, int h)
{
if (x == ax && y == ay && w == aw && (h == -1 || h == ah )) {
return;
}
int mw, mh;
getMinimalDimensions (mw, mh);
@ -103,108 +101,86 @@ void LWButtonSet::arrangeButtons (int x, int y, int w, int h)
void LWButtonSet::move (int nx, int ny)
{
for (size_t i = 0; i < buttons.size(); i++) {
int x, y;
buttons[i]->getPosition (x, y);
buttons[i]->setPosition (x + nx - ax, y + ny - ay);
for (const auto entry : buttons) {
entry->addPosition(nx - ax, ny - ay);
}
ax = nx;
ay = ny;
}
void LWButtonSet::redraw (Cairo::RefPtr<Cairo::Context> context)
{
for (size_t i = 0; i < buttons.size(); i++) {
buttons[i]->redraw (context);
for (const auto entry : buttons) {
entry->redraw(context);
}
}
bool LWButtonSet::motionNotify (int x, int y)
{
bool res = false;
for (size_t i = 0; i < buttons.size(); i++) {
bool handled = buttons[i]->motionNotify (x, y);
res = res || handled;
for (const auto entry : buttons) {
res = entry->motionNotify(x, y) || res;
}
return res;
}
bool LWButtonSet::pressNotify (int x, int y)
{
bool res = false;
for (size_t i = 0; i < buttons.size(); i++) {
bool handled = buttons[i]->pressNotify (x, y);
res = res || handled;
for (const auto entry : buttons) {
res = entry->pressNotify(x, y) || res;
}
return res;
}
bool LWButtonSet::releaseNotify (int x, int y)
{
bool res = false;
for (size_t i = 0; i < buttons.size(); i++) {
bool handled = buttons[i]->releaseNotify (x, y);
res = res || handled;
for (const auto entry : buttons) {
res = entry->releaseNotify(x, y) || res;
}
return res;
}
bool LWButtonSet::inside (int x, int y)
bool LWButtonSet::inside (int x, int y) const
{
for (size_t i = 0; i < buttons.size(); i++)
if (buttons[i]->inside (x, y)) {
for (const auto entry : buttons) {
if (entry->inside(x, y)) {
return true;
}
}
return false;
}
void LWButtonSet::setButtonListener (LWButtonListener* bl)
{
for (size_t i = 0; i < buttons.size(); i++) {
buttons[i]->setButtonListener (bl);
for (const auto entry : buttons) {
entry->setButtonListener(bl);
}
}
void LWButtonSet::getAllocatedDimensions (int& w, int& h)
void LWButtonSet::getAllocatedDimensions (int& w, int& h) const
{
w = aw;
h = ah;
}
void LWButtonSet::setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg)
{
for (size_t i = 0; i < buttons.size(); i++) {
buttons[i]->setColors (bg, fg);
for (const auto entry : buttons) {
entry->setColors(bg, fg);
}
}
Glib::ustring LWButtonSet::getToolTip (int x, int y)
Glib::ustring LWButtonSet::getToolTip (int x, int y) const
{
for (const auto entry : buttons) {
const auto ttip = entry->getToolTip(x, y);
for (size_t i = 0; i < buttons.size(); i++) {
Glib::ustring ttip = buttons[i]->getToolTip (x, y);
if (ttip != "") {
if (!ttip.empty()) {
return ttip;
}
}
return "";
return {};
}

View File

@ -16,8 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LWBUTTONSET_
#define _LWBUTTONSET_
#pragma once
#include <gtkmm.h>
#include "lwbutton.h"
@ -35,20 +34,18 @@ public:
void add (LWButton* b);
void getMinimalDimensions (int& w, int& h);
void getAllocatedDimensions (int& w, int& h);
void getMinimalDimensions (int& w, int& h) const;
void getAllocatedDimensions (int& w, int& h) const;
void arrangeButtons (int x, int y, int w, int h);
void setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg);
bool motionNotify (int x, int y);
bool pressNotify (int x, int y);
bool releaseNotify (int x, int y);
void move (int nx, int ny);
bool inside (int x, int y);
bool inside (int x, int y) const;
Glib::ustring getToolTip (int x, int y);
Glib::ustring getToolTip (int x, int y) const;
void setButtonListener (LWButtonListener* bl);
void redraw (Cairo::RefPtr<Cairo::Context> context);
};
#endif

View File

@ -369,6 +369,7 @@ void Options::setDefaults()
multiUser = true;
profilePath = "profiles";
loadSaveProfilePath = ""; // will be corrected in load as otherwise construction fails
lastCopyMovePath = "";
version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize
thumbSize = 160;
thumbSizeTab = 160;
@ -412,6 +413,7 @@ void Options::setDefaults()
favorites.clear();
parseExtensionsEnabled.clear();
parsedExtensions.clear();
parsedExtensionsSet.clear();
renameUseTemplates = false;
renameTemplates.clear();
thumbnailZoomRatios.clear();
@ -655,10 +657,12 @@ Options* Options::copyFrom(Options* other)
void Options::filterOutParsedExtensions()
{
parsedExtensions.clear();
parsedExtensionsSet.clear();
for (unsigned int i = 0; i < parseExtensions.size(); i++)
if (parseExtensionsEnabled[i]) {
parsedExtensions.push_back(parseExtensions[i].lowercase());
parsedExtensionsSet.emplace(parseExtensions[i].lowercase());
}
}
@ -1872,6 +1876,7 @@ void Options::readFromFile(Glib::ustring fname)
safeDirGet(keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
safeDirGet(keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir);
safeDirGet(keyFile, "Dialogs", "LastICCProfCreatorDir", lastICCProfCreatorDir);
safeDirGet(keyFile, "Dialogs", "LastCopyMovePath", lastCopyMovePath);
if (keyFile.has_key("Dialogs", "GimpPluginShowInfoDialog")) {
gimpPluginShowInfoDialog = keyFile.get_boolean("Dialogs", "GimpPluginShowInfoDialog");
@ -2273,6 +2278,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir);
keyFile.set_string("Dialogs", "LastLensProfileDir", lastLensProfileDir);
keyFile.set_string("Dialogs", "LastICCProfCreatorDir", lastICCProfCreatorDir);
keyFile.set_string("Dialogs", "LastCopyMovePath", lastCopyMovePath);
keyFile.set_boolean("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog);
keyFile.set_string("Lensfun", "DBDirectory", rtSettings.lensfunDbDirectory);
@ -2508,36 +2514,17 @@ bool Options::is_parse_extention(Glib::ustring fname)
/*
* return true if fname ends with one of the retained image file extensions
*/
bool Options::has_retained_extention(Glib::ustring fname)
bool Options::has_retained_extention(const Glib::ustring& fname)
{
Glib::ustring ext = getExtension(fname).lowercase();
if (!ext.empty()) {
// there is an extension to the filename
// look out if it has one of the retained extensions
for (unsigned int i = 0; i < parsedExtensions.size(); i++) {
if (ext == parsedExtensions[i]) {
return true;
}
}
}
return false;
return parsedExtensionsSet.find(getExtension(fname).lowercase()) != parsedExtensionsSet.end();
}
/*
* return true if ext is an enabled extension
*/
bool Options::is_extention_enabled(Glib::ustring ext)
bool Options::is_extention_enabled(const Glib::ustring& ext)
{
for (int j = 0; j < (int)parseExtensions.size(); j++)
if (parseExtensions[j].casefold() == ext.casefold()) {
return j >= (int)parseExtensionsEnabled.size() || parseExtensionsEnabled[j];
}
return false;
return parsedExtensionsSet.find(ext.lowercase()) != parsedExtensionsSet.end();
}
Glib::ustring Options::getUserProfilePath()

View File

@ -19,6 +19,7 @@
#ifndef _OPTIONS_
#define _OPTIONS_
#include <set>
#include <gtkmm.h>
#include "../rtengine/rtengine.h"
#include <exception>
@ -174,6 +175,7 @@ public:
Glib::ustring startupPath;
Glib::ustring profilePath; // can be an absolute or relative path; depending on this value, bundled profiles may not be found
bool useBundledProfiles; // only used if multiUser == true
Glib::ustring lastCopyMovePath;
Glib::ustring loadSaveProfilePath;
Glib::ustring lastSaveAsPath;
int saveAsDialogWidth;
@ -259,6 +261,7 @@ public:
std::vector<Glib::ustring> parseExtensions; // List containing all extensions type
std::vector<int> parseExtensionsEnabled; // List of bool to retain extension or not
std::vector<Glib::ustring> parsedExtensions; // List containing all retained extensions (lowercase)
std::set<std::string> parsedExtensionsSet; // Set containing all retained extensions (lowercase)
std::vector<int> tpOpen;
bool autoSaveTpOpen;
//std::vector<int> crvOpen;
@ -422,8 +425,8 @@ public:
Glib::ustring getGlobalProfilePath();
Glib::ustring findProfilePath (Glib::ustring &profName);
bool is_parse_extention (Glib::ustring fname);
bool has_retained_extention (Glib::ustring fname);
bool is_extention_enabled (Glib::ustring ext);
bool has_retained_extention (const Glib::ustring& fname);
bool is_extention_enabled (const Glib::ustring& ext);
bool is_defProfRawMissing();
bool is_bundledDefProfRawMissing();
bool is_defProfImgMissing();

View File

@ -93,10 +93,6 @@ void PCVignette::adjusterChanged(Adjuster* a, double newval)
}
}
void PCVignette::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void PCVignette::enabledChanged ()
{

View File

@ -26,7 +26,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void setAdjusterBehavior (bool strengthadd, bool featheradd, bool roundnessadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;

View File

@ -98,10 +98,6 @@ void PerspCorrection::adjusterChanged(Adjuster* a, double newval)
}
}
void PerspCorrection::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void PerspCorrection::setAdjusterBehavior (bool badd)
{

View File

@ -40,7 +40,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool badd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
};

View File

@ -309,7 +309,7 @@ void PlacesBrowser::dirSelected (const Glib::ustring& dirname, const Glib::ustri
void PlacesBrowser::addPressed ()
{
if (lastSelectedDir == "") {
if (lastSelectedDir.empty()) {
return;
}

View File

@ -101,10 +101,6 @@ void PreProcess::adjusterChanged(Adjuster* a, double newval)
}
}
void PreProcess::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void PreProcess::hotPixelChanged ()
{
if (batchMode) {

View File

@ -48,7 +48,6 @@ public:
void hotPixelChanged();
void deadPixelChanged();
void adjusterChanged(Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
//void adjusterChanged (Adjuster* a, double newval);

View File

@ -350,10 +350,6 @@ void PrSharpening::adjusterChanged (Adjuster* a, double newval)
}
}
void PrSharpening::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void PrSharpening::enabledChanged ()
{
if (listener) {

View File

@ -65,7 +65,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void enabledChanged () override;
void edgesonly_toggled ();
void halocontrol_toggled ();

View File

@ -144,10 +144,6 @@ void RAWCACorr::adjusterChanged(Adjuster* a, double newval)
}
}
void RAWCACorr::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void RAWCACorr::checkBoxToggled (CheckBox* c, CheckValue newval)
{
if (c == caAutocorrect) {

View File

@ -50,7 +50,6 @@ public:
void trimValues (rtengine::procparams::ProcParams* pp) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void checkBoxToggled (CheckBox* c, CheckValue newval) override;
};

View File

@ -76,10 +76,6 @@ void RAWExposure::adjusterChanged(Adjuster* a, double newval)
}
}
void RAWExposure::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void RAWExposure::setBatchMode(bool batchMode)
{
ToolPanel::setBatchMode (batchMode);

View File

@ -41,7 +41,6 @@ public:
void setBatchMode (bool batchMode) override;
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void setAdjusterBehavior (bool pexposadd);
void trimValues (rtengine::procparams::ProcParams* pp) override;
};

View File

@ -88,159 +88,3 @@ Glib::ustring RenameDialog::getNewName ()
return newName->get_text ();
}
//void RenameDialog::fillTemplateList ()
//{
//
// templateModel->clear ();
//
// for (size_t i = 0; i < options.renameTemplates.size(); i++) {
// Gtk::TreeModel::iterator iter = templateModel->append ();
// iter->set_value (templateColumns.tmplName, options.renameTemplates[i]);
// iter->set_value (templateColumns.rowSeparator, false);
// }
//
// // append separator and the manage... item
// Gtk::TreeModel::iterator iter = templateModel->append ();
// iter->set_value (templateColumns.tmplName, Glib::ustring(""));
// iter->set_value (templateColumns.rowSeparator, true);
// iter = templateModel->append ();
// iter->set_value (templateColumns.tmplName, Glib::ustring(M("FILEBROWSER_ADDDELTEMPLATE")));
// iter->set_value (templateColumns.rowSeparator, false);
//}
//bool RenameDialog::rowSeparatorFunc (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::iterator& iter)
//{
//
// return iter->get_value (templateColumns.rowSeparator);
//}
//void RenameDialog::useTemplToggled ()
//{
//
// templates->set_sensitive (useTmpl->get_active ());
//
// if (useTmpl->get_active () && isTemplSelected ()) {
// all->set_sensitive (true);
// newName->set_text (applyTemplate (oldName->get_text(), imageData, getActiveTemplate()));
// } else {
// all->set_sensitive (false);
// }
//
// newName->select_region (0, newName->get_text().size());
//}
//bool RenameDialog::isTemplSelected ()
//{
//
// Gtk::TreeModel::iterator iter = templates->get_active();
// return iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE");
//}
//Glib::ustring RenameDialog::getActiveTemplate ()
//{
//
// Gtk::TreeModel::iterator iter = templates->get_active();
//
// if (iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE")) {
// return iter->get_value (templateColumns.tmplName);
// } else {
// return "";
// }
//}
//void RenameDialog::tmplSelectionChanged ()
//{
//
// Gtk::TreeModel::iterator iter = templates->get_active();
//
// if (iter && iter->get_value (templateColumns.tmplName) == M("FILEBROWSER_ADDDELTEMPLATE")) {
// RenameTemplateEditor* rte = new RenameTemplateEditor (p);
//
// if (rte->run() == Gtk::RESPONSE_OK) {
// fillTemplateList ();
// }
//
// delete rte;
// // show add/del template dialog
// } else {
// useTemplToggled ();
// }
//}
//RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent)
// : Gtk::Dialog ("Edit rename templates", *parent, true)
//{
//
// list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE));
// list->set_headers_visible (false);
// get_content_area ()->pack_start (*list);
//
// Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ());
// templ = Gtk::manage (new Gtk::Entry ());
// Gtk::Button* add = Gtk::manage (new Gtk::Button ());
// Gtk::Button* del = Gtk::manage (new Gtk::Button ());
// add->add (*Gtk::manage (new RTImage ("add-small.png")));
// del->add (*Gtk::manage (new RTImage ("remove-small.png")));
// hb->pack_start (*templ);
// hb->pack_start (*add, Gtk::PACK_SHRINK, 2);
// hb->pack_start (*del, Gtk::PACK_SHRINK, 2);
//
// get_content_area ()->pack_start (*hb, Gtk::PACK_SHRINK, 4);
//
// add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
//
// refreshTemplateList ();
//
// add->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::addPressed) );
// del->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::delPressed) );
//
// show_all_children ();
//
// set_size_request (-1, 250);
//}
//
//void RenameTemplateEditor::refreshTemplateList ()
//{
//
// list->remove_all_columns();
//
// for (size_t i = 0; i < options.renameTemplates.size(); i++) {
// list->append (options.renameTemplates[i]);
// }
//}
//
//void RenameTemplateEditor::addPressed ()
//{
//
// if (templ->get_text() != "") {
// options.renameTemplates.push_back (templ->get_text ());
// refreshTemplateList ();
// templ->set_text("");
// }
//}
//
//void RenameTemplateEditor::delPressed ()
//{
//
// std::vector<int> sel = list->get_selected ();
//
// for (size_t i = 0; i < sel.size(); i++) {
// Glib::ustring toDel = list->get_text (sel[i]);
// std::vector<Glib::ustring>::iterator f = std::find (options.renameTemplates.begin(), options.renameTemplates.end(), toDel);
//
// if (f != options.renameTemplates.end()) {
// options.renameTemplates.erase (f);
// }
// }
//
// refreshTemplateList ();
//}
//Glib::ustring RenameDialog::applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ)
//{
//
// return Glib::ustring ("szeva");
//
//}

View File

@ -30,62 +30,19 @@ class RenameDialog : public Gtk::Dialog
protected:
// class TemplateColumns : public Gtk::TreeModel::ColumnRecord
// {
// public:
// Gtk::TreeModelColumn<Glib::ustring> tmplName;
// Gtk::TreeModelColumn<bool> rowSeparator;
// TemplateColumns()
// {
// add(tmplName);
// add(rowSeparator);
// }
// };
// TemplateColumns templateColumns;
// Glib::RefPtr<Gtk::ListStore> templateModel;
Gtk::Window* p;
Gtk::Label* oldName;
Gtk::Entry* newName;
// Gtk::CheckButton* useTmpl;
// MyComboBox* templates;
// Gtk::Button* all;
const CacheImageData* imageData;
// void fillTemplateList ();
public:
explicit RenameDialog (Gtk::Window* parent);
void initName (const Glib::ustring& iname, const CacheImageData* cid);
Glib::ustring getNewName ();
// bool rowSeparatorFunc (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::iterator& iter);
// void tmplSelectionChanged ();
// void useTemplToggled ();
// bool isTemplSelected ();
// Glib::ustring getActiveTemplate ();
// static Glib::ustring applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ);
};
//class RenameTemplateEditor : public Gtk::Dialog
//{
//
//protected:
// Gtk::ListViewText* list;
// Gtk::Entry* templ;
//
// void refreshTemplateList ();
//public:
// explicit RenameTemplateEditor (Gtk::Window* parent);
//
// Glib::ustring getSelectedTemplate ();
//
// void addPressed ();
// void delPressed ();
//};
#endif

View File

@ -273,10 +273,6 @@ void Resize::adjusterChanged(Adjuster* a, double newval)
}
}
void Resize::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
int Resize::getComputedWidth()
{

View File

@ -46,7 +46,6 @@ public:
void setBatchMode (bool batchMode) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled(Adjuster* a, bool newval) override;
void entryWChanged ();
void entryHChanged ();
void appliesToChanged ();

View File

@ -1362,10 +1362,6 @@ void Retinex::adjusterChanged(Adjuster* a, double newval)
}
}
void Retinex::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void Retinex::autoOpenCurve ()
{
cdshape->openIfNonlinear();

View File

@ -104,7 +104,6 @@ public:
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void trimValues (rtengine::procparams::ProcParams* pp) override;
void adjusterChanged (Adjuster* a, double newval) override;
void adjusterAutoToggled (Adjuster* a, bool newval) override;
void autoOpenCurve () override;
void medianmapChanged ();
void minmaxChanged (double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) override;

View File

@ -96,10 +96,6 @@ void Rotate::adjusterChanged(Adjuster* a, double newval)
}
}
void Rotate::adjusterAutoToggled(Adjuster* a, bool newval)
{
}
void Rotate::straighten (double deg)
{

Some files were not shown because too many files have changed in this diff Show More