From a537c2b50f0bef9e8f0a89540fcba24bfbc9b6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 29 Jan 2024 16:52:44 -0800 Subject: [PATCH] Session: Fix dialog, gresource suspend icon (#17) --- data/icons/system-suspend.svg | 13 +++++++++++++ data/quick-settings.gresource.xml | 1 + src/PopoverWidget.vala | 5 +++++ src/Widgets/EndSessionDialog.vala | 1 + 4 files changed, 20 insertions(+) create mode 100644 data/icons/system-suspend.svg diff --git a/data/icons/system-suspend.svg b/data/icons/system-suspend.svg new file mode 100644 index 0000000..c9a260f --- /dev/null +++ b/data/icons/system-suspend.svg @@ -0,0 +1,13 @@ + + diff --git a/data/quick-settings.gresource.xml b/data/quick-settings.gresource.xml index 7dc2368..8ed165f 100644 --- a/data/quick-settings.gresource.xml +++ b/data/quick-settings.gresource.xml @@ -7,6 +7,7 @@ icons/dark-mode.svg + icons/system-suspend.svg icons/quick-settings.svg icons/rotation-allowed.svg icons/rotation-locked.svg diff --git a/src/PopoverWidget.vala b/src/PopoverWidget.vala index 7988721..11f9a47 100644 --- a/src/PopoverWidget.vala +++ b/src/PopoverWidget.vala @@ -243,6 +243,11 @@ public class QuickSettings.PopoverWidget : Gtk.Box { keybinding_settings.get_strv ("screensaver"), _("Lock") ); }); + + EndSessionDialogServer.init (); + EndSessionDialogServer.get_default ().show_dialog.connect ( + (type, timestamp) => show_dialog ((EndSessionDialogType) type, timestamp) + ); } private void update_navigation () { diff --git a/src/Widgets/EndSessionDialog.vala b/src/Widgets/EndSessionDialog.vala index 32f2ff9..52f6bf3 100644 --- a/src/Widgets/EndSessionDialog.vala +++ b/src/Widgets/EndSessionDialog.vala @@ -106,6 +106,7 @@ public class QuickSettings.EndSessionDialog : Hdy.Window { grid.attach (primary_label, 1, 0); grid.attach (secondary_label, 1, 1); grid.attach (action_area, 0, 2, 2, 1); + grid.show_all (); deletable = false; resizable = false;