summaryrefslogtreecommitdiff
path: root/panels
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2023-03-27 19:22:34 +0100
committerFelipe Borges <felipeborges@gnome.org>2023-04-17 12:14:58 +0000
commit92c4b6a706b32c2c5eb89b4169a7e21537a59c3c (patch)
tree994062cea9935184dae92d2fa6a960c91a2e5f35 /panels
parent9b940c27ca43602d6a389753d5d51daef18eecd0 (diff)
downloadgnome-control-center-92c4b6a706b32c2c5eb89b4169a7e21537a59c3c.tar.gz
Fix panel crashes due to unknown types in UI descriptions
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow' Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser' Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog' cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed dumped core Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow' Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
Diffstat (limited to 'panels')
-rw-r--r--panels/datetime/cc-datetime-panel.c4
-rw-r--r--panels/display/cc-display-panel.c1
-rw-r--r--panels/info-overview/cc-info-overview-panel.c2
-rw-r--r--panels/keyboard/cc-keyboard-panel.c1
-rw-r--r--panels/mouse/cc-mouse-panel.c1
-rw-r--r--panels/region/cc-region-panel.c2
-rw-r--r--panels/search/cc-search-panel.c3
-rw-r--r--panels/universal-access/cc-ua-panel.c2
-rw-r--r--panels/user-accounts/cc-user-panel.c2
9 files changed, 18 insertions, 0 deletions
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 6cd755fde..65a31800d 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -20,6 +20,7 @@
*/
#include "config.h"
+#include "cc-list-row.h"
#include "cc-time-editor.h"
#include "cc-datetime-panel.h"
#include "cc-datetime-resources.h"
@@ -812,6 +813,9 @@ cc_date_time_panel_class_init (CcDateTimePanelClass *klass)
panel_class->get_help_uri = cc_date_time_panel_get_help_uri;
+ g_type_ensure (CC_TYPE_LIST_ROW);
+ g_type_ensure (CC_TYPE_TZ_DIALOG);
+
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/datetime/cc-datetime-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, auto_datetime_row);
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 80fdaea20..06bd0e8e1 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -574,6 +574,7 @@ cc_display_panel_class_init (CcDisplayPanelClass *klass)
CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ g_type_ensure (CC_TYPE_LIST_ROW);
g_type_ensure (CC_TYPE_NIGHT_LIGHT_PAGE);
panel_class->get_help_uri = cc_display_panel_get_help_uri;
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 703edea0e..18d81495f 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -900,6 +900,8 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ g_type_ensure (CC_TYPE_HOSTNAME_ENTRY);
+
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/info-overview/cc-info-overview-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, disk_row);
diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c
index 08819bab7..8a1761067 100644
--- a/panels/keyboard/cc-keyboard-panel.c
+++ b/panels/keyboard/cc-keyboard-panel.c
@@ -182,6 +182,7 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass)
g_object_class_override_property (object_class, PROP_PARAMETERS, "parameters");
g_type_ensure (CC_TYPE_INPUT_LIST_BOX);
+ g_type_ensure (CC_TYPE_LIST_ROW);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/keyboard/cc-keyboard-panel.ui");
diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c
index 12fdb3fe4..853c6dd35 100644
--- a/panels/mouse/cc-mouse-panel.c
+++ b/panels/mouse/cc-mouse-panel.c
@@ -422,6 +422,7 @@ cc_mouse_panel_class_init (CcMousePanelClass *klass)
object_class->dispose = cc_mouse_panel_dispose;
+ g_type_ensure (CC_TYPE_ILLUSTRATED_ROW);
g_type_ensure (CC_TYPE_SPLIT_ROW);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/mouse/cc-mouse-panel.ui");
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 0ed1c5048..09f7726c1 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -835,6 +835,8 @@ cc_region_panel_class_init (CcRegionPanelClass * klass)
object_class->finalize = cc_region_panel_finalize;
+ g_type_ensure (CC_TYPE_LIST_ROW);
+
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/region/cc-region-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_row);
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index 473b9cadc..1d85f2278 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -18,6 +18,7 @@
* Author: Cosimo Cecchi <cosimoc@gnome.org>
*/
+#include "cc-list-row.h"
#include "cc-search-panel.h"
#include "cc-search-panel-row.h"
#include "cc-search-locations-dialog.h"
@@ -664,6 +665,8 @@ cc_search_panel_class_init (CcSearchPanelClass *klass)
oclass->finalize = cc_search_panel_finalize;
+ g_type_ensure (CC_TYPE_LIST_ROW);
+
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/search/cc-search-panel.ui");
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index e4453e1c1..f9af0d69c 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -182,6 +182,8 @@ cc_ua_panel_class_init (CcUaPanelClass *klass)
object_class->dispose = cc_ua_panel_dispose;
+ g_type_ensure (CC_TYPE_LIST_ROW);
+
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/universal-access/cc-ua-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, titlebar);
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index 012829160..f5faf673c 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -1469,6 +1469,8 @@ cc_user_panel_init (CcUserPanel *self)
/* register types that the builder might need */
type = cc_permission_infobar_get_type ();
+ g_type_ensure (CC_TYPE_AVATAR_CHOOSER);
+ g_type_ensure (CC_TYPE_LIST_ROW);
gtk_widget_init_template (GTK_WIDGET (self));