summaryrefslogtreecommitdiff
path: root/plugins/xrdb/msd-xrdb-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/xrdb/msd-xrdb-manager.c')
-rw-r--r--plugins/xrdb/msd-xrdb-manager.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/xrdb/msd-xrdb-manager.c b/plugins/xrdb/msd-xrdb-manager.c
index 7daefb9..f4c35a7 100644
--- a/plugins/xrdb/msd-xrdb-manager.c
+++ b/plugins/xrdb/msd-xrdb-manager.c
@@ -2,6 +2,7 @@
*
* Copyright (C) 2003 Ross Burton <[email protected]>
* Copyright (C) 2007 William Jon McCann <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,7 +47,6 @@
#define USER_X_RESOURCES ".Xresources"
#define USER_X_DEFAULTS ".Xdefaults"
-
struct MsdXrdbManagerPrivate {
GtkWidget* widget;
};
@@ -69,9 +69,9 @@ append_color_define (GString *string,
g_string_append_printf (string,
"#define %s #%2.2hx%2.2hx%2.2hx\n",
name,
- color->red>>8,
- color->green>>8,
- color->blue>>8);
+ (unsigned short) (color->red>>8),
+ (unsigned short) (color->green>>8),
+ (unsigned short) (color->blue>>8));
}
static GdkColor*
@@ -236,8 +236,7 @@ scan_for_files (MsdXrdbManager *manager,
if (local_error != NULL) {
g_propagate_error (error, local_error);
- g_slist_foreach (system_list, (GFunc)g_free, NULL);
- g_slist_free (system_list);
+ g_slist_free_full (system_list, g_free);
g_free (user_ad);
return NULL;
}
@@ -447,8 +446,7 @@ apply_settings (MsdXrdbManager *manager,
}
}
- g_slist_foreach (list, (GFunc)g_free, NULL);
- g_slist_free (list);
+ g_slist_free_full (list, g_free);
error = NULL;
append_xresource_file (USER_X_RESOURCES, string, &error);