Commit 9a935911 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

theme: allow NULL as theme name

Theme name == NULL - use current GTK+ theme.
parent 649f588c
......@@ -999,15 +999,16 @@ theme_name_handler (GVariant *value,
*result = NULL; /* ignored */
string_value = g_variant_get_string (value, NULL);
if (!string_value || !*string_value)
return FALSE;
if (g_strcmp0 (current_theme, string_value) != 0)
{
if (current_theme)
g_free (current_theme);
current_theme = g_strdup (string_value);
if (!string_value || !*string_value)
current_theme = NULL;
else
current_theme = g_strdup (string_value);
queue_changed (META_PREF_THEME);
}
......
......@@ -5361,7 +5361,7 @@ meta_theme_set_current (const char *name,
if (!force_reload &&
meta_current_theme &&
strcmp (name, meta_current_theme->name) == 0)
g_strcmp0 (name, meta_current_theme->name) == 0)
return;
err = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment