summaryrefslogtreecommitdiff
path: root/mate-panel/libpanel-util/panel-xdg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/libpanel-util/panel-xdg.c')
-rw-r--r--mate-panel/libpanel-util/panel-xdg.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/mate-panel/libpanel-util/panel-xdg.c b/mate-panel/libpanel-util/panel-xdg.c
index bcdbb5fa..361f413c 100644
--- a/mate-panel/libpanel-util/panel-xdg.c
+++ b/mate-panel/libpanel-util/panel-xdg.c
@@ -2,6 +2,7 @@
* panel-xdg.c: miscellaneous XDG-related functions.
*
* Copyright (C) 2010 Novell, Inc.
+ * 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
@@ -117,18 +118,12 @@ panel_xdg_icon_name_from_icon_path (const char *path,
gboolean current;
theme_dir = g_file_get_child (parent, theme_name);
-
- current = FALSE;
- if (g_file_has_prefix (file, theme_dir)) {
- /* it's the current one */
- current = TRUE;
- } else {
- /* it's the default one */
+ if ((current = g_file_has_prefix (file, theme_dir)) == FALSE) {
+ /* fallback icon theme? */
g_object_unref (theme_dir);
theme_dir = g_file_get_child (parent, DEFAULT_THEME_NAME);
current = g_file_has_prefix (file, theme_dir);
}
-
g_object_unref (theme_dir);
if (current) {