Skip to content

Commit

Permalink
gschema: remove window position (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Nov 10, 2023
1 parent 3450d38 commit d621b45
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions data/io.elementary.calendar.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,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
7 changes: 0 additions & 7 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,13 @@ namespace Maya {
* Initializes the graphical window and its components
*/
void init_gui () {
int window_x, window_y;
var rect = Gtk.Allocation ();

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

window = new MainWindow (this);
window.title = _(Build.APP_NAME);
window.set_allocation (rect);

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

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

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

return GLib.Source.REMOVE;
Expand Down

0 comments on commit d621b45

Please sign in to comment.