forked from AuroraMiddleware/gtk
widget-factory: Catch errors
This speeds up the debugging when doing quick experimental changes to widget-factory.ui.
This commit is contained in:
parent
726a7ac705
commit
4a20a3fdb2
@ -1736,6 +1736,7 @@ activate (GApplication *app)
|
||||
gint i;
|
||||
GPermission *permission;
|
||||
GAction *action;
|
||||
GError *error = NULL;
|
||||
|
||||
g_object_get (gtk_settings_get_default (),
|
||||
"gtk-theme-name", ¤t_theme,
|
||||
@ -1768,7 +1769,11 @@ activate (GApplication *app)
|
||||
NULL);
|
||||
gtk_builder_set_scope (builder, scope);
|
||||
g_object_unref (scope);
|
||||
gtk_builder_add_from_resource (builder, "/org/gtk/WidgetFactory4/widget-factory.ui", NULL);
|
||||
if (!gtk_builder_add_from_resource (builder, "/org/gtk/WidgetFactory4/widget-factory.ui", &error))
|
||||
{
|
||||
g_critical ("%s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
window = (GtkWindow *)gtk_builder_get_object (builder, "window");
|
||||
gtk_application_add_window (GTK_APPLICATION (app), window);
|
||||
|
Loading…
Reference in New Issue
Block a user