@@ -93,25 +93,47 @@ export default class Prefs extends ExtensionPreferences {
9393 } ) ;
9494 window . add ( page ) ;
9595
96- const group = new Adw . PreferencesGroup ( {
96+ const modes_group = new Adw . PreferencesGroup ( {
9797 title : __ ( 'Modes' ) ,
9898 description : __ ( 'Which buttons should be enabled' ) ,
9999 } ) ;
100- page . add ( group ) ;
100+ page . add ( modes_group ) ;
101101
102102 // Create a new preferences row
103103 const hibernate_row = new Adw . SwitchRow ( {
104104 title : __ ( 'Hibernate' ) ,
105105 } ) ;
106- group . add ( hibernate_row ) ;
106+ modes_group . add ( hibernate_row ) ;
107107 const hybrid_row = new Adw . SwitchRow ( {
108108 title : __ ( 'Hybrid sleep' ) ,
109109 } ) ;
110- group . add ( hybrid_row ) ;
110+ modes_group . add ( hybrid_row ) ;
111111 const suspend_then_hibernate_row = new Adw . SwitchRow ( {
112112 title : __ ( 'Suspend then hibernate' ) ,
113113 } ) ;
114- group . add ( suspend_then_hibernate_row ) ;
114+ modes_group . add ( suspend_then_hibernate_row ) ;
115+
116+ const dialog_group = new Adw . PreferencesGroup ( {
117+ title : __ ( 'Dialogs' ) ,
118+ description : __ ( 'Which dialogs should be enabled' ) ,
119+ } ) ;
120+ page . add ( dialog_group ) ;
121+
122+ // Create a new preferences row
123+ const hibernate_dialog_row = new Adw . SwitchRow ( {
124+ title : __ ( 'Hibernate' ) ,
125+ } ) ;
126+ dialog_group . add ( hibernate_dialog_row ) ;
127+ const hybrid_dialog_row = new Adw . SwitchRow ( {
128+ title : __ ( 'Hybrid sleep' ) ,
129+ subtitle : __ ( 'Not implemented yet' ) ,
130+ } ) ;
131+ dialog_group . add ( hybrid_dialog_row ) ;
132+ const suspend_then_hibernate_dialog_row = new Adw . SwitchRow ( {
133+ title : __ ( 'Suspend then hibernate' ) ,
134+ subtitle : __ ( 'Not implemented yet' ) ,
135+ } ) ;
136+ dialog_group . add ( suspend_then_hibernate_dialog_row ) ;
115137
116138 window . _settings = this . getSettings ( ) ;
117139 window . _settings . bind ( 'show-hibernate' , hibernate_row , 'active' ,
@@ -120,5 +142,11 @@ export default class Prefs extends ExtensionPreferences {
120142 Gio . SettingsBindFlags . DEFAULT ) ;
121143 window . _settings . bind ( 'show-suspend-then-hibernate' , suspend_then_hibernate_row , 'active' ,
122144 Gio . SettingsBindFlags . DEFAULT ) ;
145+ window . _settings . bind ( 'show-hibernate-dialog' , hibernate_dialog_row , 'active' ,
146+ Gio . SettingsBindFlags . DEFAULT ) ;
147+ window . _settings . bind ( 'show-hybrid-sleep-dialog' , hybrid_dialog_row , 'active' ,
148+ Gio . SettingsBindFlags . DEFAULT ) ;
149+ window . _settings . bind ( 'show-suspend-then-hibernate-dialog' , suspend_then_hibernate_dialog_row , 'active' ,
150+ Gio . SettingsBindFlags . DEFAULT ) ;
123151 }
124152}
0 commit comments