summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-21 14:57:09 +0100
committerLuke from DC <[email protected]>2021-02-01 04:08:07 +0000
commitbb300a8ff452b6f8a853b7da3de9922911c0aa32 (patch)
tree9a695100674ab9492e93cef883fa66bc9448ac28
parent0bd62655b7b298069fbe8618a30ccc996aef79f9 (diff)
downloadmate-settings-daemon-bb300a8ff452b6f8a853b7da3de9922911c0aa32.tar.bz2
mate-settings-daemon-bb300a8ff452b6f8a853b7da3de9922911c0aa32.tar.xz
mate-settings-daemon: Remove conversion warnings
-rw-r--r--mate-settings-daemon/mate-settings-manager.c8
-rw-r--r--mate-settings-daemon/mate-settings-plugin-info.c12
2 files changed, 7 insertions, 13 deletions
diff --git a/mate-settings-daemon/mate-settings-manager.c b/mate-settings-daemon/mate-settings-manager.c
index c21e80a..ed56f7b 100644
--- a/mate-settings-daemon/mate-settings-manager.c
+++ b/mate-settings-daemon/mate-settings-manager.c
@@ -124,13 +124,7 @@ static int
compare_priority (MateSettingsPluginInfo *a,
MateSettingsPluginInfo *b)
{
- int prio_a;
- int prio_b;
-
- prio_a = mate_settings_plugin_info_get_priority (a);
- prio_b = mate_settings_plugin_info_get_priority (b);
-
- return prio_a - prio_b;
+ return mate_settings_plugin_info_get_priority (a) - mate_settings_plugin_info_get_priority (b);
}
static void
diff --git a/mate-settings-daemon/mate-settings-plugin-info.c b/mate-settings-daemon/mate-settings-plugin-info.c
index 5db6e61..b20a9e1 100644
--- a/mate-settings-daemon/mate-settings-plugin-info.c
+++ b/mate-settings-daemon/mate-settings-plugin-info.c
@@ -53,20 +53,20 @@ struct MateSettingsPluginInfoPrivate
char *copyright;
char *website;
- MateSettingsPlugin *plugin;
+ MateSettingsPlugin *plugin;
- int enabled : 1;
- int active : 1;
+ guint enabled : 1;
+ guint active : 1;
/* A plugin is unavailable if it is not possible to activate it
due to an error loading the plugin module */
- int available : 1;
+ guint available : 1;
guint enabled_notification_id;
/* Priority determines the order in which plugins are started and
* stopped. A lower number means higher priority. */
- guint priority;
+ int priority;
};
@@ -515,7 +515,7 @@ mate_settings_plugin_info_set_schema (MateSettingsPluginInfo *info,
g_return_if_fail (MATE_IS_SETTINGS_PLUGIN_INFO (info));
info->priv->settings = g_settings_new (schema);
- info->priv->enabled = g_settings_get_boolean (info->priv->settings, "active");
+ info->priv->enabled = g_settings_get_boolean (info->priv->settings, "active") != FALSE;
priority = g_settings_get_int (info->priv->settings, "priority");
if (priority > 0)