Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MainWindow: center with pantheon protocol #841

Merged
merged 5 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y desktop-file-utils gettext libadwaita-1-dev libdistinst-dev libgee-0.8-dev libgranite-7-dev libgtk-4-dev libxkbregistry-dev libjson-glib-dev libpwquality-dev meson valac
apt install -y desktop-file-utils gettext libadwaita-1-dev libdistinst-dev libgee-0.8-dev libgranite-7-dev libgtk-4-dev libxkbregistry-dev libjson-glib-dev libpantheon-wayland-1-dev libpwquality-dev meson valac
- name: Build and Test
env:
DESTDIR: out
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ You'll need the following dependencies:
- libgee-0.8-dev
- libadwaita-1-dev >=1.4.0
- libjson-glib-dev
- libpantheon-wayland-1-dev
- libpwquality-dev
- libxkbregistry-dev
- [distinst](https://github.com/pop-os/distinst/)
Expand Down
12 changes: 12 additions & 0 deletions data/installer.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="8.1.1" date="2024-10-23" urgency="medium">
<description>
<p>Improvements:</p>
<ul>
<li>Updated translations</li>
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/installer/issues/758">Installer UI is not centered</issue>
</issues>
</release>

<release version="8.1.0" date="2024-10-21" urgency="medium">
<description>
<p>Improvements:</p>
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ adw_dep = dependency('libadwaita-1', version: '>=1.4.0')
json_glib_dep = dependency('json-glib-1.0')
xkbregistry_dep = dependency('xkbregistry')
pwquality_dep = dependency('pwquality')
pantheon_wayland_dep = dependency('pantheon-wayland-1')
systemd_dep = dependency('systemd')

installer_backend = get_option('installer_backend')
Expand Down
7 changes: 6 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface UPower : GLib.Object {
public abstract bool on_battery { owned get; set; }
}

public class Installer.MainWindow : Gtk.ApplicationWindow {
public class Installer.MainWindow : Gtk.ApplicationWindow, PantheonWayland.ExtendedBehavior {
// We have to do it step by step because the vala compiler has overflows with big numbers.
private const uint64 ONE_GB = 1000 * 1000 * 1000;
// Minimum 15 GB
Expand Down Expand Up @@ -87,6 +87,11 @@ public class Installer.MainWindow : Gtk.ApplicationWindow {

return Source.REMOVE;
});

child.realize.connect (() => {
connect_to_shell ();
make_centered ();
});
}

private void load_keyboard_view () {
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ gui_dependencies = [
gtk_dep,
adw_dep,
json_glib_dep,
pantheon_wayland_dep,
pwquality_dep,
xkbregistry_dep
]
Expand Down