@@ -99,7 +99,11 @@ export default class Prefs extends ExtensionPreferences {
9999 } ) ;
100100 page . add ( modes_group ) ;
101101
102- // Create a new preferences row
102+ const suspend_row = new Adw . SwitchRow ( {
103+ title : __ ( 'Suspend' ) ,
104+ subtitle : __ ( 'Not implemented yet' ) ,
105+ } ) ;
106+ modes_group . add ( suspend_row ) ;
103107 const hibernate_row = new Adw . SwitchRow ( {
104108 title : __ ( 'Hibernate' ) ,
105109 } ) ;
@@ -112,14 +116,23 @@ export default class Prefs extends ExtensionPreferences {
112116 title : __ ( 'Suspend then hibernate' ) ,
113117 } ) ;
114118 modes_group . add ( suspend_then_hibernate_row ) ;
119+ const restart_row = new Adw . SwitchRow ( {
120+ title : __ ( 'Restart...' ) ,
121+ subtitle : __ ( 'Not implemented yet' ) ,
122+ } ) ;
123+ modes_group . add ( restart_row ) ;
124+ const shutdown_row = new Adw . SwitchRow ( {
125+ title : __ ( 'Shutdown...' ) ,
126+ subtitle : __ ( 'Not implemented yet' ) ,
127+ } ) ;
128+ modes_group . add ( shutdown_row ) ;
115129
116130 const dialog_group = new Adw . PreferencesGroup ( {
117131 title : __ ( 'Dialogs' ) ,
118132 description : __ ( 'Which dialogs should be enabled' ) ,
119133 } ) ;
120134 page . add ( dialog_group ) ;
121135
122- // Create a new preferences row
123136 const hibernate_dialog_row = new Adw . SwitchRow ( {
124137 title : __ ( 'Hibernate' ) ,
125138 } ) ;
@@ -136,12 +149,18 @@ export default class Prefs extends ExtensionPreferences {
136149 dialog_group . add ( suspend_then_hibernate_dialog_row ) ;
137150
138151 window . _settings = this . getSettings ( ) ;
152+ window . _settings . bind ( 'show-suspend' , suspend_row , 'active' ,
153+ Gio . SettingsBindFlags . DEFAULT ) ;
139154 window . _settings . bind ( 'show-hibernate' , hibernate_row , 'active' ,
140155 Gio . SettingsBindFlags . DEFAULT ) ;
141156 window . _settings . bind ( 'show-hybrid-sleep' , hybrid_row , 'active' ,
142157 Gio . SettingsBindFlags . DEFAULT ) ;
143158 window . _settings . bind ( 'show-suspend-then-hibernate' , suspend_then_hibernate_row , 'active' ,
144159 Gio . SettingsBindFlags . DEFAULT ) ;
160+ window . _settings . bind ( 'show-restart' , restart_row , 'active' ,
161+ Gio . SettingsBindFlags . DEFAULT ) ;
162+ window . _settings . bind ( 'show-shutdown' , shutdown_row , 'active' ,
163+ Gio . SettingsBindFlags . DEFAULT ) ;
145164 window . _settings . bind ( 'show-hibernate-dialog' , hibernate_dialog_row , 'active' ,
146165 Gio . SettingsBindFlags . DEFAULT ) ;
147166 window . _settings . bind ( 'show-hybrid-sleep-dialog' , hybrid_dialog_row , 'active' ,
0 commit comments