From b2fba2f21d6932a77153366a3a3a31bc77064e1e Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 24 Nov 2020 18:22:12 +0100 Subject: mate-keyboard-properties: drop create_dialog --- capplets/keyboard/mate-keyboard-properties.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'capplets/keyboard') diff --git a/capplets/keyboard/mate-keyboard-properties.c b/capplets/keyboard/mate-keyboard-properties.c index 22f6fa80..ff389cfe 100644 --- a/capplets/keyboard/mate-keyboard-properties.c +++ b/capplets/keyboard/mate-keyboard-properties.c @@ -50,23 +50,6 @@ static GSettings * keyboard_settings = NULL; static GSettings * interface_settings = NULL; static GSettings * typing_break_settings = NULL; -static GtkBuilder * -create_dialog (void) -{ - GtkBuilder *dialog; - GError *error = NULL; - - dialog = gtk_builder_new (); - if (gtk_builder_add_from_resource (dialog, "/org/mate/mcc/keyboard/mate-keyboard-properties-dialog.ui", &error) == 0) { - g_warning ("Could not load UI: %s", error->message); - g_error_free (error); - g_object_unref (dialog); - return NULL; - } - - return dialog; -} - static void dialog_response (GtkWidget * widget, gint response_id, guint data) @@ -211,9 +194,7 @@ main (int argc, char **argv) interface_settings = g_settings_new (INTERFACE_SCHEMA); typing_break_settings = g_settings_new (TYPING_BREAK_SCHEMA); - dialog = create_dialog (); - if (!dialog) /* Warning was already printed to console */ - exit (EXIT_FAILURE); + dialog = gtk_builder_new_from_resource ("/org/mate/mcc/keyboard/mate-keyboard-properties-dialog.ui"); setup_dialog (dialog); -- cgit v1.2.1