From d9ea8554088ed225d603917bb3955b03e344dc4d Mon Sep 17 00:00:00 2001 From: Maxim Britov Date: Wed, 21 Apr 2021 23:32:59 +0300 Subject: [PATCH] panels: Fix build with NetworkManager disabled Gentoo allows the user to disable NetworkManager integration at build time. We use the existing HAVE_NETWORK_MANAGER preprocessor macro to guard the uses of the mobile_switch_changed_cb and wifi_switch_changed_cb functions that guard their definitions. Bug: https://bugs.gentoo.org/783144 Closes: #1335 --- panels/power/cc-power-panel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c index a96616ea3d..e728df90e3 100644 --- a/panels/power/cc-power-panel.c +++ b/panels/power/cc-power-panel.c @@ -1747,11 +1747,15 @@ cc_power_panel_class_init (CcPowerPanelClass *klass) gtk_widget_class_bind_template_callback (widget_class, has_kbd_brightness_cb); gtk_widget_class_bind_template_callback (widget_class, idle_delay_combo_changed_cb); gtk_widget_class_bind_template_callback (widget_class, keynav_failed_cb); +#ifdef HAVE_NETWORK_MANAGER gtk_widget_class_bind_template_callback (widget_class, mobile_switch_changed_cb); +#endif gtk_widget_class_bind_template_callback (widget_class, power_button_combo_changed_cb); gtk_widget_class_bind_template_callback (widget_class, power_profiles_row_activated_cb); gtk_widget_class_bind_template_callback (widget_class, power_saving_listbox_row_activated_cb); +#ifdef HAVE_NETWORK_MANAGER gtk_widget_class_bind_template_callback (widget_class, wifi_switch_changed_cb); +#endif } static void -- GitLab