summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-04 08:13:12 +0100
committerraveit65 <[email protected]>2021-03-19 08:20:21 +0100
commit1772e6c1b9cf4b964cd9d482a47cd37cdf5ea844 (patch)
tree2ef66f4e070f64c96d8a3d5f38a405ae126ff3db /capplets
parent3b7aaa17df85cd00bb76db17442a40214c6abdd8 (diff)
downloadmate-control-center-1772e6c1b9cf4b964cd9d482a47cd37cdf5ea844.tar.bz2
mate-control-center-1772e6c1b9cf4b964cd9d482a47cd37cdf5ea844.tar.xz
appearance: use gtk_builder_new_from_resource
Diffstat (limited to 'capplets')
-rw-r--r--capplets/appearance/appearance-main.c45
1 files changed, 17 insertions, 28 deletions
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index 87625b0e..87983195 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -37,41 +37,30 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context)
{
AppearanceData *data = NULL;
GtkBuilder *ui;
- GError *err = NULL;
theme_thumbnail_factory_init (*argc, *argv);
capplet_init (context, argc, argv);
activate_settings_daemon ();
/* set up the data */
- ui = gtk_builder_new ();
- gtk_builder_add_from_resource (ui, "/org/mate/mcc/appearance/data/appearance.ui", &err);
-
- if (err)
- {
- g_warning (_("Could not load user interface file: %s"), err->message);
- g_error_free (err);
- g_object_unref (ui);
- }
+ ui = gtk_builder_new_from_resource ("/org/mate/mcc/appearance/data/appearance.ui");
+
+ data = g_new (AppearanceData, 1);
+ data->settings = g_settings_new (APPEARANCE_SCHEMA);
+ data->wp_settings = g_settings_new (WP_SCHEMA);
+
+ if (mate_gsettings_schema_exists (CAJA_SCHEMA))
+ data->caja_settings = g_settings_new (CAJA_SCHEMA);
else
- {
- data = g_new (AppearanceData, 1);
- data->settings = g_settings_new (APPEARANCE_SCHEMA);
- data->wp_settings = g_settings_new (WP_SCHEMA);
-
- if (mate_gsettings_schema_exists (CAJA_SCHEMA))
- data->caja_settings = g_settings_new (CAJA_SCHEMA);
- else
- data->caja_settings = NULL;
-
- data->filechooser_settings = g_settings_new (FILECHOOSER_SCHEMA);
- data->interface_settings = g_settings_new (INTERFACE_SCHEMA);
- data->marco_settings = g_settings_new (MARCO_SCHEMA);
- data->mouse_settings = g_settings_new (MOUSE_SCHEMA);
- data->font_settings = g_settings_new (FONT_RENDER_SCHEMA);
- data->ui = ui;
- data->thumb_factory = mate_desktop_thumbnail_factory_new (MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL);
- }
+ data->caja_settings = NULL;
+
+ data->filechooser_settings = g_settings_new (FILECHOOSER_SCHEMA);
+ data->interface_settings = g_settings_new (INTERFACE_SCHEMA);
+ data->marco_settings = g_settings_new (MARCO_SCHEMA);
+ data->mouse_settings = g_settings_new (MOUSE_SCHEMA);
+ data->font_settings = g_settings_new (FONT_RENDER_SCHEMA);
+ data->ui = ui;
+ data->thumb_factory = mate_desktop_thumbnail_factory_new (MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL);
return data;
}