run through astyle
This commit is contained in:
parent
610f3e4853
commit
f70ba32c9d
File diff suppressed because it is too large
Load Diff
@ -46,12 +46,12 @@ struct EditorPanelIdleHelper {
|
|||||||
|
|
||||||
class RTWindow;
|
class RTWindow;
|
||||||
class EditorPanel final :
|
class EditorPanel final :
|
||||||
public Gtk::VBox,
|
public Gtk::VBox,
|
||||||
public PParamsChangeListener,
|
public PParamsChangeListener,
|
||||||
public rtengine::ProgressListener,
|
public rtengine::ProgressListener,
|
||||||
public ThumbnailListener,
|
public ThumbnailListener,
|
||||||
public HistoryBeforeLineListener,
|
public HistoryBeforeLineListener,
|
||||||
public rtengine::HistogramListener
|
public rtengine::HistogramListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit EditorPanel (FilePanel* filePanel = nullptr);
|
explicit EditorPanel (FilePanel* filePanel = nullptr);
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void writeOptions();
|
void writeOptions();
|
||||||
void writeToolExpandedStatus(std::vector<int> &tpOpen);
|
void writeToolExpandedStatus (std::vector<int> &tpOpen);
|
||||||
|
|
||||||
void showTopPanel (bool show);
|
void showTopPanel (bool show);
|
||||||
bool isRealized()
|
bool isRealized()
|
||||||
@ -131,14 +131,14 @@ public:
|
|||||||
{
|
{
|
||||||
return isProcessing;
|
return isProcessing;
|
||||||
}
|
}
|
||||||
void updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC);
|
void updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC);
|
||||||
void updateTPVScrollbar (bool hide);
|
void updateTPVScrollbar (bool hide);
|
||||||
void updateTabsUsesIcons (bool useIcons);
|
void updateTabsUsesIcons (bool useIcons);
|
||||||
void updateHistogramPosition (int oldPosition, int newPosition);
|
void updateHistogramPosition (int oldPosition, int newPosition);
|
||||||
|
|
||||||
void defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile);
|
void defaultMonitorProfileChanged (const Glib::ustring &profile_name, bool auto_monitor_profile);
|
||||||
|
|
||||||
bool saveImmediately(const Glib::ustring &filename, const SaveFormat &sf);
|
bool saveImmediately (const Glib::ustring &filename, const SaveFormat &sf);
|
||||||
|
|
||||||
Gtk::Paned* catalogPane;
|
Gtk::Paned* catalogPane;
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ void Options::setDefaults ()
|
|||||||
#endif
|
#endif
|
||||||
// rtSettings.viewingdevice = 0;
|
// rtSettings.viewingdevice = 0;
|
||||||
// rtSettings.viewingdevicegrey = 3;
|
// rtSettings.viewingdevicegrey = 3;
|
||||||
// rtSettings.viewinggreySc = 1;
|
// rtSettings.viewinggreySc = 1;
|
||||||
rtSettings.leveldnv = 2;
|
rtSettings.leveldnv = 2;
|
||||||
rtSettings.leveldnti = 0;
|
rtSettings.leveldnti = 0;
|
||||||
rtSettings.leveldnaut = 0;
|
rtSettings.leveldnaut = 0;
|
||||||
@ -1435,8 +1435,9 @@ int Options::readFromFile (Glib::ustring fname)
|
|||||||
if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) {
|
if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) {
|
||||||
tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded");
|
tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded");
|
||||||
}
|
}
|
||||||
if (keyFile.has_key("GUI", "ToolPanelsExpandedAutoSave")) {
|
|
||||||
autoSaveTpOpen = keyFile.get_boolean("GUI", "ToolPanelsExpandedAutoSave");
|
if (keyFile.has_key ("GUI", "ToolPanelsExpandedAutoSave")) {
|
||||||
|
autoSaveTpOpen = keyFile.get_boolean ("GUI", "ToolPanelsExpandedAutoSave");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyFile.has_key ("GUI", "MultiDisplayMode")) {
|
if (keyFile.has_key ("GUI", "MultiDisplayMode")) {
|
||||||
@ -1561,11 +1562,11 @@ int Options::readFromFile (Glib::ustring fname)
|
|||||||
rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey");
|
rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if (keyFile.has_key ("Color Management", "greySc")) {
|
if (keyFile.has_key ("Color Management", "greySc")) {
|
||||||
rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc");
|
rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (keyFile.has_key ("Color Management", "CBDLArtif")) {
|
if (keyFile.has_key ("Color Management", "CBDLArtif")) {
|
||||||
rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif");
|
rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif");
|
||||||
}
|
}
|
||||||
@ -2104,7 +2105,7 @@ int Options::saveToFile (Glib::ustring fname)
|
|||||||
keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled);
|
keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled);
|
||||||
Glib::ArrayHandle<int> tpopen = tpOpen;
|
Glib::ArrayHandle<int> tpopen = tpOpen;
|
||||||
keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen);
|
keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen);
|
||||||
keyFile.set_boolean("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen);
|
keyFile.set_boolean ("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen);
|
||||||
keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode);
|
keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode);
|
||||||
keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush);
|
keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush);
|
||||||
keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush);
|
keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush);
|
||||||
|
@ -42,17 +42,16 @@
|
|||||||
// Special name for the Dynamic profile
|
// Special name for the Dynamic profile
|
||||||
#define DEFPROFILE_DYNAMIC "Dynamic"
|
#define DEFPROFILE_DYNAMIC "Dynamic"
|
||||||
|
|
||||||
struct SaveFormat
|
struct SaveFormat {
|
||||||
{
|
|
||||||
SaveFormat() :
|
SaveFormat() :
|
||||||
format("jpg"),
|
format ("jpg"),
|
||||||
pngBits(8),
|
pngBits (8),
|
||||||
pngCompression(6),
|
pngCompression (6),
|
||||||
jpegQuality(90),
|
jpegQuality (90),
|
||||||
jpegSubSamp(2),
|
jpegSubSamp (2),
|
||||||
tiffBits(8),
|
tiffBits (8),
|
||||||
tiffUncompressed(true),
|
tiffUncompressed (true),
|
||||||
saveParams(true)
|
saveParams (true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,8 +78,8 @@ private:
|
|||||||
bool defProfImgMissing;
|
bool defProfImgMissing;
|
||||||
Glib::ustring userProfilePath;
|
Glib::ustring userProfilePath;
|
||||||
Glib::ustring globalProfilePath;
|
Glib::ustring globalProfilePath;
|
||||||
bool checkProfilePath(Glib::ustring &path);
|
bool checkProfilePath (Glib::ustring &path);
|
||||||
bool checkDirPath(Glib::ustring &path, Glib::ustring errString);
|
bool checkDirPath (Glib::ustring &path, Glib::ustring errString);
|
||||||
void updatePaths();
|
void updatePaths();
|
||||||
int getString (const char* src, char* dst);
|
int getString (const char* src, char* dst);
|
||||||
void error (int line);
|
void error (int line);
|
||||||
@ -95,8 +94,8 @@ private:
|
|||||||
* @param destination destination variable to store to
|
* @param destination destination variable to store to
|
||||||
* @return @c true if @p destination was changed
|
* @return @c true if @p destination was changed
|
||||||
*/
|
*/
|
||||||
bool safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& section,
|
bool safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section,
|
||||||
const Glib::ustring& entryName, Glib::ustring& destination);
|
const Glib::ustring& entryName, Glib::ustring& destination);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -342,10 +341,10 @@ public:
|
|||||||
{
|
{
|
||||||
return globalProfilePath;
|
return globalProfilePath;
|
||||||
}
|
}
|
||||||
Glib::ustring findProfilePath(Glib::ustring &profName);
|
Glib::ustring findProfilePath (Glib::ustring &profName);
|
||||||
bool is_parse_extention (Glib::ustring fname);
|
bool is_parse_extention (Glib::ustring fname);
|
||||||
bool has_retained_extention (Glib::ustring fname);
|
bool has_retained_extention (Glib::ustring fname);
|
||||||
bool is_extention_enabled(Glib::ustring ext);
|
bool is_extention_enabled (Glib::ustring ext);
|
||||||
bool is_defProfRawMissing()
|
bool is_defProfRawMissing()
|
||||||
{
|
{
|
||||||
return defProfRawMissing;
|
return defProfRawMissing;
|
||||||
@ -354,11 +353,11 @@ public:
|
|||||||
{
|
{
|
||||||
return defProfImgMissing;
|
return defProfImgMissing;
|
||||||
}
|
}
|
||||||
void setDefProfRawMissing(bool value)
|
void setDefProfRawMissing (bool value)
|
||||||
{
|
{
|
||||||
defProfRawMissing = value;
|
defProfRawMissing = value;
|
||||||
}
|
}
|
||||||
void setDefProfImgMissing(bool value)
|
void setDefProfImgMissing (bool value)
|
||||||
{
|
{
|
||||||
defProfImgMissing = value;
|
defProfImgMissing = value;
|
||||||
}
|
}
|
||||||
|
@ -878,14 +878,14 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
|||||||
grey->append (M("PREFERENCES_GREY30"));
|
grey->append (M("PREFERENCES_GREY30"));
|
||||||
grey->append (M("PREFERENCES_GREY40"));
|
grey->append (M("PREFERENCES_GREY40"));
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START));
|
Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START));
|
||||||
setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||||
greySc = Gtk::manage (new Gtk::ComboBoxText ());
|
greySc = Gtk::manage (new Gtk::ComboBoxText ());
|
||||||
setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||||
greySc->append (M ("PREFERENCES_GREYSCA"));
|
greySc->append (M ("PREFERENCES_GREYSCA"));
|
||||||
greySc->append (M ("PREFERENCES_GREYSC18"));
|
greySc->append (M ("PREFERENCES_GREYSC18"));
|
||||||
*/
|
*/
|
||||||
Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) );
|
Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) );
|
||||||
setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
|
||||||
|
|
||||||
@ -986,18 +986,17 @@ Gtk::Widget* Preferences::getGeneralPanel ()
|
|||||||
workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1);
|
workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1);
|
||||||
workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1);
|
workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1);
|
||||||
workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1);
|
workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1);
|
||||||
ckbAutoSaveTpOpen = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_AUTOSAVE_TP_OPEN")));
|
ckbAutoSaveTpOpen = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_AUTOSAVE_TP_OPEN")));
|
||||||
workflowGrid->attach_next_to(*ckbAutoSaveTpOpen, *hb4label, Gtk::POS_BOTTOM, 1, 1);
|
workflowGrid->attach_next_to (*ckbAutoSaveTpOpen, *hb4label, Gtk::POS_BOTTOM, 1, 1);
|
||||||
btnSaveTpOpenNow = Gtk::manage(new Gtk::Button(M("PREFERENCES_SAVE_TP_OPEN_NOW")));
|
btnSaveTpOpenNow = Gtk::manage (new Gtk::Button (M ("PREFERENCES_SAVE_TP_OPEN_NOW")));
|
||||||
setExpandAlignProperties(btnSaveTpOpenNow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
|
setExpandAlignProperties (btnSaveTpOpenNow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
|
||||||
workflowGrid->attach_next_to(*btnSaveTpOpenNow, *ckbAutoSaveTpOpen, Gtk::POS_RIGHT, 1, 1);
|
workflowGrid->attach_next_to (*btnSaveTpOpenNow, *ckbAutoSaveTpOpen, Gtk::POS_RIGHT, 1, 1);
|
||||||
|
|
||||||
auto save_tp_open_now =
|
auto save_tp_open_now =
|
||||||
[&]() -> void
|
[&]() -> void {
|
||||||
{
|
parent->writeToolExpandedStatus (moptions.tpOpen);
|
||||||
parent->writeToolExpandedStatus(moptions.tpOpen);
|
};
|
||||||
};
|
btnSaveTpOpenNow->signal_clicked().connect (save_tp_open_now);
|
||||||
btnSaveTpOpenNow->signal_clicked().connect(save_tp_open_now);
|
|
||||||
|
|
||||||
fworklflow->add (*workflowGrid);
|
fworklflow->add (*workflowGrid);
|
||||||
|
|
||||||
@ -2024,7 +2023,7 @@ void Preferences::fillPreferences ()
|
|||||||
ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar);
|
ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar);
|
||||||
ckbUseIconNoText->set_active (moptions.UseIconNoText);
|
ckbUseIconNoText->set_active (moptions.UseIconNoText);
|
||||||
|
|
||||||
ckbAutoSaveTpOpen->set_active(moptions.autoSaveTpOpen);
|
ckbAutoSaveTpOpen->set_active (moptions.autoSaveTpOpen);
|
||||||
|
|
||||||
rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit);
|
rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit);
|
||||||
clutCacheSizeSB->set_value (moptions.clutCacheSize);
|
clutCacheSizeSB->set_value (moptions.clutCacheSize);
|
||||||
|
@ -36,8 +36,8 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
|
|||||||
Gtk::TreeModelColumn<Glib::ustring> ext;
|
Gtk::TreeModelColumn<Glib::ustring> ext;
|
||||||
ExtensionColumns()
|
ExtensionColumns()
|
||||||
{
|
{
|
||||||
add(enabled);
|
add (enabled);
|
||||||
add(ext);
|
add (ext);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ExtensionColumns extensionColumns;
|
ExtensionColumns extensionColumns;
|
||||||
@ -54,11 +54,11 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
|
|||||||
Gtk::TreeModelColumn<int> addsetid;
|
Gtk::TreeModelColumn<int> addsetid;
|
||||||
BehavColumns()
|
BehavColumns()
|
||||||
{
|
{
|
||||||
add(label);
|
add (label);
|
||||||
add(badd);
|
add (badd);
|
||||||
add(bset);
|
add (bset);
|
||||||
add(visible);
|
add (visible);
|
||||||
add(addsetid);
|
add (addsetid);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
|
|||||||
Glib::ustring shortFName;
|
Glib::ustring shortFName;
|
||||||
Glib::ustring longFName;
|
Glib::ustring longFName;
|
||||||
|
|
||||||
ThemeFilename (Glib::ustring sfname, Glib::ustring lfname) : shortFName(sfname), longFName(lfname) {}
|
ThemeFilename (Glib::ustring sfname, Glib::ustring lfname) : shortFName (sfname), longFName (lfname) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::TreeStore> behModel;
|
Glib::RefPtr<Gtk::TreeStore> behModel;
|
||||||
@ -122,7 +122,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
|
|||||||
Gtk::SpinButton* panFactor;
|
Gtk::SpinButton* panFactor;
|
||||||
Gtk::CheckButton* rememberZoomPanCheckbutton;
|
Gtk::CheckButton* rememberZoomPanCheckbutton;
|
||||||
|
|
||||||
// Gtk::ComboBoxText* view;
|
// Gtk::ComboBoxText* view;
|
||||||
// Gtk::ComboBoxText* grey;
|
// Gtk::ComboBoxText* grey;
|
||||||
// Gtk::ComboBoxText* greySc;
|
// Gtk::ComboBoxText* greySc;
|
||||||
Gtk::ComboBoxText* dnv;
|
Gtk::ComboBoxText* dnv;
|
||||||
@ -235,9 +235,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
|
|||||||
void iccDirChanged ();
|
void iccDirChanged ();
|
||||||
void switchThemeTo (Glib::ustring newTheme);
|
void switchThemeTo (Glib::ustring newTheme);
|
||||||
void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize);
|
void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize);
|
||||||
bool splashClosed(GdkEventAny* event);
|
bool splashClosed (GdkEventAny* event);
|
||||||
|
|
||||||
int getThemeRowNumber(Glib::ustring& longThemeFName);
|
int getThemeRowNumber (Glib::ustring& longThemeFName);
|
||||||
|
|
||||||
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
||||||
|
|
||||||
|
@ -32,27 +32,27 @@ static gboolean
|
|||||||
osx_should_quit_cb (GtkosxApplication *app, gpointer data)
|
osx_should_quit_cb (GtkosxApplication *app, gpointer data)
|
||||||
{
|
{
|
||||||
RTWindow *rtWin = (RTWindow *)data;
|
RTWindow *rtWin = (RTWindow *)data;
|
||||||
return rtWin->on_delete_event(0);
|
return rtWin->on_delete_event (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
osx_will_quit_cb (GtkosxApplication *app, gpointer data)
|
osx_will_quit_cb (GtkosxApplication *app, gpointer data)
|
||||||
{
|
{
|
||||||
RTWindow *rtWin = (RTWindow *)data;
|
RTWindow *rtWin = (RTWindow *)data;
|
||||||
rtWin->on_delete_event(0);
|
rtWin->on_delete_event (0);
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::osxFileOpenEvent(Glib::ustring path)
|
bool RTWindow::osxFileOpenEvent (Glib::ustring path)
|
||||||
{
|
{
|
||||||
|
|
||||||
CacheManager* cm = CacheManager::getInstance();
|
CacheManager* cm = CacheManager::getInstance();
|
||||||
Thumbnail* thm = cm->getEntry( path );
|
Thumbnail* thm = cm->getEntry ( path );
|
||||||
|
|
||||||
if(thm && fpanel) {
|
if (thm && fpanel) {
|
||||||
std::vector<Thumbnail*> entries;
|
std::vector<Thumbnail*> entries;
|
||||||
entries.push_back(thm);
|
entries.push_back (thm);
|
||||||
fpanel->fileCatalog->openRequested(entries);
|
fpanel->fileCatalog->openRequested (entries);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,25 +69,25 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::ustring path = Glib::ustring(path_);
|
Glib::ustring path = Glib::ustring (path_);
|
||||||
Glib::ustring suffix = path.length() > 4 ? path.substr(path.length() - 3) : "";
|
Glib::ustring suffix = path.length() > 4 ? path.substr (path.length() - 3) : "";
|
||||||
suffix = suffix.lowercase();
|
suffix = suffix.lowercase();
|
||||||
|
|
||||||
if (suffix == "pp3") {
|
if (suffix == "pp3") {
|
||||||
path = path.substr(0, path.length() - 4);
|
path = path.substr (0, path.length() - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rtWin->osxFileOpenEvent(path);
|
return rtWin->osxFileOpenEvent (path);
|
||||||
}
|
}
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
RTWindow::RTWindow ()
|
RTWindow::RTWindow ()
|
||||||
: mainNB(nullptr)
|
: mainNB (nullptr)
|
||||||
, bpanel(nullptr)
|
, bpanel (nullptr)
|
||||||
, splash(nullptr)
|
, splash (nullptr)
|
||||||
, btn_fullscreen(nullptr)
|
, btn_fullscreen (nullptr)
|
||||||
, epanel(nullptr)
|
, epanel (nullptr)
|
||||||
, fpanel(nullptr)
|
, fpanel (nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
cacheMgr->init ();
|
cacheMgr->init ();
|
||||||
@ -95,11 +95,11 @@ RTWindow::RTWindow ()
|
|||||||
ProfilePanel::init (this);
|
ProfilePanel::init (this);
|
||||||
|
|
||||||
Glib::ustring fName = "rt-logo-small.png";
|
Glib::ustring fName = "rt-logo-small.png";
|
||||||
Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName);
|
Glib::ustring fullPath = rtengine::findIconAbsolutePath (fName);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
set_default_icon_from_file (fullPath);
|
set_default_icon_from_file (fullPath);
|
||||||
} catch(Glib::Exception& ex) {
|
} catch (Glib::Exception& ex) {
|
||||||
printf ("%s\n", ex.what().c_str());
|
printf ("%s\n", ex.what().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,55 +122,57 @@ RTWindow::RTWindow ()
|
|||||||
#endif
|
#endif
|
||||||
versionStr = "RawTherapee " + versionString;
|
versionStr = "RawTherapee " + versionString;
|
||||||
|
|
||||||
set_title_decorated("");
|
set_title_decorated ("");
|
||||||
set_resizable(true);
|
set_resizable (true);
|
||||||
set_decorated(true);
|
set_decorated (true);
|
||||||
set_default_size(options.windowWidth, options.windowHeight);
|
set_default_size (options.windowWidth, options.windowHeight);
|
||||||
set_modal(false);
|
set_modal (false);
|
||||||
|
|
||||||
Gdk::Rectangle lMonitorRect;
|
Gdk::Rectangle lMonitorRect;
|
||||||
get_screen()->get_monitor_geometry(std::min(options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect);
|
get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect);
|
||||||
|
|
||||||
if (options.windowMaximized) {
|
if (options.windowMaximized) {
|
||||||
move(lMonitorRect.get_x(), lMonitorRect.get_y());
|
move (lMonitorRect.get_x(), lMonitorRect.get_y());
|
||||||
maximize();
|
maximize();
|
||||||
} else {
|
} else {
|
||||||
unmaximize();
|
unmaximize();
|
||||||
resize(options.windowWidth, options.windowHeight);
|
resize (options.windowWidth, options.windowHeight);
|
||||||
if(options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) {
|
|
||||||
move(options.windowX, options.windowY);
|
if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) {
|
||||||
|
move (options.windowX, options.windowY);
|
||||||
} else {
|
} else {
|
||||||
move(lMonitorRect.get_x(), lMonitorRect.get_y());
|
move (lMonitorRect.get_x(), lMonitorRect.get_y());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
on_delete_has_run = false;
|
on_delete_has_run = false;
|
||||||
is_fullscreen = false;
|
is_fullscreen = false;
|
||||||
property_destroy_with_parent().set_value(false);
|
property_destroy_with_parent().set_value (false);
|
||||||
signal_window_state_event().connect( sigc::mem_fun(*this, &RTWindow::on_window_state_event) );
|
signal_window_state_event().connect ( sigc::mem_fun (*this, &RTWindow::on_window_state_event) );
|
||||||
signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) );
|
signal_key_press_event().connect ( sigc::mem_fun (*this, &RTWindow::keyPressed) );
|
||||||
|
|
||||||
if(simpleEditor) {
|
if (simpleEditor) {
|
||||||
epanel = Gtk::manage( new EditorPanel (nullptr) );
|
epanel = Gtk::manage ( new EditorPanel (nullptr) );
|
||||||
epanel->setParent (this);
|
epanel->setParent (this);
|
||||||
epanel->setParentWindow(this);
|
epanel->setParentWindow (this);
|
||||||
add (*epanel);
|
add (*epanel);
|
||||||
show_all ();
|
show_all ();
|
||||||
|
|
||||||
pldBridge = nullptr; // No progress listener
|
pldBridge = nullptr; // No progress listener
|
||||||
|
|
||||||
CacheManager* cm = CacheManager::getInstance();
|
CacheManager* cm = CacheManager::getInstance();
|
||||||
Thumbnail* thm = cm->getEntry( argv1 );
|
Thumbnail* thm = cm->getEntry ( argv1 );
|
||||||
|
|
||||||
if(thm) {
|
if (thm) {
|
||||||
int error;
|
int error;
|
||||||
rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr);
|
rtengine::InitialImage *ii = rtengine::InitialImage::load (argv1, thm->getType() == FT_Raw, &error, nullptr);
|
||||||
epanel->open( thm, ii );
|
epanel->open ( thm, ii );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mainNB = Gtk::manage (new Gtk::Notebook ());
|
mainNB = Gtk::manage (new Gtk::Notebook ());
|
||||||
mainNB->set_name ("MainNotebook");
|
mainNB->set_name ("MainNotebook");
|
||||||
mainNB->set_scrollable (true);
|
mainNB->set_scrollable (true);
|
||||||
mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) );
|
mainNB->signal_switch_page().connect_notify ( sigc::mem_fun (*this, &RTWindow::on_mainNB_switch_page) );
|
||||||
|
|
||||||
// Editor panel
|
// Editor panel
|
||||||
fpanel = new FilePanel () ;
|
fpanel = new FilePanel () ;
|
||||||
@ -178,20 +180,20 @@ RTWindow::RTWindow ()
|
|||||||
|
|
||||||
// decorate tab
|
// decorate tab
|
||||||
Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ());
|
Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ());
|
||||||
setExpandAlignProperties(fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
Gtk::Label* fpl = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") ));
|
Gtk::Label* fpl = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") ));
|
||||||
|
|
||||||
if (options.mainNBVertical) {
|
if (options.mainNBVertical) {
|
||||||
mainNB->set_tab_pos (Gtk::POS_LEFT);
|
mainNB->set_tab_pos (Gtk::POS_LEFT);
|
||||||
fpl->set_angle (90);
|
fpl->set_angle (90);
|
||||||
fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1);
|
fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1);
|
||||||
fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_TOP, 1, 1);
|
fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_TOP, 1, 1);
|
||||||
} else {
|
} else {
|
||||||
fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1);
|
fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1);
|
||||||
fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_RIGHT, 1, 1);
|
fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_RIGHT, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fpanelLabelGrid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
|
fpanelLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
|
||||||
fpanelLabelGrid->show_all ();
|
fpanelLabelGrid->show_all ();
|
||||||
mainNB->append_page (*fpanel, *fpanelLabelGrid);
|
mainNB->append_page (*fpanel, *fpanelLabelGrid);
|
||||||
|
|
||||||
@ -200,16 +202,16 @@ RTWindow::RTWindow ()
|
|||||||
bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) );
|
bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) );
|
||||||
|
|
||||||
// decorate tab, the label is unimportant since its updated in batchqueuepanel anyway
|
// decorate tab, the label is unimportant since its updated in batchqueuepanel anyway
|
||||||
Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) );
|
Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M ("MAIN_FRAME_BATCHQUEUE")) );
|
||||||
|
|
||||||
if (options.mainNBVertical) {
|
if (options.mainNBVertical) {
|
||||||
lbq->set_angle(90);
|
lbq->set_angle (90);
|
||||||
}
|
}
|
||||||
|
|
||||||
mainNB->append_page (*bpanel, *lbq);
|
mainNB->append_page (*bpanel, *lbq);
|
||||||
|
|
||||||
|
|
||||||
if(isSingleTabMode()) {
|
if (isSingleTabMode()) {
|
||||||
createSetmEditor();
|
createSetmEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,46 +227,46 @@ RTWindow::RTWindow ()
|
|||||||
//Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !?
|
//Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !?
|
||||||
//Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"..."));
|
//Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"..."));
|
||||||
Gtk::Button* preferences = Gtk::manage (new Gtk::Button ());
|
Gtk::Button* preferences = Gtk::manage (new Gtk::Button ());
|
||||||
setExpandAlignProperties(preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
preferences->set_image (*Gtk::manage(new RTImage ("gtk-preferences.png")));
|
preferences->set_image (*Gtk::manage (new RTImage ("gtk-preferences.png")));
|
||||||
preferences->set_tooltip_markup (M("MAIN_BUTTON_PREFERENCES"));
|
preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES"));
|
||||||
preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) );
|
preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) );
|
||||||
|
|
||||||
//btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN")));
|
//btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN")));
|
||||||
btn_fullscreen = Gtk::manage( new Gtk::Button());
|
btn_fullscreen = Gtk::manage ( new Gtk::Button());
|
||||||
setExpandAlignProperties(btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
btn_fullscreen->set_tooltip_markup (M("MAIN_BUTTON_FULLSCREEN"));
|
btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN"));
|
||||||
btn_fullscreen->set_image (*iFullscreen);
|
btn_fullscreen->set_image (*iFullscreen);
|
||||||
btn_fullscreen->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::toggle_fullscreen) );
|
btn_fullscreen->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::toggle_fullscreen) );
|
||||||
setExpandAlignProperties(&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
prProgBar.set_show_text(true);
|
prProgBar.set_show_text (true);
|
||||||
|
|
||||||
Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ());
|
Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ());
|
||||||
actionGrid->set_row_spacing(2);
|
actionGrid->set_row_spacing (2);
|
||||||
actionGrid->set_column_spacing(2);
|
actionGrid->set_column_spacing (2);
|
||||||
|
|
||||||
setExpandAlignProperties(actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
|
|
||||||
if (options.mainNBVertical) {
|
if (options.mainNBVertical) {
|
||||||
prProgBar.set_orientation(Gtk::ORIENTATION_VERTICAL);
|
prProgBar.set_orientation (Gtk::ORIENTATION_VERTICAL);
|
||||||
prProgBar.set_inverted(true);
|
prProgBar.set_inverted (true);
|
||||||
actionGrid->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL);
|
||||||
actionGrid->attach_next_to(prProgBar, Gtk::POS_BOTTOM, 1, 1);
|
actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1);
|
||||||
actionGrid->attach_next_to(*preferences, Gtk::POS_BOTTOM, 1, 1);
|
actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1);
|
||||||
actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1);
|
actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1);
|
||||||
mainNB->set_action_widget(actionGrid, Gtk::PACK_END);
|
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
|
||||||
} else {
|
} else {
|
||||||
prProgBar.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
prProgBar.set_orientation (Gtk::ORIENTATION_HORIZONTAL);
|
||||||
actionGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL);
|
||||||
actionGrid->attach_next_to(prProgBar, Gtk::POS_RIGHT, 1, 1);
|
actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1);
|
||||||
actionGrid->attach_next_to(*preferences, Gtk::POS_RIGHT, 1, 1);
|
actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1);
|
||||||
actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_RIGHT, 1, 1);
|
actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1);
|
||||||
mainNB->set_action_widget(actionGrid, Gtk::PACK_END);
|
mainNB->set_action_widget (actionGrid, Gtk::PACK_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
actionGrid->show_all();
|
actionGrid->show_all();
|
||||||
|
|
||||||
pldBridge = new PLDBridge(static_cast<rtengine::ProgressListener*>(this));
|
pldBridge = new PLDBridge (static_cast<rtengine::ProgressListener*> (this));
|
||||||
|
|
||||||
add (*mainNB);
|
add (*mainNB);
|
||||||
show_all ();
|
show_all ();
|
||||||
@ -272,9 +274,10 @@ RTWindow::RTWindow ()
|
|||||||
bpanel->init (this);
|
bpanel->init (this);
|
||||||
|
|
||||||
if (!argv1.empty() && !remote) {
|
if (!argv1.empty() && !remote) {
|
||||||
Thumbnail* thm = cacheMgr->getEntry(argv1);
|
Thumbnail* thm = cacheMgr->getEntry (argv1);
|
||||||
|
|
||||||
if (thm) {
|
if (thm) {
|
||||||
fpanel->fileCatalog->openRequested({thm});
|
fpanel->fileCatalog->openRequested ({thm});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,7 +285,7 @@ RTWindow::RTWindow ()
|
|||||||
|
|
||||||
RTWindow::~RTWindow()
|
RTWindow::~RTWindow()
|
||||||
{
|
{
|
||||||
if(!simpleEditor) {
|
if (!simpleEditor) {
|
||||||
delete pldBridge;
|
delete pldBridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +303,7 @@ void RTWindow::on_realize ()
|
|||||||
{
|
{
|
||||||
Gtk::Window::on_realize ();
|
Gtk::Window::on_realize ();
|
||||||
|
|
||||||
if( fpanel ) {
|
if ( fpanel ) {
|
||||||
fpanel->setAspect();
|
fpanel->setAspect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,19 +311,20 @@ void RTWindow::on_realize ()
|
|||||||
epanel->setAspect();
|
epanel->setAspect();
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindowCursorManager.init(get_window());
|
mainWindowCursorManager.init (get_window());
|
||||||
|
|
||||||
// Display release notes only if new major version.
|
// Display release notes only if new major version.
|
||||||
// Pattern matches "5.1" from "5.1-23-g12345678"
|
// Pattern matches "5.1" from "5.1-23-g12345678"
|
||||||
std::string vs[] = {versionString, options.version};
|
std::string vs[] = {versionString, options.version};
|
||||||
std::regex pat("(^[0-9.]+).*");
|
std::regex pat ("(^[0-9.]+).*");
|
||||||
std::smatch sm;
|
std::smatch sm;
|
||||||
std::vector<std::string> vMajor;
|
std::vector<std::string> vMajor;
|
||||||
|
|
||||||
for (const auto &v : vs) {
|
for (const auto &v : vs) {
|
||||||
if (std::regex_match(v, sm, pat)) {
|
if (std::regex_match (v, sm, pat)) {
|
||||||
if (sm.size() == 2) {
|
if (sm.size() == 2) {
|
||||||
std::ssub_match smsub = sm[1];
|
std::ssub_match smsub = sm[1];
|
||||||
vMajor.push_back(smsub.str());
|
vMajor.push_back (smsub.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -333,7 +337,7 @@ void RTWindow::on_realize ()
|
|||||||
|
|
||||||
splash = new Splash (*this);
|
splash = new Splash (*this);
|
||||||
splash->set_transient_for (*this);
|
splash->set_transient_for (*this);
|
||||||
splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) );
|
splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) );
|
||||||
|
|
||||||
if (splash->hasReleaseNotes()) {
|
if (splash->hasReleaseNotes()) {
|
||||||
splash->showReleaseNotes();
|
splash->showReleaseNotes();
|
||||||
@ -346,38 +350,39 @@ void RTWindow::on_realize ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::on_configure_event(GdkEventConfigure* event)
|
bool RTWindow::on_configure_event (GdkEventConfigure* event)
|
||||||
{
|
{
|
||||||
if (!is_maximized() && is_visible()) {
|
if (!is_maximized() && is_visible()) {
|
||||||
get_size(options.windowWidth, options.windowHeight);
|
get_size (options.windowWidth, options.windowHeight);
|
||||||
get_position (options.windowX, options.windowY);
|
get_position (options.windowX, options.windowY);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Gtk::Widget::on_configure_event(event);
|
return Gtk::Widget::on_configure_event (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::on_window_state_event(GdkEventWindowState* event)
|
bool RTWindow::on_window_state_event (GdkEventWindowState* event)
|
||||||
{
|
{
|
||||||
if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
|
if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
|
||||||
options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED;
|
options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED;
|
||||||
}
|
}
|
||||||
return Gtk::Widget::on_window_state_event(event);
|
|
||||||
|
return Gtk::Widget::on_window_state_event (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num)
|
void RTWindow::on_mainNB_switch_page (Gtk::Widget* widget, guint page_num)
|
||||||
{
|
{
|
||||||
if(!on_delete_has_run) {
|
if (!on_delete_has_run) {
|
||||||
if(isEditorPanel(page_num)) {
|
if (isEditorPanel (page_num)) {
|
||||||
if (isSingleTabMode() && epanel) {
|
if (isSingleTabMode() && epanel) {
|
||||||
MoveFileBrowserToEditor();
|
MoveFileBrowserToEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorPanel *ep = static_cast<EditorPanel*>(mainNB->get_nth_page(page_num));
|
EditorPanel *ep = static_cast<EditorPanel*> (mainNB->get_nth_page (page_num));
|
||||||
ep->setAspect();
|
ep->setAspect();
|
||||||
|
|
||||||
if (!isSingleTabMode()) {
|
if (!isSingleTabMode()) {
|
||||||
if (filesEdited.size() > 0) {
|
if (filesEdited.size() > 0) {
|
||||||
set_title_decorated(ep->getFileName());
|
set_title_decorated (ep->getFileName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -387,7 +392,7 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num)
|
|||||||
epanel->saveProfile();
|
epanel->saveProfile();
|
||||||
|
|
||||||
// Moving the FileBrowser only if the user has switched to the FileBrowser tab
|
// Moving the FileBrowser only if the user has switched to the FileBrowser tab
|
||||||
if (mainNB->get_nth_page(page_num) == fpanel) {
|
if (mainNB->get_nth_page (page_num) == fpanel) {
|
||||||
MoveFileBrowserToMain();
|
MoveFileBrowserToMain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -398,32 +403,32 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num)
|
|||||||
void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name)
|
void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name)
|
||||||
{
|
{
|
||||||
if (options.multiDisplayMode > 0) {
|
if (options.multiDisplayMode > 0) {
|
||||||
EditWindow * wndEdit = EditWindow::getInstance(this);
|
EditWindow * wndEdit = EditWindow::getInstance (this);
|
||||||
wndEdit->show();
|
wndEdit->show();
|
||||||
wndEdit->addEditorPanel(ep, name);
|
wndEdit->addEditorPanel (ep, name);
|
||||||
wndEdit->toFront();
|
wndEdit->toFront();
|
||||||
} else {
|
} else {
|
||||||
ep->setParent (this);
|
ep->setParent (this);
|
||||||
ep->setParentWindow(this);
|
ep->setParentWindow (this);
|
||||||
|
|
||||||
// construct closeable tab for the image
|
// construct closeable tab for the image
|
||||||
Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ());
|
Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ());
|
||||||
titleGrid->set_tooltip_markup (name);
|
titleGrid->set_tooltip_markup (name);
|
||||||
RTImage *closebimg = Gtk::manage(new RTImage ("gtk-close.png"));
|
RTImage *closebimg = Gtk::manage (new RTImage ("gtk-close.png"));
|
||||||
Gtk::Button* closeb = Gtk::manage (new Gtk::Button ());
|
Gtk::Button* closeb = Gtk::manage (new Gtk::Button ());
|
||||||
closeb->set_name ("CloseButton");
|
closeb->set_name ("CloseButton");
|
||||||
closeb->add (*closebimg);
|
closeb->add (*closebimg);
|
||||||
closeb->set_relief (Gtk::RELIEF_NONE);
|
closeb->set_relief (Gtk::RELIEF_NONE);
|
||||||
closeb->set_focus_on_click (false);
|
closeb->set_focus_on_click (false);
|
||||||
closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &RTWindow::remEditorPanel) , ep));
|
closeb->signal_clicked().connect ( sigc::bind (sigc::mem_fun (*this, &RTWindow::remEditorPanel), ep));
|
||||||
|
|
||||||
titleGrid->attach_next_to(*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1);
|
titleGrid->attach_next_to (*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1);
|
||||||
titleGrid->attach_next_to(*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1);
|
titleGrid->attach_next_to (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1);
|
||||||
titleGrid->attach_next_to(*closeb, Gtk::POS_RIGHT, 1, 1);
|
titleGrid->attach_next_to (*closeb, Gtk::POS_RIGHT, 1, 1);
|
||||||
titleGrid->show_all ();
|
titleGrid->show_all ();
|
||||||
//GTK318
|
//GTK318
|
||||||
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20
|
||||||
titleGrid->set_column_spacing(2);
|
titleGrid->set_column_spacing (2);
|
||||||
#endif
|
#endif
|
||||||
//GTK318
|
//GTK318
|
||||||
|
|
||||||
@ -432,11 +437,11 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name)
|
|||||||
mainNB->set_current_page (mainNB->page_num (*ep));
|
mainNB->set_current_page (mainNB->page_num (*ep));
|
||||||
mainNB->set_tab_reorderable (*ep, true);
|
mainNB->set_tab_reorderable (*ep, true);
|
||||||
|
|
||||||
set_title_decorated(name);
|
set_title_decorated (name);
|
||||||
epanels[ name ] = ep;
|
epanels[ name ] = ep;
|
||||||
filesEdited.insert ( name );
|
filesEdited.insert ( name );
|
||||||
fpanel->refreshEditedState (filesEdited);
|
fpanel->refreshEditedState (filesEdited);
|
||||||
ep->tbTopPanel_1_visible(false); //hide the toggle Top Panel button
|
ep->tbTopPanel_1_visible (false); //hide the toggle Top Panel button
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,8 +452,8 @@ void RTWindow::remEditorPanel (EditorPanel* ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.multiDisplayMode > 0) {
|
if (options.multiDisplayMode > 0) {
|
||||||
EditWindow * wndEdit = EditWindow::getInstance(this);
|
EditWindow * wndEdit = EditWindow::getInstance (this);
|
||||||
wndEdit->remEditorPanel(ep);
|
wndEdit->remEditorPanel (ep);
|
||||||
} else {
|
} else {
|
||||||
bool queueHadFocus = (mainNB->get_current_page() == mainNB->page_num (*bpanel));
|
bool queueHadFocus = (mainNB->get_current_page() == mainNB->page_num (*bpanel));
|
||||||
epanels.erase (ep->getFileName());
|
epanels.erase (ep->getFileName());
|
||||||
@ -457,37 +462,37 @@ void RTWindow::remEditorPanel (EditorPanel* ep)
|
|||||||
|
|
||||||
mainNB->remove_page (*ep);
|
mainNB->remove_page (*ep);
|
||||||
|
|
||||||
if (!isEditorPanel(mainNB->get_current_page())) {
|
if (!isEditorPanel (mainNB->get_current_page())) {
|
||||||
if(!queueHadFocus) {
|
if (!queueHadFocus) {
|
||||||
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_title_decorated("");
|
set_title_decorated ("");
|
||||||
} else {
|
} else {
|
||||||
EditorPanel* ep = static_cast<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
|
EditorPanel* ep = static_cast<EditorPanel*> (mainNB->get_nth_page (mainNB->get_current_page()));
|
||||||
set_title_decorated(ep->getFileName());
|
set_title_decorated (ep->getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel
|
// TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::selectEditorPanel(const std::string &name)
|
bool RTWindow::selectEditorPanel (const std::string &name)
|
||||||
{
|
{
|
||||||
if (options.multiDisplayMode > 0) {
|
if (options.multiDisplayMode > 0) {
|
||||||
EditWindow * wndEdit = EditWindow::getInstance(this);
|
EditWindow * wndEdit = EditWindow::getInstance (this);
|
||||||
|
|
||||||
if (wndEdit->selectEditorPanel(name)) {
|
if (wndEdit->selectEditorPanel (name)) {
|
||||||
set_title_decorated(name);
|
set_title_decorated (name);
|
||||||
wndEdit->toFront();
|
wndEdit->toFront();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::map<Glib::ustring, EditorPanel*>::iterator iep = epanels.find(name);
|
std::map<Glib::ustring, EditorPanel*>::iterator iep = epanels.find (name);
|
||||||
|
|
||||||
if (iep != epanels.end()) {
|
if (iep != epanels.end()) {
|
||||||
mainNB->set_current_page (mainNB->page_num (*iep->second));
|
mainNB->set_current_page (mainNB->page_num (*iep->second));
|
||||||
set_title_decorated(name);
|
set_title_decorated (name);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
//set_title_decorated(name);
|
//set_title_decorated(name);
|
||||||
@ -521,12 +526,12 @@ bool RTWindow::keyPressed (GdkEventKey* event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (try_quit) {
|
if (try_quit) {
|
||||||
if (!on_delete_event(nullptr)) {
|
if (!on_delete_event (nullptr)) {
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event->keyval == GDK_KEY_F11) {
|
if (event->keyval == GDK_KEY_F11) {
|
||||||
toggle_fullscreen();
|
toggle_fullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,40 +542,40 @@ bool RTWindow::keyPressed (GdkEventKey* event)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (ctrl) {
|
if (ctrl) {
|
||||||
switch(event->keyval) {
|
switch (event->keyval) {
|
||||||
case GDK_KEY_F2: // file browser panel
|
case GDK_KEY_F2: // file browser panel
|
||||||
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_F3: // batch queue panel
|
|
||||||
mainNB->set_current_page (mainNB->page_num (*bpanel));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_F4: //single tab mode, editor panel
|
|
||||||
if (isSingleTabMode() && epanel) {
|
|
||||||
mainNB->set_current_page (mainNB->page_num (*epanel));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_w: //multi-tab mode, close editor panel
|
|
||||||
if (!isSingleTabMode() &&
|
|
||||||
mainNB->get_current_page() != mainNB->page_num(*fpanel) &&
|
|
||||||
mainNB->get_current_page() != mainNB->page_num(*bpanel)) {
|
|
||||||
|
|
||||||
EditorPanel* ep = static_cast<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
|
|
||||||
remEditorPanel (ep);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
case GDK_KEY_F3: // batch queue panel
|
||||||
|
mainNB->set_current_page (mainNB->page_num (*bpanel));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_F4: //single tab mode, editor panel
|
||||||
|
if (isSingleTabMode() && epanel) {
|
||||||
|
mainNB->set_current_page (mainNB->page_num (*epanel));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_w: //multi-tab mode, close editor panel
|
||||||
|
if (!isSingleTabMode() &&
|
||||||
|
mainNB->get_current_page() != mainNB->page_num (*fpanel) &&
|
||||||
|
mainNB->get_current_page() != mainNB->page_num (*bpanel)) {
|
||||||
|
|
||||||
|
EditorPanel* ep = static_cast<EditorPanel*> (mainNB->get_nth_page (mainNB->get_current_page()));
|
||||||
|
remEditorPanel (ep);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) {
|
if (mainNB->get_current_page() == mainNB->page_num (*fpanel)) {
|
||||||
return fpanel->handleShortcutKey (event);
|
return fpanel->handleShortcutKey (event);
|
||||||
} else if (mainNB->get_current_page() == mainNB->page_num(*bpanel)) {
|
} else if (mainNB->get_current_page() == mainNB->page_num (*bpanel)) {
|
||||||
return bpanel->handleShortcutKey (event);
|
return bpanel->handleShortcutKey (event);
|
||||||
} else {
|
} else {
|
||||||
EditorPanel* ep = static_cast<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
|
EditorPanel* ep = static_cast<EditorPanel*> (mainNB->get_nth_page (mainNB->get_current_page()));
|
||||||
return ep->handleShortcutKey (event);
|
return ep->handleShortcutKey (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,7 +586,7 @@ void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head)
|
|||||||
{
|
{
|
||||||
|
|
||||||
std::vector<BatchQueueEntry*> entries;
|
std::vector<BatchQueueEntry*> entries;
|
||||||
entries.push_back(bqe);
|
entries.push_back (bqe);
|
||||||
bpanel->addBatchQueueJobs (entries, head);
|
bpanel->addBatchQueueJobs (entries, head);
|
||||||
fpanel->queue_draw ();
|
fpanel->queue_draw ();
|
||||||
}
|
}
|
||||||
@ -593,7 +598,7 @@ void RTWindow::addBatchQueueJobs (std::vector<BatchQueueEntry*> &entries)
|
|||||||
fpanel->queue_draw ();
|
fpanel->queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::on_delete_event(GdkEventAny* event)
|
bool RTWindow::on_delete_event (GdkEventAny* event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (on_delete_has_run) {
|
if (on_delete_has_run) {
|
||||||
@ -608,14 +613,14 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
if (isSingleTabMode() || simpleEditor) {
|
if (isSingleTabMode() || simpleEditor) {
|
||||||
isProcessing = epanel->getIsProcessing();
|
isProcessing = epanel->getIsProcessing();
|
||||||
} else if (options.multiDisplayMode > 0) {
|
} else if (options.multiDisplayMode > 0) {
|
||||||
editWindow = EditWindow::getInstance(this, false);
|
editWindow = EditWindow::getInstance (this, false);
|
||||||
isProcessing = editWindow->isProcessing();
|
isProcessing = editWindow->isProcessing();
|
||||||
} else {
|
} else {
|
||||||
int pageCount = mainNB->get_n_pages();
|
int pageCount = mainNB->get_n_pages();
|
||||||
|
|
||||||
for (int i = 0; i < pageCount && !isProcessing; i++) {
|
for (int i = 0; i < pageCount && !isProcessing; i++) {
|
||||||
if(isEditorPanel(i)) {
|
if (isEditorPanel (i)) {
|
||||||
isProcessing |= (static_cast<EditorPanel*>(mainNB->get_nth_page(i)))->getIsProcessing();
|
isProcessing |= (static_cast<EditorPanel*> (mainNB->get_nth_page (i)))->getIsProcessing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -624,11 +629,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( fpanel ) {
|
if ( fpanel ) {
|
||||||
fpanel->saveOptions ();
|
fpanel->saveOptions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bpanel ) {
|
if ( bpanel ) {
|
||||||
bpanel->saveOptions ();
|
bpanel->saveOptions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,7 +649,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
// Look at the active panel first, if any, otherwise look at the first one (sorted on the filename)
|
// Look at the active panel first, if any, otherwise look at the first one (sorted on the filename)
|
||||||
|
|
||||||
int page = mainNB->get_current_page();
|
int page = mainNB->get_current_page();
|
||||||
Gtk::Widget *w = mainNB->get_nth_page(page);
|
Gtk::Widget *w = mainNB->get_nth_page (page);
|
||||||
bool optionsWritten = false;
|
bool optionsWritten = false;
|
||||||
|
|
||||||
for (std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin(); i != epanels.end(); ++i) {
|
for (std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin(); i != epanels.end(); ++i) {
|
||||||
@ -667,11 +672,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
ProfilePanel::cleanup();
|
ProfilePanel::cleanup();
|
||||||
|
|
||||||
if (!options.windowMaximized) {
|
if (!options.windowMaximized) {
|
||||||
get_size(options.windowWidth, options.windowHeight);
|
get_size (options.windowWidth, options.windowHeight);
|
||||||
get_position (options.windowX, options.windowY);
|
get_position (options.windowX, options.windowY);
|
||||||
}
|
}
|
||||||
|
|
||||||
options.windowMonitor = get_screen()->get_monitor_at_window(get_window());
|
options.windowMonitor = get_screen()->get_monitor_at_window (get_window());
|
||||||
|
|
||||||
Options::save ();
|
Options::save ();
|
||||||
hide();
|
hide();
|
||||||
@ -681,21 +686,21 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RTWindow::writeToolExpandedStatus(std::vector<int> &tpOpen)
|
void RTWindow::writeToolExpandedStatus (std::vector<int> &tpOpen)
|
||||||
{
|
{
|
||||||
if ((isSingleTabMode() || gimpPlugin) && epanel->isRealized()) {
|
if ((isSingleTabMode() || gimpPlugin) && epanel->isRealized()) {
|
||||||
epanel->writeToolExpandedStatus(tpOpen);
|
epanel->writeToolExpandedStatus (tpOpen);
|
||||||
} else {
|
} else {
|
||||||
// Storing the options of the last EditorPanel before Gtk destroys everything
|
// Storing the options of the last EditorPanel before Gtk destroys everything
|
||||||
// Look at the active panel first, if any, otherwise look at the first one (sorted on the filename)
|
// Look at the active panel first, if any, otherwise look at the first one (sorted on the filename)
|
||||||
if (epanels.size()) {
|
if (epanels.size()) {
|
||||||
int page = mainNB->get_current_page();
|
int page = mainNB->get_current_page();
|
||||||
Gtk::Widget *w = mainNB->get_nth_page(page);
|
Gtk::Widget *w = mainNB->get_nth_page (page);
|
||||||
bool optionsWritten = false;
|
bool optionsWritten = false;
|
||||||
|
|
||||||
for (std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin(); i != epanels.end(); ++i) {
|
for (std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin(); i != epanels.end(); ++i) {
|
||||||
if (i->second == w) {
|
if (i->second == w) {
|
||||||
i->second->writeToolExpandedStatus(tpOpen);
|
i->second->writeToolExpandedStatus (tpOpen);
|
||||||
optionsWritten = true;
|
optionsWritten = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -703,7 +708,7 @@ void RTWindow::writeToolExpandedStatus(std::vector<int> &tpOpen)
|
|||||||
if (!optionsWritten) {
|
if (!optionsWritten) {
|
||||||
// fallback solution: save the options of the first editor panel
|
// fallback solution: save the options of the first editor panel
|
||||||
std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin();
|
std::map<Glib::ustring, EditorPanel*>::iterator i = epanels.begin();
|
||||||
i->second->writeToolExpandedStatus(tpOpen);
|
i->second->writeToolExpandedStatus (tpOpen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -717,11 +722,13 @@ void RTWindow::showPreferences ()
|
|||||||
delete pref;
|
delete pref;
|
||||||
|
|
||||||
fpanel->optionsChanged ();
|
fpanel->optionsChanged ();
|
||||||
|
|
||||||
if (epanel) {
|
if (epanel) {
|
||||||
epanel->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &p : epanels) {
|
for (const auto &p : epanels) {
|
||||||
p.second->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -754,7 +761,7 @@ void RTWindow::toggle_fullscreen ()
|
|||||||
|
|
||||||
if (btn_fullscreen) {
|
if (btn_fullscreen) {
|
||||||
//btn_fullscreen->set_label(M("MAIN_BUTTON_FULLSCREEN"));
|
//btn_fullscreen->set_label(M("MAIN_BUTTON_FULLSCREEN"));
|
||||||
btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_FULLSCREEN"));
|
btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN"));
|
||||||
btn_fullscreen->set_image (*iFullscreen);
|
btn_fullscreen->set_image (*iFullscreen);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -763,7 +770,7 @@ void RTWindow::toggle_fullscreen ()
|
|||||||
|
|
||||||
if (btn_fullscreen) {
|
if (btn_fullscreen) {
|
||||||
//btn_fullscreen->set_label(M("MAIN_BUTTON_UNFULLSCREEN"));
|
//btn_fullscreen->set_label(M("MAIN_BUTTON_UNFULLSCREEN"));
|
||||||
btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_UNFULLSCREEN"));
|
btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_UNFULLSCREEN"));
|
||||||
btn_fullscreen->set_image (*iFullscreen_exit);
|
btn_fullscreen->set_image (*iFullscreen_exit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -786,50 +793,51 @@ void RTWindow::SetMainCurrent()
|
|||||||
|
|
||||||
void RTWindow::MoveFileBrowserToMain()
|
void RTWindow::MoveFileBrowserToMain()
|
||||||
{
|
{
|
||||||
if( fpanel->ribbonPane->get_children().empty()) {
|
if ( fpanel->ribbonPane->get_children().empty()) {
|
||||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||||
epanel->catalogPane->remove(*fCatalog);
|
epanel->catalogPane->remove (*fCatalog);
|
||||||
fpanel->ribbonPane->add(*fCatalog);
|
fpanel->ribbonPane->add (*fCatalog);
|
||||||
fCatalog->enableTabMode(false);
|
fCatalog->enableTabMode (false);
|
||||||
fCatalog->tbLeftPanel_1_visible(true);
|
fCatalog->tbLeftPanel_1_visible (true);
|
||||||
fCatalog->tbRightPanel_1_visible(true);
|
fCatalog->tbRightPanel_1_visible (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::MoveFileBrowserToEditor()
|
void RTWindow::MoveFileBrowserToEditor()
|
||||||
{
|
{
|
||||||
if(epanel->catalogPane->get_children().empty() ) {
|
if (epanel->catalogPane->get_children().empty() ) {
|
||||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||||
fpanel->ribbonPane->remove(*fCatalog);
|
fpanel->ribbonPane->remove (*fCatalog);
|
||||||
fCatalog->disableInspector();
|
fCatalog->disableInspector();
|
||||||
epanel->catalogPane->add(*fCatalog);
|
epanel->catalogPane->add (*fCatalog);
|
||||||
epanel->showTopPanel(options.editorFilmStripOpened);
|
epanel->showTopPanel (options.editorFilmStripOpened);
|
||||||
fCatalog->enableTabMode(true);
|
fCatalog->enableTabMode (true);
|
||||||
fCatalog->refreshHeight();
|
fCatalog->refreshHeight();
|
||||||
fCatalog->tbLeftPanel_1_visible(false);
|
fCatalog->tbLeftPanel_1_visible (false);
|
||||||
fCatalog->tbRightPanel_1_visible(false);
|
fCatalog->tbRightPanel_1_visible (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC)
|
void RTWindow::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC)
|
||||||
{
|
{
|
||||||
if(epanel) {
|
if (epanel) {
|
||||||
epanel->updateProfiles(printerProfile, printerIntent, printerBPC);
|
epanel->updateProfiles (printerProfile, printerIntent, printerBPC);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto panel : epanels) {
|
for (auto panel : epanels) {
|
||||||
panel.second->updateProfiles(printerProfile, printerIntent, printerBPC);
|
panel.second->updateProfiles (printerProfile, printerIntent, printerBPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::updateTPVScrollbar (bool hide)
|
void RTWindow::updateTPVScrollbar (bool hide)
|
||||||
{
|
{
|
||||||
fpanel->updateTPVScrollbar (hide);
|
fpanel->updateTPVScrollbar (hide);
|
||||||
if(epanel) {
|
|
||||||
|
if (epanel) {
|
||||||
epanel->updateTPVScrollbar (hide);
|
epanel->updateTPVScrollbar (hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto panel : epanels) {
|
for (auto panel : epanels) {
|
||||||
panel.second->updateTPVScrollbar (hide);
|
panel.second->updateTPVScrollbar (hide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -837,11 +845,12 @@ void RTWindow::updateTPVScrollbar (bool hide)
|
|||||||
void RTWindow::updateTabsUsesIcons (bool useIcons)
|
void RTWindow::updateTabsUsesIcons (bool useIcons)
|
||||||
{
|
{
|
||||||
fpanel->updateTabsUsesIcons (useIcons);
|
fpanel->updateTabsUsesIcons (useIcons);
|
||||||
if(epanel) {
|
|
||||||
|
if (epanel) {
|
||||||
epanel->updateTabsUsesIcons (useIcons);
|
epanel->updateTabsUsesIcons (useIcons);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto panel : epanels) {
|
for (auto panel : epanels) {
|
||||||
panel.second->updateTabsUsesIcons (useIcons);
|
panel.second->updateTabsUsesIcons (useIcons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -858,22 +867,23 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar)
|
|||||||
|
|
||||||
void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
|
void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
|
||||||
{
|
{
|
||||||
if(epanel) {
|
if (epanel) {
|
||||||
epanel->updateHistogramPosition (oldPosition, newPosition);
|
epanel->updateHistogramPosition (oldPosition, newPosition);
|
||||||
}
|
}
|
||||||
for(auto panel : epanels) {
|
|
||||||
|
for (auto panel : epanels) {
|
||||||
panel.second->updateHistogramPosition (oldPosition, newPosition);
|
panel.second->updateHistogramPosition (oldPosition, newPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::splashClosed(GdkEventAny* event)
|
bool RTWindow::splashClosed (GdkEventAny* event)
|
||||||
{
|
{
|
||||||
delete splash;
|
delete splash;
|
||||||
splash = nullptr;
|
splash = nullptr;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::set_title_decorated(Glib::ustring fname)
|
void RTWindow::set_title_decorated (Glib::ustring fname)
|
||||||
{
|
{
|
||||||
Glib::ustring subtitle;
|
Glib::ustring subtitle;
|
||||||
|
|
||||||
@ -881,7 +891,7 @@ void RTWindow::set_title_decorated(Glib::ustring fname)
|
|||||||
subtitle = " - " + fname;
|
subtitle = " - " + fname;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_title(versionStr + subtitle);
|
set_title (versionStr + subtitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::closeOpenEditors()
|
void RTWindow::closeOpenEditors()
|
||||||
@ -889,36 +899,36 @@ void RTWindow::closeOpenEditors()
|
|||||||
std::map<Glib::ustring, EditorPanel*>::const_iterator itr;
|
std::map<Glib::ustring, EditorPanel*>::const_iterator itr;
|
||||||
itr = epanels.begin();
|
itr = epanels.begin();
|
||||||
|
|
||||||
while(itr != epanels.end()) {
|
while (itr != epanels.end()) {
|
||||||
remEditorPanel((*itr).second);
|
remEditorPanel ((*itr).second);
|
||||||
itr = epanels.begin();
|
itr = epanels.begin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::isEditorPanel(Widget* panel)
|
bool RTWindow::isEditorPanel (Widget* panel)
|
||||||
{
|
{
|
||||||
return (panel != bpanel) && (panel != fpanel);
|
return (panel != bpanel) && (panel != fpanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::isEditorPanel(guint pageNum)
|
bool RTWindow::isEditorPanel (guint pageNum)
|
||||||
{
|
{
|
||||||
return isEditorPanel(mainNB->get_nth_page(pageNum));
|
return isEditorPanel (mainNB->get_nth_page (pageNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTWindow::setEditorMode(bool tabbedUI)
|
void RTWindow::setEditorMode (bool tabbedUI)
|
||||||
{
|
{
|
||||||
MoveFileBrowserToMain();
|
MoveFileBrowserToMain();
|
||||||
closeOpenEditors();
|
closeOpenEditors();
|
||||||
SetMainCurrent();
|
SetMainCurrent();
|
||||||
|
|
||||||
if(tabbedUI) {
|
if (tabbedUI) {
|
||||||
mainNB->remove_page(*epanel);
|
mainNB->remove_page (*epanel);
|
||||||
epanel = nullptr;
|
epanel = nullptr;
|
||||||
set_title_decorated("");
|
set_title_decorated ("");
|
||||||
} else {
|
} else {
|
||||||
createSetmEditor();
|
createSetmEditor();
|
||||||
epanel->show_all();
|
epanel->show_all();
|
||||||
set_title_decorated("");
|
set_title_decorated ("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -927,25 +937,25 @@ void RTWindow::createSetmEditor()
|
|||||||
// Editor panel, single-tab mode only
|
// Editor panel, single-tab mode only
|
||||||
epanel = Gtk::manage ( new EditorPanel (fpanel) );
|
epanel = Gtk::manage ( new EditorPanel (fpanel) );
|
||||||
epanel->setParent (this);
|
epanel->setParent (this);
|
||||||
epanel->setParentWindow(this);
|
epanel->setParentWindow (this);
|
||||||
|
|
||||||
// decorate tab
|
// decorate tab
|
||||||
Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ());
|
Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ());
|
||||||
setExpandAlignProperties(editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
setExpandAlignProperties (editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
Gtk::Label* const el = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") ));
|
Gtk::Label* const el = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") ));
|
||||||
|
|
||||||
const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT;
|
const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT;
|
||||||
|
|
||||||
if (options.mainNBVertical) {
|
if (options.mainNBVertical) {
|
||||||
el->set_angle(90);
|
el->set_angle (90);
|
||||||
}
|
}
|
||||||
|
|
||||||
editorLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1);
|
editorLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1);
|
||||||
editorLabelGrid->attach_next_to(*el, pos, 1, 1);
|
editorLabelGrid->attach_next_to (*el, pos, 1, 1);
|
||||||
|
|
||||||
editorLabelGrid->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP"));
|
editorLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_EDITOR_TOOLTIP"));
|
||||||
editorLabelGrid->show_all ();
|
editorLabelGrid->show_all ();
|
||||||
epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button
|
epanel->tbTopPanel_1_visible (true); //show the toggle Top Panel button
|
||||||
mainNB->append_page (*epanel, *editorLabelGrid);
|
mainNB->append_page (*epanel, *editorLabelGrid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -50,15 +50,15 @@ private:
|
|||||||
|
|
||||||
bool isSingleTabMode()
|
bool isSingleTabMode()
|
||||||
{
|
{
|
||||||
return !options.tabbedUI && !(options.multiDisplayMode > 0);
|
return !options.tabbedUI && ! (options.multiDisplayMode > 0);
|
||||||
};
|
};
|
||||||
void findVerNumbers(int* numbers, Glib::ustring versionStr);
|
void findVerNumbers (int* numbers, Glib::ustring versionStr);
|
||||||
|
|
||||||
bool on_expose_event_epanel(GdkEventExpose* event);
|
bool on_expose_event_epanel (GdkEventExpose* event);
|
||||||
bool on_expose_event_fpanel(GdkEventExpose* event);
|
bool on_expose_event_fpanel (GdkEventExpose* event);
|
||||||
bool splashClosed(GdkEventAny* event);
|
bool splashClosed (GdkEventAny* event);
|
||||||
bool isEditorPanel(Widget* panel);
|
bool isEditorPanel (Widget* panel);
|
||||||
bool isEditorPanel(guint pageNum);
|
bool isEditorPanel (guint pageNum);
|
||||||
|
|
||||||
Glib::ustring versionStr;
|
Glib::ustring versionStr;
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
@ -70,20 +70,20 @@ public:
|
|||||||
~RTWindow();
|
~RTWindow();
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
bool osxFileOpenEvent(Glib::ustring path);
|
bool osxFileOpenEvent (Glib::ustring path);
|
||||||
#endif
|
#endif
|
||||||
void addEditorPanel (EditorPanel* ep, const std::string &name);
|
void addEditorPanel (EditorPanel* ep, const std::string &name);
|
||||||
void remEditorPanel (EditorPanel* ep);
|
void remEditorPanel (EditorPanel* ep);
|
||||||
bool selectEditorPanel(const std::string &name);
|
bool selectEditorPanel (const std::string &name);
|
||||||
|
|
||||||
void addBatchQueueJob (BatchQueueEntry* bqe, bool head = false);
|
void addBatchQueueJob (BatchQueueEntry* bqe, bool head = false);
|
||||||
void addBatchQueueJobs (std::vector<BatchQueueEntry*> &entries);
|
void addBatchQueueJobs (std::vector<BatchQueueEntry*> &entries);
|
||||||
|
|
||||||
bool keyPressed (GdkEventKey* event);
|
bool keyPressed (GdkEventKey* event);
|
||||||
bool on_configure_event(GdkEventConfigure* event);
|
bool on_configure_event (GdkEventConfigure* event);
|
||||||
bool on_delete_event(GdkEventAny* event);
|
bool on_delete_event (GdkEventAny* event);
|
||||||
bool on_window_state_event(GdkEventWindowState* event);
|
bool on_window_state_event (GdkEventWindowState* event);
|
||||||
void on_mainNB_switch_page(Gtk::Widget* widget, guint page_num);
|
void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num);
|
||||||
|
|
||||||
void showPreferences ();
|
void showPreferences ();
|
||||||
void on_realize ();
|
void on_realize ();
|
||||||
@ -115,12 +115,12 @@ public:
|
|||||||
{
|
{
|
||||||
return is_fullscreen;
|
return is_fullscreen;
|
||||||
}
|
}
|
||||||
void set_title_decorated(Glib::ustring fname);
|
void set_title_decorated (Glib::ustring fname);
|
||||||
void closeOpenEditors();
|
void closeOpenEditors();
|
||||||
void setEditorMode(bool tabbedUI);
|
void setEditorMode (bool tabbedUI);
|
||||||
void createSetmEditor();
|
void createSetmEditor();
|
||||||
|
|
||||||
void writeToolExpandedStatus(std::vector<int> &tpOpen);
|
void writeToolExpandedStatus (std::vector<int> &tpOpen);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), editDataProvider(nullptr)
|
ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
exposurePanel = Gtk::manage (new ToolVBox ());
|
exposurePanel = Gtk::manage (new ToolVBox ());
|
||||||
@ -53,7 +53,7 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false),
|
|||||||
colortoning = Gtk::manage (new ColorToning ());
|
colortoning = Gtk::manage (new ColorToning ());
|
||||||
lensgeom = Gtk::manage (new LensGeometry ());
|
lensgeom = Gtk::manage (new LensGeometry ());
|
||||||
lensProf = Gtk::manage (new LensProfilePanel ());
|
lensProf = Gtk::manage (new LensProfilePanel ());
|
||||||
lensProf->setLensGeomRef(lensgeom);
|
lensProf->setLensGeomRef (lensgeom);
|
||||||
distortion = Gtk::manage (new Distortion ());
|
distortion = Gtk::manage (new Distortion ());
|
||||||
rotate = Gtk::manage (new Rotate ());
|
rotate = Gtk::manage (new Rotate ());
|
||||||
vibrance = Gtk::manage (new Vibrance ());
|
vibrance = Gtk::manage (new Vibrance ());
|
||||||
@ -203,8 +203,8 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false),
|
|||||||
toolPanelNotebook = new Gtk::Notebook ();
|
toolPanelNotebook = new Gtk::Notebook ();
|
||||||
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
||||||
|
|
||||||
metadataPanel->append_page (*exifpanel, M("MAIN_TAB_EXIF"));
|
metadataPanel->append_page (*exifpanel, M ("MAIN_TAB_EXIF"));
|
||||||
metadataPanel->append_page (*iptcpanel, M("MAIN_TAB_IPTC"));
|
metadataPanel->append_page (*iptcpanel, M ("MAIN_TAB_IPTC"));
|
||||||
|
|
||||||
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||||
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||||
@ -217,47 +217,47 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false),
|
|||||||
// load panel endings
|
// load panel endings
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
vbPanelEnd[i] = Gtk::manage (new Gtk::VBox ());
|
vbPanelEnd[i] = Gtk::manage (new Gtk::VBox ());
|
||||||
imgPanelEnd[i] = Gtk::manage (new RTImage("PanelEnding.png"));
|
imgPanelEnd[i] = Gtk::manage (new RTImage ("PanelEnding.png"));
|
||||||
imgPanelEnd[i]->show ();
|
imgPanelEnd[i]->show ();
|
||||||
vbPanelEnd[i]->pack_start (*imgPanelEnd[i], Gtk::PACK_SHRINK);
|
vbPanelEnd[i]->pack_start (*imgPanelEnd[i], Gtk::PACK_SHRINK);
|
||||||
vbPanelEnd[i]->show_all();
|
vbPanelEnd[i]->show_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
exposurePanelSW->add (*exposurePanel);
|
exposurePanelSW->add (*exposurePanel);
|
||||||
exposurePanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
exposurePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
exposurePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
detailsPanelSW->add (*detailsPanel);
|
detailsPanelSW->add (*detailsPanel);
|
||||||
detailsPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
detailsPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
detailsPanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4);
|
detailsPanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
colorPanelSW->add (*colorPanel);
|
colorPanelSW->add (*colorPanel);
|
||||||
colorPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
colorPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
colorPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4);
|
colorPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
waveletPanelSW->add (*waveletPanel);
|
waveletPanelSW->add (*waveletPanel);
|
||||||
waveletPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
waveletPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
waveletPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
waveletPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
||||||
|
|
||||||
transformPanelSW->add (*transformPanel);
|
transformPanelSW->add (*transformPanel);
|
||||||
transformPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
transformPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
transformPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4);
|
transformPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
rawPanelSW->add (*rawPanel);
|
rawPanelSW->add (*rawPanel);
|
||||||
rawPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||||
rawPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 0);
|
rawPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT;
|
TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT;
|
||||||
|
|
||||||
toiE = Gtk::manage (new TextOrIcon ("exposure.png" , M("MAIN_TAB_EXPOSURE") , M("MAIN_TAB_EXPOSURE_TOOLTIP") , type));
|
toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP"), type));
|
||||||
toiD = Gtk::manage (new TextOrIcon ("detail.png" , M("MAIN_TAB_DETAIL") , M("MAIN_TAB_DETAIL_TOOLTIP") , type));
|
toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP"), type));
|
||||||
toiC = Gtk::manage (new TextOrIcon ("colour.png" , M("MAIN_TAB_COLOR") , M("MAIN_TAB_COLOR_TOOLTIP") , type));
|
toiC = Gtk::manage (new TextOrIcon ("colour.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP"), type));
|
||||||
toiW = Gtk::manage (new TextOrIcon ("wavelet.png" , M("MAIN_TAB_WAVELET") , M("MAIN_TAB_WAVELET_TOOLTIP") , type));
|
toiW = Gtk::manage (new TextOrIcon ("wavelet.png", M ("MAIN_TAB_WAVELET"), M ("MAIN_TAB_WAVELET_TOOLTIP"), type));
|
||||||
toiT = Gtk::manage (new TextOrIcon ("transform.png", M("MAIN_TAB_TRANSFORM"), M("MAIN_TAB_TRANSFORM_TOOLTIP"), type));
|
toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP"), type));
|
||||||
toiR = Gtk::manage (new TextOrIcon ("raw.png" , M("MAIN_TAB_RAW") , M("MAIN_TAB_RAW_TOOLTIP") , type));
|
toiR = Gtk::manage (new TextOrIcon ("raw.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP"), type));
|
||||||
toiM = Gtk::manage (new TextOrIcon ("meta.png" , M("MAIN_TAB_METADATA") , M("MAIN_TAB_METADATA_TOOLTIP") , type));
|
toiM = Gtk::manage (new TextOrIcon ("meta.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP"), type));
|
||||||
|
|
||||||
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
||||||
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
||||||
@ -287,17 +287,17 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false),
|
|||||||
icm->setICMPanelListener (this);
|
icm->setICMPanelListener (this);
|
||||||
|
|
||||||
toolBar = new ToolBar ();
|
toolBar = new ToolBar ();
|
||||||
toolBar->setToolBarListener(this);
|
toolBar->setToolBarListener (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
||||||
{
|
{
|
||||||
|
|
||||||
panel->setParent(where);
|
panel->setParent (where);
|
||||||
panel->setLevel(level);
|
panel->setLevel (level);
|
||||||
|
|
||||||
expList.push_back (panel->getExpander());
|
expList.push_back (panel->getExpander());
|
||||||
where->pack_start(*panel->getExpander(), false, false);
|
where->pack_start (*panel->getExpander(), false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolPanelCoordinator::~ToolPanelCoordinator ()
|
ToolPanelCoordinator::~ToolPanelCoordinator ()
|
||||||
@ -309,12 +309,13 @@ ToolPanelCoordinator::~ToolPanelCoordinator ()
|
|||||||
delete toolBar;
|
delete toolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans)
|
void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans)
|
||||||
{
|
{
|
||||||
GThreadLock lock;
|
GThreadLock lock;
|
||||||
|
|
||||||
if(isRaw) {
|
if (isRaw) {
|
||||||
rawPanelSW->set_sensitive(true);
|
rawPanelSW->set_sensitive (true);
|
||||||
|
|
||||||
if (isBayer) {
|
if (isBayer) {
|
||||||
sensorxtrans->FoldableToolPanel::hide();
|
sensorxtrans->FoldableToolPanel::hide();
|
||||||
sensorbayer->FoldableToolPanel::show();
|
sensorbayer->FoldableToolPanel::show();
|
||||||
@ -332,7 +333,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
|||||||
flatfield->FoldableToolPanel::hide();
|
flatfield->FoldableToolPanel::hide();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rawPanelSW->set_sensitive(false);
|
rawPanelSW->set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -345,7 +346,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int changeFlags = refreshmap[(int)event];
|
int changeFlags = refreshmap[ (int)event];
|
||||||
|
|
||||||
ProcParams* params = ipc->beginUpdateParams ();
|
ProcParams* params = ipc->beginUpdateParams ();
|
||||||
|
|
||||||
@ -355,14 +356,15 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
|||||||
|
|
||||||
// Compensate rotation on flip
|
// Compensate rotation on flip
|
||||||
if (event == rtengine::EvCTHFlip || event == rtengine::EvCTVFlip) {
|
if (event == rtengine::EvCTHFlip || event == rtengine::EvCTVFlip) {
|
||||||
if (fabs(params->rotate.degree) > 0.001) {
|
if (fabs (params->rotate.degree) > 0.001) {
|
||||||
params->rotate.degree *= -1;
|
params->rotate.degree *= -1;
|
||||||
changeFlags |= refreshmap[(int)rtengine::EvROTDegree];
|
changeFlags |= refreshmap[ (int)rtengine::EvROTDegree];
|
||||||
rotate->read (params);
|
rotate->read (params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int tr = TR_NONE;
|
int tr = TR_NONE;
|
||||||
|
|
||||||
if (params->coarse.rotate == 90) {
|
if (params->coarse.rotate == 90) {
|
||||||
tr = TR_R90;
|
tr = TR_R90;
|
||||||
} else if (params->coarse.rotate == 180) {
|
} else if (params->coarse.rotate == 180) {
|
||||||
@ -427,14 +429,14 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// And apply the partial profile nparams to mergedParams
|
// And apply the partial profile nparams to mergedParams
|
||||||
nparams->applyTo(mergedParams);
|
nparams->applyTo (mergedParams);
|
||||||
|
|
||||||
// Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary
|
// Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary
|
||||||
bool filterRawRefresh = false;
|
bool filterRawRefresh = false;
|
||||||
|
|
||||||
if (event != rtengine::EvPhotoLoaded) {
|
if (event != rtengine::EvPhotoLoaded) {
|
||||||
ParamsEdited pe(true);
|
ParamsEdited pe (true);
|
||||||
std::vector<rtengine::procparams::ProcParams> lParams(2);
|
std::vector<rtengine::procparams::ProcParams> lParams (2);
|
||||||
lParams[0] = *params;
|
lParams[0] = *params;
|
||||||
lParams[1] = *mergedParams;
|
lParams[1] = *mergedParams;
|
||||||
pe.initFrom (lParams);
|
pe.initFrom (lParams);
|
||||||
@ -446,6 +448,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
|||||||
delete mergedParams;
|
delete mergedParams;
|
||||||
|
|
||||||
tr = TR_NONE;
|
tr = TR_NONE;
|
||||||
|
|
||||||
if (params->coarse.rotate == 90) {
|
if (params->coarse.rotate == 90) {
|
||||||
tr = TR_R90;
|
tr = TR_R90;
|
||||||
} else if (params->coarse.rotate == 180) {
|
} else if (params->coarse.rotate == 180) {
|
||||||
@ -456,7 +459,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
|||||||
|
|
||||||
// trimming overflowing cropped area
|
// trimming overflowing cropped area
|
||||||
ipc->getInitialImage()->getImageSource()->getFullSize (fw, fh, tr);
|
ipc->getInitialImage()->getImageSource()->getFullSize (fw, fh, tr);
|
||||||
crop->trim(params, fw, fh);
|
crop->trim (params, fw, fh);
|
||||||
|
|
||||||
// updating the GUI with updated values
|
// updating the GUI with updated values
|
||||||
for (auto toolPanel : toolPanels) {
|
for (auto toolPanel : toolPanels) {
|
||||||
@ -474,7 +477,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
|||||||
|
|
||||||
// start the IPC processing
|
// start the IPC processing
|
||||||
if (filterRawRefresh) {
|
if (filterRawRefresh) {
|
||||||
ipc->endUpdateParams ( refreshmap[(int)event] & ALLNORAW );
|
ipc->endUpdateParams ( refreshmap[ (int)event] & ALLNORAW );
|
||||||
} else {
|
} else {
|
||||||
ipc->endUpdateParams (event);
|
ipc->endUpdateParams (event);
|
||||||
}
|
}
|
||||||
@ -526,7 +529,7 @@ void ToolPanelCoordinator::initImage (rtengine::StagedImageProcessor* ipc_, bool
|
|||||||
ipc->setSizeListener (crop);
|
ipc->setSizeListener (crop);
|
||||||
ipc->setSizeListener (resize);
|
ipc->setSizeListener (resize);
|
||||||
ipc->setImageTypeListener (this);
|
ipc->setImageTypeListener (this);
|
||||||
flatfield->setShortcutPath(Glib::path_get_dirname(ipc->getInitialImage()->getFileName()));
|
flatfield->setShortcutPath (Glib::path_get_dirname (ipc->getInitialImage()->getFileName()));
|
||||||
|
|
||||||
icm->setRawMeta (raw, (const rtengine::ImageData*)pMetaData);
|
icm->setRawMeta (raw, (const rtengine::ImageData*)pMetaData);
|
||||||
lensProf->setRawMeta (raw, pMetaData);
|
lensProf->setRawMeta (raw, pMetaData);
|
||||||
@ -552,7 +555,7 @@ void ToolPanelCoordinator::closeAllTools()
|
|||||||
|
|
||||||
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
||||||
if (i < expList.size()) {
|
if (i < expList.size()) {
|
||||||
expList.at(i)->set_expanded (false);
|
expList.at (i)->set_expanded (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,7 +564,7 @@ void ToolPanelCoordinator::openAllTools()
|
|||||||
|
|
||||||
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
||||||
if (i < expList.size()) {
|
if (i < expList.size()) {
|
||||||
expList.at(i)->set_expanded (true);
|
expList.at (i)->set_expanded (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,20 +573,20 @@ void ToolPanelCoordinator::updateToolState()
|
|||||||
|
|
||||||
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
for (size_t i = 0; i < options.tpOpen.size(); i++)
|
||||||
if (i < expList.size()) {
|
if (i < expList.size()) {
|
||||||
expList.at(i)->set_expanded (options.tpOpen.at(i));
|
expList.at (i)->set_expanded (options.tpOpen.at (i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(options.tpOpen.size() > expList.size()) {
|
if (options.tpOpen.size() > expList.size()) {
|
||||||
size_t sizeWavelet = options.tpOpen.size() - expList.size();
|
size_t sizeWavelet = options.tpOpen.size() - expList.size();
|
||||||
std::vector<int> temp;
|
std::vector<int> temp;
|
||||||
|
|
||||||
for (size_t i = 0; i < sizeWavelet; i++) {
|
for (size_t i = 0; i < sizeWavelet; i++) {
|
||||||
temp.push_back(options.tpOpen.at(i + expList.size()));
|
temp.push_back (options.tpOpen.at (i + expList.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
wavelet->updateToolState(temp);
|
wavelet->updateToolState (temp);
|
||||||
wavelet->setExpanded(true);
|
wavelet->setExpanded (true);
|
||||||
retinex->updateToolState(temp);
|
retinex->updateToolState (temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,21 +602,21 @@ void ToolPanelCoordinator::writeOptions ()
|
|||||||
crop->writeOptions ();
|
crop->writeOptions ();
|
||||||
|
|
||||||
if (options.autoSaveTpOpen) {
|
if (options.autoSaveTpOpen) {
|
||||||
writeToolExpandedStatus(options.tpOpen);
|
writeToolExpandedStatus (options.tpOpen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ToolPanelCoordinator::writeToolExpandedStatus(std::vector<int> &tpOpen)
|
void ToolPanelCoordinator::writeToolExpandedStatus (std::vector<int> &tpOpen)
|
||||||
{
|
{
|
||||||
tpOpen.clear ();
|
tpOpen.clear ();
|
||||||
|
|
||||||
for (size_t i = 0; i < expList.size(); i++) {
|
for (size_t i = 0; i < expList.size(); i++) {
|
||||||
tpOpen.push_back (expList.at(i)->get_expanded ());
|
tpOpen.push_back (expList.at (i)->get_expanded ());
|
||||||
}
|
}
|
||||||
|
|
||||||
wavelet->writeOptions(tpOpen);
|
wavelet->writeOptions (tpOpen);
|
||||||
retinex->writeOptions(tpOpen);
|
retinex->writeOptions (tpOpen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -688,14 +691,14 @@ rtengine::RawImage* ToolPanelCoordinator::getDF()
|
|||||||
|
|
||||||
const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData();
|
const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData();
|
||||||
|
|
||||||
if(imd) {
|
if (imd) {
|
||||||
int iso = imd->getISOSpeed();
|
int iso = imd->getISOSpeed();
|
||||||
double shutter = imd->getShutterSpeed();
|
double shutter = imd->getShutterSpeed();
|
||||||
std::string maker( imd->getMake() );
|
std::string maker ( imd->getMake() );
|
||||||
std::string model( imd->getModel() );
|
std::string model ( imd->getModel() );
|
||||||
time_t timestamp = imd->getDateTimeAsTS();
|
time_t timestamp = imd->getDateTimeAsTS();
|
||||||
|
|
||||||
return rtengine::dfm.searchDarkFrame( maker, model, iso, shutter, timestamp);
|
return rtengine::dfm.searchDarkFrame ( maker, model, iso, shutter, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -709,17 +712,17 @@ rtengine::RawImage* ToolPanelCoordinator::getFF()
|
|||||||
|
|
||||||
const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData();
|
const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData();
|
||||||
|
|
||||||
if(imd) {
|
if (imd) {
|
||||||
// int iso = imd->getISOSpeed(); temporarilly removed because unused
|
// int iso = imd->getISOSpeed(); temporarilly removed because unused
|
||||||
// double shutter = imd->getShutterSpeed(); temporarilly removed because unused
|
// double shutter = imd->getShutterSpeed(); temporarilly removed because unused
|
||||||
double aperture = imd->getFNumber();
|
double aperture = imd->getFNumber();
|
||||||
double focallength = imd->getFocalLen();
|
double focallength = imd->getFocalLen();
|
||||||
std::string maker( imd->getMake() );
|
std::string maker ( imd->getMake() );
|
||||||
std::string model( imd->getModel() );
|
std::string model ( imd->getModel() );
|
||||||
std::string lens( imd->getLens() );
|
std::string lens ( imd->getLens() );
|
||||||
time_t timestamp = imd->getDateTimeAsTS();
|
time_t timestamp = imd->getDateTimeAsTS();
|
||||||
|
|
||||||
return rtengine::ffm.searchFlatField( maker, model, lens, focallength, aperture, timestamp);
|
return rtengine::ffm.searchFlatField ( maker, model, lens, focallength, aperture, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -792,8 +795,8 @@ void ToolPanelCoordinator::updateCurveBackgroundHistogram (LUTu & histToneCurve,
|
|||||||
colorappearance->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
colorappearance->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
toneCurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
toneCurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
lcurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
lcurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
rgbcurves->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
rgbcurves->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
retinex->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
retinex->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -807,10 +810,10 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o
|
|||||||
if (currentTP->getParent() == parent) {
|
if (currentTP->getParent() == parent) {
|
||||||
// Section in the same tab, we unfold it if it's not the one that has been clicked
|
// Section in the same tab, we unfold it if it's not the one that has been clicked
|
||||||
if (currentTP != openedSection) {
|
if (currentTP != openedSection) {
|
||||||
currentTP->setExpanded(false);
|
currentTP->setExpanded (false);
|
||||||
} else {
|
} else {
|
||||||
if (!currentTP->getExpanded()) {
|
if (!currentTP->getExpanded()) {
|
||||||
currentTP->setExpanded(true);
|
currentTP->setExpanded (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -826,36 +829,36 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event)
|
|||||||
bool alt = event->state & GDK_MOD1_MASK;
|
bool alt = event->state & GDK_MOD1_MASK;
|
||||||
|
|
||||||
if (alt) {
|
if (alt) {
|
||||||
switch(event->keyval) {
|
switch (event->keyval) {
|
||||||
case GDK_KEY_e:
|
case GDK_KEY_e:
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*exposurePanelSW));
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*exposurePanelSW));
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_d:
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*detailsPanelSW));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_c:
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*colorPanelSW));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_t:
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*transformPanelSW));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_r:
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*rawPanelSW));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_w:
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*waveletPanelSW));
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GDK_KEY_m:
|
|
||||||
if (metadataPanel) {
|
|
||||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*metadataPanel));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
case GDK_KEY_d:
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*detailsPanelSW));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_c:
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_t:
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_r:
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*rawPanelSW));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_w:
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*waveletPanelSW));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_KEY_m:
|
||||||
|
if (metadataPanel) {
|
||||||
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*metadataPanel));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -874,7 +877,7 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
|||||||
waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||||
|
|
||||||
for (auto currExp : expList) {
|
for (auto currExp : expList) {
|
||||||
currExp->updateVScrollbars(hide);
|
currExp->updateVScrollbars (hide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,14 +886,14 @@ void ToolPanelCoordinator::updateTabsHeader (bool useIcons)
|
|||||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||||
TOITypes type = useIcons ? TOI_ICON : TOI_TEXT;
|
TOITypes type = useIcons ? TOI_ICON : TOI_TEXT;
|
||||||
|
|
||||||
toiE->switchTo(type);
|
toiE->switchTo (type);
|
||||||
toiD->switchTo(type);
|
toiD->switchTo (type);
|
||||||
toiC->switchTo(type);
|
toiC->switchTo (type);
|
||||||
toiT->switchTo(type);
|
toiT->switchTo (type);
|
||||||
toiR->switchTo(type);
|
toiR->switchTo (type);
|
||||||
|
|
||||||
if (toiM) {
|
if (toiM) {
|
||||||
toiM->switchTo(type);
|
toiM->switchTo (type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -909,24 +912,24 @@ void ToolPanelCoordinator::toolSelected (ToolMode tool)
|
|||||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||||
|
|
||||||
switch (tool) {
|
switch (tool) {
|
||||||
case TMCropSelect:
|
case TMCropSelect:
|
||||||
crop->setExpanded(true);
|
crop->setExpanded (true);
|
||||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW));
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TMSpotWB:
|
case TMSpotWB:
|
||||||
whitebalance->setExpanded(true);
|
whitebalance->setExpanded (true);
|
||||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*colorPanelSW));
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TMStraighten:
|
case TMStraighten:
|
||||||
lensgeom->setExpanded(true);
|
lensgeom->setExpanded (true);
|
||||||
rotate->setExpanded(true);
|
rotate->setExpanded (true);
|
||||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW));
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -940,14 +943,14 @@ void ToolPanelCoordinator::editModeSwitchedOff ()
|
|||||||
void ToolPanelCoordinator::dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile)
|
void ToolPanelCoordinator::dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile)
|
||||||
{
|
{
|
||||||
|
|
||||||
flatfield->setShortcutPath(dirname);
|
flatfield->setShortcutPath (dirname);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolPanelCoordinator::setEditProvider(EditDataProvider *provider)
|
void ToolPanelCoordinator::setEditProvider (EditDataProvider *provider)
|
||||||
{
|
{
|
||||||
editDataProvider = provider;
|
editDataProvider = provider;
|
||||||
|
|
||||||
for (size_t i = 0; i < toolPanels.size(); i++) {
|
for (size_t i = 0; i < toolPanels.size(); i++) {
|
||||||
toolPanels.at(i)->setEditProvider(provider);
|
toolPanels.at (i)->setEditProvider (provider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ public:
|
|||||||
// toolpanellistener interface
|
// toolpanellistener interface
|
||||||
void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr);
|
void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr);
|
||||||
|
|
||||||
void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans);
|
void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans);
|
||||||
// profilechangelistener interface
|
// profilechangelistener interface
|
||||||
void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr);
|
void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr);
|
||||||
void setDefaults (rtengine::procparams::ProcParams* defparams);
|
void setDefaults (rtengine::procparams::ProcParams* defparams);
|
||||||
@ -239,7 +239,7 @@ public:
|
|||||||
// read/write the "expanded" state of the expanders & read/write the crop panel settings (ratio, guide type, etc.)
|
// read/write the "expanded" state of the expanders & read/write the crop panel settings (ratio, guide type, etc.)
|
||||||
void readOptions ();
|
void readOptions ();
|
||||||
void writeOptions ();
|
void writeOptions ();
|
||||||
void writeToolExpandedStatus(std::vector<int> &tpOpen);
|
void writeToolExpandedStatus (std::vector<int> &tpOpen);
|
||||||
|
|
||||||
|
|
||||||
// wbprovider interface
|
// wbprovider interface
|
||||||
@ -299,7 +299,7 @@ public:
|
|||||||
void toolSelected (ToolMode tool);
|
void toolSelected (ToolMode tool);
|
||||||
void editModeSwitchedOff ();
|
void editModeSwitchedOff ();
|
||||||
|
|
||||||
void setEditProvider(EditDataProvider *provider);
|
void setEditProvider (EditDataProvider *provider);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user