summaryrefslogtreecommitdiff
path: root/capplets/keyboard
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-24 18:22:12 +0100
committerraveit65 <[email protected]>2020-12-06 00:37:17 +0100
commitb2fba2f21d6932a77153366a3a3a31bc77064e1e (patch)
tree59f2e53c3da25193e7d86d44a7b633fe8588717d /capplets/keyboard
parent4f7e3e12fe2427f4cb5aa3cfd68bdc8662672f08 (diff)
downloadmate-control-center-b2fba2f21d6932a77153366a3a3a31bc77064e1e.tar.bz2
mate-control-center-b2fba2f21d6932a77153366a3a3a31bc77064e1e.tar.xz
mate-keyboard-properties: drop create_dialog
Diffstat (limited to 'capplets/keyboard')
-rw-r--r--capplets/keyboard/mate-keyboard-properties.c21
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);