Remember position of RT when not maximized, Issue 1624 comment #5
This commit is contained in:
parent
260e4da272
commit
649effe00b
@ -226,7 +226,9 @@ void Options::setDefaults () {
|
||||
|
||||
font = "sans, 8";
|
||||
windowWidth = 1200;
|
||||
windowHeight = 680;
|
||||
windowHeight = 680;
|
||||
windowX = 0;
|
||||
windowY = 0;
|
||||
windowMaximized = true;
|
||||
saveAsDialogWidth = 920;
|
||||
saveAsDialogHeight = 680;
|
||||
@ -703,6 +705,8 @@ if (keyFile.has_group ("GUI")) {
|
||||
if (keyFile.has_key ("GUI", "Font")) font = keyFile.get_string ("GUI", "Font");
|
||||
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", "WindowX")) windowX = keyFile.get_integer ("GUI", "WindowX");
|
||||
if (keyFile.has_key ("GUI", "WindowY")) windowY = keyFile.get_integer ("GUI", "WindowY");
|
||||
if (keyFile.has_key ("GUI", "WindowMaximized")) windowMaximized = keyFile.get_boolean ("GUI", "WindowMaximized");
|
||||
if (keyFile.has_key ("GUI", "DetailWindowWidth")) detailWindowWidth = keyFile.get_integer ("GUI", "DetailWindowWidth");
|
||||
if (keyFile.has_key ("GUI", "DetailWindowHeight")) detailWindowHeight = keyFile.get_integer ("GUI", "DetailWindowHeight");
|
||||
@ -993,7 +997,9 @@ int Options::saveToFile (Glib::ustring fname) {
|
||||
|
||||
keyFile.set_string ("GUI", "Font", font);
|
||||
keyFile.set_integer ("GUI", "WindowWidth", windowWidth);
|
||||
keyFile.set_integer ("GUI", "WindowHeight", windowHeight);
|
||||
keyFile.set_integer ("GUI", "WindowHeight", windowHeight);
|
||||
keyFile.set_integer ("GUI", "WindowX", windowX);
|
||||
keyFile.set_integer ("GUI", "WindowY", windowY);
|
||||
keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized);
|
||||
keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth);
|
||||
keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight);
|
||||
|
@ -112,7 +112,9 @@ class Options {
|
||||
int historyPanelWidth;
|
||||
Glib::ustring font;
|
||||
int windowWidth;
|
||||
int windowHeight;
|
||||
int windowHeight;
|
||||
int windowX;
|
||||
int windowY;
|
||||
bool windowMaximized;
|
||||
int detailWindowWidth;
|
||||
int detailWindowHeight;
|
||||
|
@ -123,8 +123,10 @@ RTWindow::RTWindow ()
|
||||
set_resizable(true);
|
||||
if (options.windowMaximized)
|
||||
maximize();
|
||||
else
|
||||
else {
|
||||
unmaximize();
|
||||
move(options.windowX,options.windowY);
|
||||
}
|
||||
|
||||
on_delete_has_run = false;
|
||||
is_fullscreen = false;
|
||||
@ -592,6 +594,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) {
|
||||
if (!options.windowMaximized) {
|
||||
options.windowWidth = get_width();
|
||||
options.windowHeight = get_height();
|
||||
get_position (options.windowX,options.windowY);
|
||||
}
|
||||
|
||||
Options::save ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user