Skip to content

Commit

Permalink
gschema: remove window position (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Nov 10, 2023
1 parent 4cb55b3 commit 11f8a56
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions data/io.elementary.mail.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<summary>Whether the window was maximized on last run</summary>
<description>Whether the window was maximized on last run</description>
</key>
<key name="window-position" type="(ii)">
<default>(-1, -1)</default>
<summary>Window position</summary>
<description>Most recent window position (x, y)</description>
</key>
<key name="window-size" type="(ii)">
<default>(1024, 750)</default>
<summary>Most recent window size</summary>
Expand Down
8 changes: 0 additions & 8 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,8 @@ public class Mail.Application : Gtk.Application {
main_window = new MainWindow (this);
add_window (main_window);

int window_x, window_y;
var rect = Gtk.Allocation ();

settings.get ("window-position", "(ii)", out window_x, out window_y);
settings.get ("window-size", "(ii)", out rect.width, out rect.height);

if (window_x != -1 || window_y != -1) {
main_window.move (window_x, window_y);
}

main_window.set_allocation (rect);

if (settings.get_boolean ("window-maximized")) {
Expand Down
4 changes: 0 additions & 4 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,6 @@ public class Mail.MainWindow : Hdy.ApplicationWindow {
Gdk.Rectangle rect;
get_allocation (out rect);
Mail.Application.settings.set ("window-size", "(ii)", rect.width, rect.height);

int root_x, root_y;
get_position (out root_x, out root_y);
Mail.Application.settings.set ("window-position", "(ii)", root_x, root_y);
}

return false;
Expand Down

0 comments on commit 11f8a56

Please sign in to comment.