summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2022-12-15 12:36:54 +0100
committerFelipe Borges <felipeborges@gnome.org>2022-12-15 14:02:02 +0100
commit22b5686943ff31e04a9cd07843c89171212e44ce (patch)
tree05902c44b40cb73e554b59e8759bf9a5edf30d2c /shell
parente46dd4c5d365ed47eacce5431c23a5f8d56cf581 (diff)
downloadgnome-control-center-22b5686943ff31e04a9cd07843c89171212e44ce.tar.gz
thunderbolt: Hide panel if there's no thunderbolt hardware
Same logic as the Wacom tablet panel. Fixes #612
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-panel-loader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index 17f96017f..7a8673edf 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -78,6 +78,9 @@ extern GType cc_diagnostics_panel_get_type (void);
/* Static init functions */
extern void cc_diagnostics_panel_static_init_func (void);
+#ifdef BUILD_THUNDERBOLT
+extern void cc_thunderbolt_panel_static_init_func (void);
+#endif /* BUILD_THUNDERBOLT */
#ifdef BUILD_NETWORK
extern void cc_wifi_panel_static_init_func (void);
#endif /* BUILD_NETWORK */
@@ -132,7 +135,7 @@ static CcPanelLoaderVtable default_panels[] =
PANEL_TYPE("sharing", cc_sharing_panel_get_type, NULL),
PANEL_TYPE("sound", cc_sound_panel_get_type, NULL),
#ifdef BUILD_THUNDERBOLT
- PANEL_TYPE("thunderbolt", cc_bolt_panel_get_type, NULL),
+ PANEL_TYPE("thunderbolt", cc_bolt_panel_get_type, cc_thunderbolt_panel_static_init_func),
#endif
PANEL_TYPE("universal-access", cc_ua_panel_get_type, NULL),
PANEL_TYPE("usage", cc_usage_panel_get_type, NULL),