Left and right panels of the directory browser and the editor tab now remember theire position when RT is restarted. When a new editor tab opens, it remember the last width value. Morever, if you change the width if the left or right panel in one editor tab, it does propagate in all the others.
Those values are stored in the options file. This is not related to the automatic grow of the window when an editor opens (not solved yet). To avoid having too wide windows at the first start, the font of all styles are now "sans 10".
This commit is contained in:
parent
2cb62531a6
commit
05f70a7a99
@ -65,8 +65,8 @@ SaveParamsToCache=true
|
|||||||
LoadParamsFromLocation=0
|
LoadParamsFromLocation=0
|
||||||
|
|
||||||
[GUI]
|
[GUI]
|
||||||
WindowWidth=1000
|
WindowWidth=900
|
||||||
WindowHeight=900
|
WindowHeight=560
|
||||||
WindowMaximized=false
|
WindowMaximized=false
|
||||||
FileBrowserHeight=250
|
FileBrowserHeight=250
|
||||||
ToolPanelWidth=300
|
ToolPanelWidth=300
|
||||||
|
@ -65,8 +65,8 @@ SaveParamsToCache=true
|
|||||||
LoadParamsFromLocation=0
|
LoadParamsFromLocation=0
|
||||||
|
|
||||||
[GUI]
|
[GUI]
|
||||||
WindowWidth=1000
|
WindowWidth=900
|
||||||
WindowHeight=900
|
WindowHeight=560
|
||||||
WindowMaximized=false
|
WindowMaximized=false
|
||||||
FileBrowserHeight=250
|
FileBrowserHeight=250
|
||||||
ToolPanelWidth=300
|
ToolPanelWidth=300
|
||||||
|
@ -65,8 +65,8 @@ SaveParamsToCache=true
|
|||||||
LoadParamsFromLocation=0
|
LoadParamsFromLocation=0
|
||||||
|
|
||||||
[GUI]
|
[GUI]
|
||||||
WindowWidth=1000
|
WindowWidth=900
|
||||||
WindowHeight=900
|
WindowHeight=560
|
||||||
WindowMaximized=false
|
WindowMaximized=false
|
||||||
FileBrowserHeight=250
|
FileBrowserHeight=250
|
||||||
ToolPanelWidth=300
|
ToolPanelWidth=300
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
style "clearlooks-default"
|
style "clearlooks-default"
|
||||||
{
|
{
|
||||||
|
font_name = "sans 8"
|
||||||
GtkMenuItem::selected_shadow_type = none
|
GtkMenuItem::selected_shadow_type = none
|
||||||
GtkWidget::interior_focus = 1
|
GtkWidget::interior_focus = 1
|
||||||
GtkButton::default_border = { 3, 3, 3, 3 }
|
GtkButton::default_border = { 3, 3, 3, 3 }
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
style "clearlooks-default"
|
style "clearlooks-default"
|
||||||
{
|
{
|
||||||
font_name = "tahoma 8"
|
font_name = "sans 8"
|
||||||
GtkButton ::default_border = { 0, 0, 0, 0 }
|
GtkButton ::default_border = { 0, 0, 0, 0 }
|
||||||
GtkComboBox ::default_border = { 0, 0, 0, 0 }
|
GtkComboBox ::default_border = { 0, 0, 0, 0 }
|
||||||
GtkRange ::trough_border = 0
|
GtkRange ::trough_border = 0
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
style "clearlooks-default"
|
style "clearlooks-default"
|
||||||
{
|
{
|
||||||
font_name = "tahoma 8"
|
font_name = "sans 8"
|
||||||
GtkButton ::default_border = { 0, 0, 0, 0 }
|
GtkButton ::default_border = { 0, 0, 0, 0 }
|
||||||
GtkRange ::trough_border = 0
|
GtkRange ::trough_border = 0
|
||||||
GtkPaned ::handle_size = 6
|
GtkPaned ::handle_size = 6
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
style "theme-default" {
|
style "theme-default" {
|
||||||
|
|
||||||
font_name = "tahoma 12"
|
font_name = "sans 8"
|
||||||
|
|
||||||
GtkButton ::default_border = { 0, 0, 0, 0 }
|
GtkButton ::default_border = { 0, 0, 0, 0 }
|
||||||
GtkRange ::trough_border = 1
|
GtkRange ::trough_border = 1
|
||||||
|
@ -32,7 +32,7 @@ style "clearlooks-default"
|
|||||||
# change it to use an actual font, enter the full name of the font
|
# change it to use an actual font, enter the full name of the font
|
||||||
# here, along with optional style and size, e.g.
|
# here, along with optional style and size, e.g.
|
||||||
# "Monaco Bold 15".
|
# "Monaco Bold 15".
|
||||||
font_name = "Default"
|
font_name = "sans 8"
|
||||||
|
|
||||||
GtkRange::trough_border = 0
|
GtkRange::trough_border = 0
|
||||||
GtkRange::slider_width = 14
|
GtkRange::slider_width = 14
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
style "clearlooks-default"
|
style "clearlooks-default"
|
||||||
{
|
{
|
||||||
font_name = "sans 8"
|
font_name = "sans 8"
|
||||||
GtkButton ::default_border = { 0, 0, 0, 0 }
|
GtkButton ::default_border = { 0, 0, 0, 0 }
|
||||||
GtkRange ::trough_border = 0
|
GtkRange ::trough_border = 0
|
||||||
GtkPaned ::handle_size = 6
|
GtkPaned ::handle_size = 6
|
||||||
|
@ -192,7 +192,8 @@ EditorPanel::EditorPanel () : beforePreviewHandler(NULL), beforeIarea(NULL), par
|
|||||||
|
|
||||||
hpanedr->pack1(*hpanedl, true, true);
|
hpanedr->pack1(*hpanedl, true, true);
|
||||||
hpanedr->pack2(*vboxright, false, true);
|
hpanedr->pack2(*vboxright, false, true);
|
||||||
//hpanedr->set_position(options.toolPanelWidth);
|
hpanedl->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::leftPaneButtonReleased) );
|
||||||
|
hpanedr->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::rightPaneButtonReleased) );
|
||||||
|
|
||||||
pack_start (*hpanedr);
|
pack_start (*hpanedr);
|
||||||
show_all ();
|
show_all ();
|
||||||
@ -263,6 +264,40 @@ EditorPanel::~EditorPanel () {
|
|||||||
delete saveAsDialog;
|
delete saveAsDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditorPanel::leftPaneButtonReleased(GdkEventButton *event) {
|
||||||
|
if (event->button == 1) {
|
||||||
|
// Button 1 released : it's a resize
|
||||||
|
options.historyPanelWidth = hpanedl->get_position();
|
||||||
|
}
|
||||||
|
/*else if (event->button == 3) {
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::rightPaneButtonReleased(GdkEventButton *event) {
|
||||||
|
if (event->button == 1) {
|
||||||
|
int winW, winH;
|
||||||
|
parent->get_size(winW, winH);
|
||||||
|
// Button 1 released : it's a resize
|
||||||
|
options.toolPanelWidth = winW - hpanedr->get_position();
|
||||||
|
}
|
||||||
|
/*else if (event->button == 3) {
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::setAspect () {
|
||||||
|
int winW, winH;
|
||||||
|
parent->get_size(winW, winH);
|
||||||
|
hpanedl->set_position(options.historyPanelWidth);
|
||||||
|
hpanedr->set_position(winW - options.toolPanelWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::on_realize () {
|
||||||
|
|
||||||
|
Gtk::VBox::on_realize ();
|
||||||
|
// This line is needed to avoid autoexpansion of the window :-/
|
||||||
|
vboxright->set_size_request (options.toolPanelWidth, -1);
|
||||||
|
}
|
||||||
|
|
||||||
void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||||
|
|
||||||
// initialize everything
|
// initialize everything
|
||||||
@ -849,12 +884,10 @@ bool EditorPanel::idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16*
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void EditorPanel::saveOptions () {
|
void EditorPanel::saveOptions () {
|
||||||
|
|
||||||
//options.historyPanelWidth = hpanedl->get_position ();//older code
|
|
||||||
//options.toolPanelWidth = vboxright->get_width ();//older code
|
|
||||||
//options.toolPanelWidth = hpanedr->get_position ();//Hombre's change which screws up OSX build
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {
|
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {
|
||||||
|
|
||||||
|
@ -104,6 +104,10 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
virtual ~EditorPanel ();
|
virtual ~EditorPanel ();
|
||||||
|
|
||||||
void open (Thumbnail* tmb, rtengine::InitialImage* isrc);
|
void open (Thumbnail* tmb, rtengine::InitialImage* isrc);
|
||||||
|
void setAspect ();
|
||||||
|
void on_realize ();
|
||||||
|
void leftPaneButtonReleased(GdkEventButton *event);
|
||||||
|
void rightPaneButtonReleased(GdkEventButton *event);
|
||||||
|
|
||||||
void setParent (RTWindow* p) { parent = p; }
|
void setParent (RTWindow* p) { parent = p; }
|
||||||
|
|
||||||
@ -138,7 +142,7 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
Glib::ustring getFileName ();
|
Glib::ustring getFileName ();
|
||||||
bool handleShortcutKey (GdkEventKey* event);
|
bool handleShortcutKey (GdkEventKey* event);
|
||||||
|
|
||||||
void saveOptions ();
|
//void saveOptions ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +47,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
placespaned->pack1 (*placesBrowser, false, true);
|
placespaned->pack1 (*placesBrowser, false, true);
|
||||||
placespaned->pack2 (*obox, true, true);
|
placespaned->pack2 (*obox, true, true);
|
||||||
|
|
||||||
dirpaned->pack1 (*placespaned, true, true);
|
dirpaned->pack1 (*placespaned, false, true);
|
||||||
|
|
||||||
tpc = new BatchToolPanelCoordinator (this);
|
tpc = new BatchToolPanelCoordinator (this);
|
||||||
fileCatalog = new FileCatalog (tpc->coarse, tpc->getToolBar());
|
fileCatalog = new FileCatalog (tpc->coarse, tpc->getToolBar());
|
||||||
@ -88,8 +88,8 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
Gtk::Label* tagLab = new Gtk::Label (M("MAIN_TAB_TAGGING"));
|
Gtk::Label* tagLab = new Gtk::Label (M("MAIN_TAB_TAGGING"));
|
||||||
tagLab->set_angle (90);
|
tagLab->set_angle (90);
|
||||||
|
|
||||||
Gtk::VPaned* tpcPaned = new Gtk::VPaned ();
|
tpcPaned = new Gtk::VPaned ();
|
||||||
tpcPaned->pack1 (*tpc->toolPanelNotebook, true, true);
|
tpcPaned->pack1 (*tpc->toolPanelNotebook, false, true);
|
||||||
tpcPaned->pack2 (*history, true, true);
|
tpcPaned->pack2 (*history, true, true);
|
||||||
|
|
||||||
rightNotebook->append_page (*tpcPaned, *devLab);
|
rightNotebook->append_page (*tpcPaned, *devLab);
|
||||||
@ -99,9 +99,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
rightBox->pack_start (*rightNotebook);
|
rightBox->pack_start (*rightNotebook);
|
||||||
|
|
||||||
pack1(*dirpaned, true, true);
|
pack1(*dirpaned, true, true);
|
||||||
pack2(*rightBox, true, true);
|
pack2(*rightBox, false, true);
|
||||||
|
|
||||||
//set_position(options.browserToolPanelWidth);////Hombre's change which screws up OSX build
|
|
||||||
|
|
||||||
fileCatalog->setFileSelectionChangeListener (tpc);
|
fileCatalog->setFileSelectionChangeListener (tpc);
|
||||||
|
|
||||||
@ -111,6 +109,15 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
show_all ();
|
show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FilePanel::setAspect () {
|
||||||
|
int winW, winH;
|
||||||
|
parent->get_size(winW, winH);
|
||||||
|
placespaned->set_position(options.dirBrowserHeight);
|
||||||
|
dirpaned->set_position(options.dirBrowserWidth);
|
||||||
|
tpcPaned->set_position(options.browserToolPanelHeight);
|
||||||
|
set_position(winW - options.browserToolPanelWidth);
|
||||||
|
}
|
||||||
|
|
||||||
void FilePanel::init () {
|
void FilePanel::init () {
|
||||||
|
|
||||||
dirBrowser->fillDirTree ();
|
dirBrowser->fillDirTree ();
|
||||||
@ -161,9 +168,12 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::Initial
|
|||||||
|
|
||||||
void FilePanel::saveOptions () {
|
void FilePanel::saveOptions () {
|
||||||
|
|
||||||
//options.dirBrowserWidth = dirpaned->get_position ();
|
int winW, winH;
|
||||||
//options.dirBrowserHeight = placespaned->get_position ();
|
parent->get_size(winW, winH);
|
||||||
//options.browserToolPanelWidth = get_position();
|
options.dirBrowserWidth = dirpaned->get_position ();
|
||||||
|
options.dirBrowserHeight = placespaned->get_position ();
|
||||||
|
options.browserToolPanelWidth = winW - get_position();
|
||||||
|
options.browserToolPanelHeight = tpcPaned->get_position ();
|
||||||
if (options.startupDir==STARTUPDIR_LAST && fileCatalog->lastSelectedDir ()!="")
|
if (options.startupDir==STARTUPDIR_LAST && fileCatalog->lastSelectedDir ()!="")
|
||||||
options.startupPath = fileCatalog->lastSelectedDir ();
|
options.startupPath = fileCatalog->lastSelectedDir ();
|
||||||
fileCatalog->closeDir ();
|
fileCatalog->closeDir ();
|
||||||
|
@ -45,6 +45,7 @@ class FilePanel : public Gtk::HPaned,
|
|||||||
RecentBrowser* recentBrowser;
|
RecentBrowser* recentBrowser;
|
||||||
FileCatalog* fileCatalog; // filecatalog is the file browser with the button bar above it
|
FileCatalog* fileCatalog; // filecatalog is the file browser with the button bar above it
|
||||||
Gtk::HBox* rightBox;
|
Gtk::HBox* rightBox;
|
||||||
|
Gtk::VPaned* tpcPaned;
|
||||||
BatchToolPanelCoordinator* tpc;
|
BatchToolPanelCoordinator* tpc;
|
||||||
History* history;
|
History* history;
|
||||||
FilterPanel* filterPanel;
|
FilterPanel* filterPanel;
|
||||||
@ -58,6 +59,7 @@ class FilePanel : public Gtk::HPaned,
|
|||||||
|
|
||||||
void setParent (RTWindow* p) { parent = p; }
|
void setParent (RTWindow* p) { parent = p; }
|
||||||
void init (); // dont call it directly, the constructor calls it as idle source
|
void init (); // dont call it directly, the constructor calls it as idle source
|
||||||
|
void setAspect();
|
||||||
void open (const Glib::ustring& d); // open a file or a directory
|
void open (const Glib::ustring& d); // open a file or a directory
|
||||||
void refreshEditedState (const std::set<Glib::ustring>& efiles) { fileCatalog->refreshEditedState (efiles); }
|
void refreshEditedState (const std::set<Glib::ustring>& efiles) { fileCatalog->refreshEditedState (efiles); }
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ const char *DefaultLanguage = "English (US)";
|
|||||||
|
|
||||||
void Options::setDefaults () {
|
void Options::setDefaults () {
|
||||||
|
|
||||||
windowWidth = 1000;
|
windowWidth = 900;
|
||||||
windowHeight = 600;
|
windowHeight = 560;
|
||||||
windowMaximized = false;
|
windowMaximized = false;
|
||||||
firstRun = true;
|
firstRun = true;
|
||||||
savesParamsAtExit = true;
|
savesParamsAtExit = true;
|
||||||
@ -50,7 +50,7 @@ void Options::setDefaults () {
|
|||||||
saveFormat.tiffBits = 8;
|
saveFormat.tiffBits = 8;
|
||||||
saveFormat.tiffUncompressed = true;
|
saveFormat.tiffUncompressed = true;
|
||||||
saveFormat.saveParams = false;
|
saveFormat.saveParams = false;
|
||||||
savePathTemplate = "\%p1/converted/\%f";
|
savePathTemplate = "%p1/converted/%f";
|
||||||
savePathFolder = "";
|
savePathFolder = "";
|
||||||
saveUsePathTemplate = true;
|
saveUsePathTemplate = true;
|
||||||
defProfRaw = "default";
|
defProfRaw = "default";
|
||||||
@ -63,6 +63,7 @@ void Options::setDefaults () {
|
|||||||
dirBrowserHeight = 150;
|
dirBrowserHeight = 150;
|
||||||
toolPanelWidth = 300;
|
toolPanelWidth = 300;
|
||||||
browserToolPanelWidth = 300;
|
browserToolPanelWidth = 300;
|
||||||
|
browserToolPanelHeight = 300;
|
||||||
historyPanelWidth = 150;
|
historyPanelWidth = 150;
|
||||||
lastScale = 4;
|
lastScale = 4;
|
||||||
lastCropSize = 1;
|
lastCropSize = 1;
|
||||||
@ -246,12 +247,13 @@ if (keyFile.has_group ("GUI")) {
|
|||||||
if (keyFile.has_key ("GUI", "WindowWidth")) windowWidth = keyFile.get_integer ("GUI", "WindowWidth");
|
if (keyFile.has_key ("GUI", "WindowWidth")) windowWidth = keyFile.get_integer ("GUI", "WindowWidth");
|
||||||
if (keyFile.has_key ("GUI", "WindowHeight")) windowHeight = keyFile.get_integer ("GUI", "WindowHeight");
|
if (keyFile.has_key ("GUI", "WindowHeight")) windowHeight = keyFile.get_integer ("GUI", "WindowHeight");
|
||||||
if (keyFile.has_key ("GUI", "WindowMaximized")) windowMaximized = keyFile.get_boolean ("GUI", "WindowMaximized");
|
if (keyFile.has_key ("GUI", "WindowMaximized")) windowMaximized = keyFile.get_boolean ("GUI", "WindowMaximized");
|
||||||
if (keyFile.has_key ("GUI", "DirBrowserWidth")) dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth");
|
if (keyFile.has_key ("GUI", "DirBrowserWidth")) dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth");
|
||||||
if (keyFile.has_key ("GUI", "DirBrowserHeight")) dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight");
|
if (keyFile.has_key ("GUI", "DirBrowserHeight")) dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight");
|
||||||
if (keyFile.has_key ("GUI", "SaveAsDialogWidth")) saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth");
|
if (keyFile.has_key ("GUI", "SaveAsDialogWidth")) saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth");
|
||||||
if (keyFile.has_key ("GUI", "SaveAsDialogHeight")) saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight");
|
if (keyFile.has_key ("GUI", "SaveAsDialogHeight")) saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight");
|
||||||
if (keyFile.has_key ("GUI", "ToolPanelWidth")) toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth");
|
if (keyFile.has_key ("GUI", "ToolPanelWidth")) toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth");
|
||||||
if (keyFile.has_key ("GUI", "BrowserToolPanelWidth"))browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth");
|
if (keyFile.has_key ("GUI", "BrowserToolPanelWidth"))browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth");
|
||||||
|
if (keyFile.has_key ("GUI", "BrowserToolPanelHeight"))browserToolPanelHeight = keyFile.get_integer ("GUI", "BrowserToolPanelHeight");
|
||||||
if (keyFile.has_key ("GUI", "HistoryPanelWidth")) historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth");
|
if (keyFile.has_key ("GUI", "HistoryPanelWidth")) historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth");
|
||||||
if (keyFile.has_key ("GUI", "LastPreviewScale")) lastScale = keyFile.get_integer ("GUI", "LastPreviewScale");
|
if (keyFile.has_key ("GUI", "LastPreviewScale")) lastScale = keyFile.get_integer ("GUI", "LastPreviewScale");
|
||||||
if (keyFile.has_key ("GUI", "LastCropSize")) lastCropSize = keyFile.get_integer ("GUI", "LastCropSize");
|
if (keyFile.has_key ("GUI", "LastCropSize")) lastCropSize = keyFile.get_integer ("GUI", "LastCropSize");
|
||||||
@ -381,6 +383,7 @@ int Options::saveToFile (Glib::ustring fname) {
|
|||||||
keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight);
|
keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight);
|
||||||
keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth);
|
keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth);
|
||||||
keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth);
|
keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth);
|
||||||
|
keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight);
|
||||||
keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth);
|
keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth);
|
||||||
keyFile.set_integer ("GUI", "LastPreviewScale", lastScale);
|
keyFile.set_integer ("GUI", "LastPreviewScale", lastScale);
|
||||||
keyFile.set_integer ("GUI", "LastCropSize", lastCropSize);
|
keyFile.set_integer ("GUI", "LastCropSize", lastCropSize);
|
||||||
|
@ -66,6 +66,7 @@ class Options {
|
|||||||
int saveAsDialogHeight;
|
int saveAsDialogHeight;
|
||||||
int toolPanelWidth;
|
int toolPanelWidth;
|
||||||
int browserToolPanelWidth;
|
int browserToolPanelWidth;
|
||||||
|
int browserToolPanelHeight;
|
||||||
int historyPanelWidth;
|
int historyPanelWidth;
|
||||||
int windowWidth;
|
int windowWidth;
|
||||||
int windowHeight;
|
int windowHeight;
|
||||||
|
@ -47,6 +47,7 @@ RTWindow::RTWindow () {
|
|||||||
|
|
||||||
mainNB = Gtk::manage (new Gtk::Notebook ());
|
mainNB = Gtk::manage (new Gtk::Notebook ());
|
||||||
mainNB->set_scrollable (true);
|
mainNB->set_scrollable (true);
|
||||||
|
mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) );
|
||||||
|
|
||||||
fpanel = new FilePanel ();
|
fpanel = new FilePanel ();
|
||||||
fpanel->setParent (this);
|
fpanel->setParent (this);
|
||||||
@ -108,9 +109,30 @@ void RTWindow::on_realize () {
|
|||||||
|
|
||||||
Gtk::Window::on_realize ();
|
Gtk::Window::on_realize ();
|
||||||
|
|
||||||
|
fpanel->setAspect();
|
||||||
|
|
||||||
cursorManager.init (get_window());
|
cursorManager.init (get_window());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RTWindow::on_my_window_state_event(GdkEventWindowState* event) {
|
||||||
|
if (!event->new_window_state) {
|
||||||
|
// Window mode
|
||||||
|
options.windowMaximized = false;
|
||||||
|
}
|
||||||
|
else if (event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) {
|
||||||
|
// Fullscreen mode
|
||||||
|
options.windowMaximized = true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RTWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) {
|
||||||
|
if (page_num > 1) {
|
||||||
|
EditorPanel *ep = (EditorPanel *)mainNB->get_nth_page(page_num);
|
||||||
|
ep->setAspect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) {
|
void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) {
|
||||||
|
|
||||||
ep->setParent (this);
|
ep->setParent (this);
|
||||||
@ -133,7 +155,9 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) {
|
|||||||
hb->pack_end (*closeb);
|
hb->pack_end (*closeb);
|
||||||
hb->set_spacing (2);
|
hb->set_spacing (2);
|
||||||
hb->show_all ();
|
hb->show_all ();
|
||||||
|
|
||||||
mainNB->append_page (*ep, *hb);
|
mainNB->append_page (*ep, *hb);
|
||||||
|
//ep->setAspect ();
|
||||||
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);
|
||||||
|
|
||||||
@ -144,7 +168,7 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) {
|
|||||||
|
|
||||||
void RTWindow::remEditorPanel (EditorPanel* ep) {
|
void RTWindow::remEditorPanel (EditorPanel* ep) {
|
||||||
|
|
||||||
ep->saveOptions ();
|
//ep->saveOptions ();
|
||||||
epanels.erase (ep->getFileName());
|
epanels.erase (ep->getFileName());
|
||||||
filesEdited.erase (ep->getFileName ());
|
filesEdited.erase (ep->getFileName ());
|
||||||
fpanel->refreshEditedState (filesEdited);
|
fpanel->refreshEditedState (filesEdited);
|
||||||
@ -222,14 +246,10 @@ bool RTWindow::on_delete_event(GdkEventAny* event) {
|
|||||||
options.fbArrangement = fileBrowser->getFileCatalog()->getArrangement ();
|
options.fbArrangement = fileBrowser->getFileCatalog()->getArrangement ();
|
||||||
options.firstRun = false;
|
options.firstRun = false;
|
||||||
*/
|
*/
|
||||||
Gdk::WindowState state = get_window()->get_state();
|
if (!options.windowMaximized) {
|
||||||
if (!(state & (Gdk::WINDOW_STATE_MAXIMIZED | Gdk::WINDOW_STATE_FULLSCREEN))) {
|
|
||||||
options.windowWidth = get_width();
|
options.windowWidth = get_width();
|
||||||
options.windowHeight = get_height();
|
options.windowHeight = get_height();
|
||||||
options.windowMaximized = false;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
options.windowMaximized = true;
|
|
||||||
|
|
||||||
Options::save ();
|
Options::save ();
|
||||||
hide();
|
hide();
|
||||||
|
@ -52,7 +52,9 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
|||||||
|
|
||||||
bool keyPressed (GdkEventKey* event);
|
bool keyPressed (GdkEventKey* event);
|
||||||
bool on_delete_event(GdkEventAny* event);
|
bool on_delete_event(GdkEventAny* event);
|
||||||
|
bool on_my_window_state_event(GdkEventWindowState* event);
|
||||||
|
void on_mainNB_switch_page(GtkNotebookPage* page, guint page_num);
|
||||||
|
|
||||||
void imageDeveloped (Glib::ustring fname); // called by the batchqueue when it finishes an image
|
void imageDeveloped (Glib::ustring fname); // called by the batchqueue when it finishes an image
|
||||||
void showPreferences ();
|
void showPreferences ();
|
||||||
void on_realize ();
|
void on_realize ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user