Skip to content

Commit

Permalink
gschema: remove window position (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Nov 10, 2023
1 parent 851f79e commit 66c5cb7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions data/gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,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>(1000, 800)</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 @@ -100,16 +100,8 @@ public class Tasks.Application : Gtk.Application {
var 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
3 changes: 0 additions & 3 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,6 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow {
get_allocation (out rect);
Tasks.Application.settings.set ("window-size", "(ii)", rect.width, rect.height);

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

return false;
Expand Down

0 comments on commit 66c5cb7

Please sign in to comment.