summaryrefslogtreecommitdiff
path: root/capplets/keybindings/mate-keybinding-properties.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-04 08:14:40 +0100
committerraveit65 <[email protected]>2021-03-19 08:20:21 +0100
commit4ab076eeb591f4bd9385181e91c77f49f1bd36ed (patch)
tree7dbf750db1dcc7454870a6d8b08ac6eaf18d6d51 /capplets/keybindings/mate-keybinding-properties.c
parent65212f4f0489bf3cc52332f2252c79f2b3d29f4c (diff)
downloadmate-control-center-4ab076eeb591f4bd9385181e91c77f49f1bd36ed.tar.bz2
mate-control-center-4ab076eeb591f4bd9385181e91c77f49f1bd36ed.tar.xz
keybindings: use gtk_builder_new_from_resource
Diffstat (limited to 'capplets/keybindings/mate-keybinding-properties.c')
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index 6b480ef5..fbf911fb 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -99,22 +99,6 @@ static GtkWidget* _gtk_builder_get_widget(GtkBuilder* builder, const gchar* name
return GTK_WIDGET (gtk_builder_get_object (builder, name));
}
-static GtkBuilder *
-create_builder (void)
-{
- GtkBuilder *builder = gtk_builder_new();
- GError *error = NULL;
-
- if (gtk_builder_add_from_resource (builder, "/org/mate/mcc/keybindings/mate-keybinding-properties.ui", &error) == 0) {
- g_warning ("Could not load UI: %s", error->message);
- g_error_free (error);
- g_object_unref (builder);
- builder = NULL;
- }
-
- return builder;
-}
-
static char* binding_name(guint keyval, guint keycode, EggVirtualModifierType mask, gboolean translate)
{
if (keyval != 0 || keycode != 0)
@@ -1982,10 +1966,7 @@ main (int argc, char *argv[])
activate_settings_daemon ();
- builder = create_builder ();
-
- if (!builder) /* Warning was already printed to console */
- exit (EXIT_FAILURE);
+ builder = gtk_builder_new_from_resource ("/org/mate/mcc/keybindings/mate-keybinding-properties.ui");
wm_common_register_window_manager_change ((GFunc) on_window_manager_change, builder);