Amend previous commit (window settings, ignore size)
When loading a session it is preferable to use the window size from Config's instant.xml (local machine screen sizes).
This commit is contained in:
parent
acf13e9498
commit
42cb321039
@ -372,38 +372,41 @@ ARDOUR_UI::apply_window_settings (bool with_size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLProperty const * prop;
|
XMLProperty const* prop;
|
||||||
gint x = -1;
|
|
||||||
gint y = -1;
|
|
||||||
gint w = -1;
|
|
||||||
gint h = -1;
|
|
||||||
|
|
||||||
if ((prop = mnode->property (X_("x"))) != 0) {
|
if (with_size) {
|
||||||
x = atoi (prop->value());
|
gint x = -1;
|
||||||
}
|
gint y = -1;
|
||||||
|
gint w = -1;
|
||||||
|
gint h = -1;
|
||||||
|
|
||||||
if ((prop = mnode->property (X_("y"))) != 0) {
|
if ((prop = mnode->property (X_("x"))) != 0) {
|
||||||
y = atoi (prop->value());
|
x = atoi (prop->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = mnode->property (X_("w"))) != 0) {
|
if ((prop = mnode->property (X_("y"))) != 0) {
|
||||||
w = atoi (prop->value());
|
y = atoi (prop->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = mnode->property (X_("h"))) != 0) {
|
if ((prop = mnode->property (X_("w"))) != 0) {
|
||||||
h = atoi (prop->value());
|
w = atoi (prop->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x >= 0 && y >= 0 && w >= 0 && h >= 0) {
|
if ((prop = mnode->property (X_("h"))) != 0) {
|
||||||
_main_window.set_position (Gtk::WIN_POS_NONE);
|
h = atoi (prop->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x >= 0 && y >= 0) {
|
if (x >= 0 && y >= 0 && w >= 0 && h >= 0) {
|
||||||
_main_window.move (x, y);
|
_main_window.set_position (Gtk::WIN_POS_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w > 0 && h > 0) {
|
if (x >= 0 && y >= 0) {
|
||||||
_main_window.set_default_size (w, h);
|
_main_window.move (x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (w > 0 && h > 0) {
|
||||||
|
_main_window.set_default_size (w, h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string current_tab;
|
std::string current_tab;
|
||||||
@ -414,9 +417,6 @@ ARDOUR_UI::apply_window_settings (bool with_size)
|
|||||||
current_tab = "editor";
|
current_tab = "editor";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "CURRENT TAB: " << current_tab << "\n";
|
|
||||||
|
|
||||||
|
|
||||||
if (mixer && current_tab == "mixer") {
|
if (mixer && current_tab == "mixer") {
|
||||||
_tabs.set_current_page (_tabs.page_num (mixer->contents()));
|
_tabs.set_current_page (_tabs.page_num (mixer->contents()));
|
||||||
} else if (rc_option_editor && current_tab == "preferences") {
|
} else if (rc_option_editor && current_tab == "preferences") {
|
||||||
|
Loading…
Reference in New Issue
Block a user