summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
Diffstat (limited to 'capplets')
-rw-r--r--capplets/accessibility/at-properties/main.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index 0bc6eea0..aaa71d8a 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -40,35 +40,25 @@ static GtkBuilder *
create_builder (void)
{
GtkBuilder *builder;
- GError *error = NULL;
+ GObject *object;
+ GDesktopAppInfo *app_info = NULL;
- builder = gtk_builder_new ();
-
- if (gtk_builder_add_from_resource (builder, "/org/mate/mcc/accessibility/at/at-enable-dialog.ui", &error)) {
- GObject *object;
- GDesktopAppInfo *app_info = NULL;
-
- object = gtk_builder_get_object (builder, "at_enable_image");
- gtk_image_set_from_file (GTK_IMAGE (object),
- PIXMAPDIR "/at-startup.png");
-
- object = gtk_builder_get_object (builder,
- "at_applications_image");
- gtk_image_set_from_file (GTK_IMAGE (object),
- PIXMAPDIR "/at-support.png");
- app_info = get_desktop_app_info_from_dm ();
- if (app_info == NULL) {
- object = gtk_builder_get_object (builder, "login_button");
- gtk_widget_hide (GTK_WIDGET (object));
- } else {
- g_object_unref (app_info);
- }
+ builder = gtk_builder_new_from_resource ("/org/mate/mcc/accessibility/at/at-enable-dialog.ui");
+
+ object = gtk_builder_get_object (builder, "at_enable_image");
+ gtk_image_set_from_file (GTK_IMAGE (object),
+ PIXMAPDIR "/at-startup.png");
+ object = gtk_builder_get_object (builder,
+ "at_applications_image");
+ gtk_image_set_from_file (GTK_IMAGE (object),
+ PIXMAPDIR "/at-support.png");
+ app_info = get_desktop_app_info_from_dm ();
+ if (app_info == NULL) {
+ object = gtk_builder_get_object (builder, "login_button");
+ gtk_widget_hide (GTK_WIDGET (object));
} else {
- g_warning ("Could not load UI: %s", error->message);
- g_error_free (error);
- g_object_unref (builder);
- builder = NULL;
+ g_object_unref (app_info);
}
return builder;