Initializes the D-Bus connections to monitor power state. */
| 287 | |
| 288 | /* Initializes the D-Bus connections to monitor power state. */ |
| 289 | void |
| 290 | ghb_power_manager_init (signal_user_data_t *ud) |
| 291 | { |
| 292 | static size_t init = 0; |
| 293 | |
| 294 | if (g_once_init_enter(&init)) |
| 295 | { |
| 296 | upower_proxy_new_async(ud); |
| 297 | #if GLIB_CHECK_VERSION(2, 70, 0) |
| 298 | power_monitor = power_monitor_new(ud); |
| 299 | #endif |
| 300 | g_once_init_leave(&init, 1); |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | /* Resets the status when the start/pause button is clicked, in order to |
| 305 | * avoid phantom resumes. */ |
no test coverage detected