Skip to content
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
1 change: 1 addition & 0 deletions data/greeter.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<issue url="https://github.com/elementary/greeter/issues/689">Does not follow the "automatic" accent color (based on wallpaper)</issue>
<issue url="https://github.com/elementary/greeter/issues/699">Num lock/Caps lock labels are not centered</issue>
<issue url="https://github.com/elementary/greeter/issues/790">add support for mutter 48 / libmutter-16</issue>
<issue url="https://github.com/elementary/greeter/issues/818">Automatically switch the session to X11 if a11y tools are used</issue>
</issues>
</release>

Expand Down
420 changes: 420 additions & 0 deletions data/icons/48.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/io.elementary.greeter.desktop.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[Desktop Entry]
Name=Pantheon Greeter
Comment=Pantheon Greeter
Icon=io.elementary.greeter.settings
Exec=@PROJECT_NAME@-compositor
Type=Application
NoDisplay=true
17 changes: 17 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ test (
find_program('desktop-file-validate'),
args: join_paths(meson.current_build_dir (), meson.project_name() + '.desktop')
)

# For notifications
install_data(
desktop_in,
install_dir: get_option('datadir') / 'applications',
)

install_data(
'icons' / '48.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / '48x48' / 'apps',
rename: meson.project_name() + '.settings.svg'
)
install_data(
'icons' / '48.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / '48x48@2' / 'apps',
rename: meson.project_name() + '.settings.svg'
)
5 changes: 4 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@ if vapigen.found()
subdir('vapi')
endif

gnome.post_install(glib_compile_schemas: true)
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true
)
23 changes: 23 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,29 @@ public class Greeter.Application : Gtk.Application {
});

add_action (select_session_action);

var a11y_settings = new GLib.Settings ("org.gnome.desktop.a11y.applications");
a11y_settings.changed.connect ((key) => {
if (key != "screen-keyboard-enabled" && key != "screen-reader-enabled") {
return;
}

if (!a11y_settings.get_boolean (key)) {
return;
}

if (select_session_action.get_state ().get_string () != "pantheon-wayland") {
return;
}

select_session_action.set_state (new Variant.string ("pantheon"));

var notification = new Notification (_("Classic session automatically selected"));
notification.set_body (_("Accessibility features may be unavailable in the Secure session"));
notification.set_icon (new ThemedIcon ("preferences-desktop-accessibility"));

send_notification ("session-type", notification);
});
}

public override void activate () {
Expand Down