diff options
author | rbuj <[email protected]> | 2020-11-24 18:22:12 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-12-06 00:37:17 +0100 |
commit | b2fba2f21d6932a77153366a3a3a31bc77064e1e (patch) | |
tree | 59f2e53c3da25193e7d86d44a7b633fe8588717d | |
parent | 4f7e3e12fe2427f4cb5aa3cfd68bdc8662672f08 (diff) | |
download | mate-control-center-b2fba2f21d6932a77153366a3a3a31bc77064e1e.tar.bz2 mate-control-center-b2fba2f21d6932a77153366a3a3a31bc77064e1e.tar.xz |
mate-keyboard-properties: drop create_dialog
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties.c | 21 |
1 files changed, 1 insertions, 20 deletions
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); |