diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-15 23:53:03 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-12-15 23:53:03 +0200 |
commit | 5bb73e7ba0ada8b84991c784c7538aa14bc6b44e (patch) | |
tree | a0ea68b9d99424d3d47d3553badfd94079e213d3 /mesongui.py | |
parent | ae8d5c708037ac7a2440d3fbb0a2008d9a53b1ff (diff) | |
download | meson-5bb73e7ba0ada8b84991c784c7538aa14bc6b44e.zip meson-5bb73e7ba0ada8b84991c784c7538aa14bc6b44e.tar.gz meson-5bb73e7ba0ada8b84991c784c7538aa14bc6b44e.tar.bz2 |
Preserve window geometry over respawn.
Diffstat (limited to 'mesongui.py')
-rwxr-xr-x | mesongui.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mesongui.py b/mesongui.py index 0def104..4262596 100755 --- a/mesongui.py +++ b/mesongui.py @@ -388,6 +388,18 @@ class MesonGui(): def hide(self): self.ui.hide() + def geometry(self): + return self.ui.geometry() + + def move(self, x, y): + return self.ui.move(x, y) + + def size(self): + return self.ui.size() + + def resize(self, s): + return self.ui.resize(s) + def build_models(self): self.path_model = PathModel(self.coredata) self.target_model = TargetModel(self.build) @@ -511,8 +523,12 @@ class MesonGuiRespawner(): self.gui = MesonGui(self, self.arg) def respawn(self): + geo = self.gui.geometry() + s = self.gui.size() self.gui.hide() self.gui = MesonGui(self, self.arg) + self.gui.move(geo.x(), geo.y()) + self.gui.resize(s) # Garbage collection takes care of the old gui widget if __name__ == '__main__': |