This commit is contained in:
Ulf
2013-06-14 23:15:20 +02:00
parent 87fcda0b31
commit 87cf0bad0f
2 changed files with 8 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ namespace PreviewToy
private void render_area_Click(object sender, EventArgs e) private void render_area_Click(object sender, EventArgs e)
{ {
bring_client_to_foreground(); bring_client_to_foreground();
spawner.preview_did_switch();
} }
public void set_render_area_size(Size size) public void set_render_area_size(Size size)

View File

@@ -137,7 +137,7 @@ namespace PreviewToy
{ {
try try
{ {
XElement rootElement = XElement.Load("config.xml"); XElement rootElement = XElement.Load("layout.xml");
foreach (var el in rootElement.Elements()) foreach (var el in rootElement.Elements())
{ {
Dictionary<String, Point> inner = new Dictionary<String, Point>(); Dictionary<String, Point> inner = new Dictionary<String, Point>();
@@ -155,6 +155,11 @@ namespace PreviewToy
} }
} }
public void preview_did_switch()
{
store_layout();
}
private void store_layout() private void store_layout()
{ {
XElement el = new XElement("layouts"); XElement el = new XElement("layouts");
@@ -180,7 +185,7 @@ namespace PreviewToy
el.Add(layout); el.Add(layout);
} }
el.Save("config.xml"); el.Save("layout.xml");
} }
private void handle_unique_layout(Preview preview, String last_known_active_window) private void handle_unique_layout(Preview preview, String last_known_active_window)