summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-04 08:13:44 +0100
committerraveit65 <[email protected]>2021-03-19 08:20:21 +0100
commit57e08f3885e82d73a4e21137f2f88815c844ec60 (patch)
tree824ee637fe4393f4a4863a348b94629417a5b953 /capplets
parent1772e6c1b9cf4b964cd9d482a47cd37cdf5ea844 (diff)
downloadmate-control-center-57e08f3885e82d73a4e21137f2f88815c844ec60.tar.bz2
mate-control-center-57e08f3885e82d73a4e21137f2f88815c844ec60.tar.xz
default-applications: use gtk_builder_new_from_resource
Diffstat (limited to 'capplets')
-rw-r--r--capplets/default-applications/mate-da-capplet.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/capplets/default-applications/mate-da-capplet.c b/capplets/default-applications/mate-da-capplet.c
index 02db02f5..e5ade48b 100644
--- a/capplets/default-applications/mate-da-capplet.c
+++ b/capplets/default-applications/mate-da-capplet.c
@@ -586,23 +586,8 @@ show_dialog(MateDACapplet* capplet, const gchar* start_page)
#define get_widget(name) GTK_WIDGET(gtk_builder_get_object(builder, name))
GtkBuilder* builder;
- guint builder_result;
- capplet->builder = builder = gtk_builder_new ();
-
- builder_result = gtk_builder_add_from_resource (builder, "/org/mate/mcc/da/mate-default-applications-properties.ui", NULL);
-
- if (builder_result == 0)
- {
- GtkWidget* dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not load the main interface"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _("Please make sure that the applet is properly installed"));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-
- gtk_dialog_run(GTK_DIALOG(dialog));
-
- gtk_widget_destroy(dialog);
- exit(EXIT_FAILURE);
- }
+ capplet->builder = builder = gtk_builder_new_from_resource ("/org/mate/mcc/da/mate-default-applications-properties.ui");
capplet->window = get_widget("preferred_apps_dialog");