summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-09-24 22:15:17 +0200
committerSebastian Dransfeld <sd@tango.flipp.net>2014-09-25 08:47:45 +0200
commitc700192736ef2ca8975a050e5be207df9f19f62c (patch)
treeaa6ef713612a7f475dffb5b8ab2b036e1496fb3b /src/lib/efreet
parent2efc718abf77e5e5a0f7109ae225b2a4b55b0daf (diff)
efreet: Accept both only_show_in and not_show_in
In one file it is allowed with both OnlyShowIn and NotShowIn, and it is the user who has to ensure that these lists don' clash. @fix
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_desktop.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c
index 25e59df1d9..6f0be5b422 100644
--- a/src/lib/efreet/efreet_desktop.c
+++ b/src/lib/efreet/efreet_desktop.c
@@ -823,7 +823,6 @@ static int
823efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini) 823efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini)
824{ 824{
825 const char *val; 825 const char *val;
826 const char *not_show_in = NULL, *only_show_in = NULL;
827 826
828 val = efreet_ini_localestring_get(ini, "Name"); 827 val = efreet_ini_localestring_get(ini, "Name");
829#ifndef STRICT_SPEC 828#ifndef STRICT_SPEC
@@ -851,12 +850,10 @@ efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini)
851 desktop->no_display = efreet_ini_boolean_get(ini, "NoDisplay"); 850 desktop->no_display = efreet_ini_boolean_get(ini, "NoDisplay");
852 desktop->hidden = efreet_ini_boolean_get(ini, "Hidden"); 851 desktop->hidden = efreet_ini_boolean_get(ini, "Hidden");
853 852
854 only_show_in = efreet_ini_string_get(ini, "OnlyShowIn"); 853 val = efreet_ini_string_get(ini, "OnlyShowIn");
855 not_show_in = efreet_ini_string_get(ini, "NotShowIn"); 854 if (val) desktop->only_show_in = efreet_desktop_string_list_parse(val);
856 if (only_show_in && not_show_in) 855 val = efreet_ini_string_get(ini, "NotShowIn");
857 WRN("Both OnlyShowIn and NotShowIn in %s, preferring OnlyShowIn", desktop->orig_path); 856 if (val) desktop->not_show_in = efreet_desktop_string_list_parse(val);
858 if (only_show_in) desktop->only_show_in = efreet_desktop_string_list_parse(only_show_in);
859 else if (not_show_in) desktop->not_show_in = efreet_desktop_string_list_parse(not_show_in);
860 857
861 return 1; 858 return 1;
862} 859}
@@ -979,7 +976,8 @@ efreet_desktop_environment_check(Efreet_Desktop *desktop)
979 break; 976 break;
980 } 977 }
981 } 978 }
982 return found; 979 if (found)
980 return 1;
983 } 981 }
984 982
985 983
@@ -993,7 +991,8 @@ efreet_desktop_environment_check(Efreet_Desktop *desktop)
993 break; 991 break;
994 } 992 }
995 } 993 }
996 return !found; 994 if (found)
995 return 0;
997 } 996 }
998 997
999 return 1; 998 return 1;