mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
query-settings: Indicate deprecated settings
This commit is contained in:
parent
0d8993fb24
commit
d4f0c9877d
@ -52,13 +52,15 @@ main (int argc, char **argv)
|
|||||||
GValue value = {0};
|
GValue value = {0};
|
||||||
GParamSpec *prop = props[i];
|
GParamSpec *prop = props[i];
|
||||||
gchar *value_str;
|
gchar *value_str;
|
||||||
int spacing = max_prop_name_length - strlen (prop->name);
|
int spacing = max_prop_name_length - strlen (prop->name) + 1;
|
||||||
|
gboolean deprecated;
|
||||||
|
|
||||||
if (pattern && !g_strrstr (prop->name, pattern))
|
if (pattern && !g_strrstr (prop->name, pattern))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
g_value_init (&value, prop->value_type);
|
g_value_init (&value, prop->value_type);
|
||||||
g_object_get_property (G_OBJECT (settings), prop->name, &value);
|
g_object_get_property (G_OBJECT (settings), prop->name, &value);
|
||||||
|
deprecated = prop->flags & G_PARAM_DEPRECATED;
|
||||||
|
|
||||||
if (G_VALUE_HOLDS_ENUM (&value))
|
if (G_VALUE_HOLDS_ENUM (&value))
|
||||||
{
|
{
|
||||||
@ -72,6 +74,12 @@ main (int argc, char **argv)
|
|||||||
value_str = g_strdup_value_contents (&value);
|
value_str = g_strdup_value_contents (&value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (deprecated)
|
||||||
|
{
|
||||||
|
printf ("!");
|
||||||
|
spacing --;
|
||||||
|
}
|
||||||
|
|
||||||
for (; spacing >= 0; spacing --)
|
for (; spacing >= 0; spacing --)
|
||||||
printf (" ");
|
printf (" ");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user