summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-09-29 09:39:17 +0200
committerSebastian Dransfeld <sd@tango.flipp.net>2014-09-29 09:39:38 +0200
commitb624345bbd577cfee7746abef0cb0595dbd9b72b (patch)
tree77aa2bfecdc50d4572aee722d407efcf7bccf6f1 /src/lib/efreet
parentd8aead7ab825eaca1bb3dda20946968f4b8680f3 (diff)
efreet: improve messages
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_cache.c14
-rw-r--r--src/lib/efreet/efreet_desktop.c7
-rw-r--r--src/lib/efreet/efreet_desktop_command.c4
-rw-r--r--src/lib/efreet/efreet_icon.c6
-rw-r--r--src/lib/efreet/efreet_ini.c4
-rw-r--r--src/lib/efreet/efreet_menu.c42
-rw-r--r--src/lib/efreet/efreet_trash.c8
-rw-r--r--src/lib/efreet/efreet_xml.c2
8 files changed, 48 insertions, 39 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index 23c9e4462f..27425456bf 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -665,7 +665,7 @@ efreet_cache_icon_find(Efreet_Icon_Theme *theme, const char *icon)
665 if (theme_name && strcmp(theme_name, theme->name.internal)) 665 if (theme_name && strcmp(theme_name, theme->name.internal))
666 { 666 {
667 /* FIXME: this is bad if people have pointer to this cache, things will go wrong */ 667 /* FIXME: this is bad if people have pointer to this cache, things will go wrong */
668 INF("theme_name change from `%s` to `%s`", theme_name, theme->name.internal); 668 INF("theme_name change from '%s' to '%s'", theme_name, theme->name.internal);
669 IF_RELEASE(theme_name); 669 IF_RELEASE(theme_name);
670 icon_cache = efreet_cache_close(icon_cache); 670 icon_cache = efreet_cache_close(icon_cache);
671 eina_hash_free(icons); 671 eina_hash_free(icons);
@@ -824,13 +824,13 @@ efreet_cache_desktop_find(const char *file)
824 /* If less than one second since last stat, return desktop */ 824 /* If less than one second since last stat, return desktop */
825 if ((ecore_time_get() - cache->check_time) < 1) 825 if ((ecore_time_get() - cache->check_time) < 1)
826 { 826 {
827 INF("Return without stat %f %f", ecore_time_get(), cache->check_time); 827 INF("Return without stat %f %f for file '%s'", ecore_time_get(), cache->check_time, file);
828 eina_lock_release(&_lock); 828 eina_lock_release(&_lock);
829 return &cache->desktop; 829 return &cache->desktop;
830 } 830 }
831 if (cache->desktop.load_time == ecore_file_mod_time(cache->desktop.orig_path)) 831 if (cache->desktop.load_time == ecore_file_mod_time(cache->desktop.orig_path))
832 { 832 {
833 INF("Return with stat %f %f", ecore_time_get(), cache->check_time); 833 INF("Return with stat %f %f for file '%s'", ecore_time_get(), cache->check_time, file);
834 cache->check_time = ecore_time_get(); 834 cache->check_time = ecore_time_get();
835 eina_lock_release(&_lock); 835 eina_lock_release(&_lock);
836 return &cache->desktop; 836 return &cache->desktop;
@@ -848,7 +848,7 @@ efreet_cache_desktop_find(const char *file)
848 if (cache->desktop.load_time != ecore_file_mod_time(cache->desktop.orig_path)) 848 if (cache->desktop.load_time != ecore_file_mod_time(cache->desktop.orig_path))
849 { 849 {
850 /* Don't return stale data */ 850 /* Don't return stale data */
851 INF("We got stale data in the desktop cache"); 851 INF("We got stale data in the desktop cache for file '%s'", cache->desktop.orig_path);
852 efreet_cache_desktop_free(&cache->desktop); 852 efreet_cache_desktop_free(&cache->desktop);
853 eina_hash_set(desktops, file, NON_EXISTING); 853 eina_hash_set(desktops, file, NON_EXISTING);
854 } 854 }
@@ -883,7 +883,7 @@ efreet_cache_desktop_free(Efreet_Desktop *desktop)
883 curr = eina_hash_find(desktops, desktop->orig_path); 883 curr = eina_hash_find(desktops, desktop->orig_path);
884 if (curr == desktop) 884 if (curr == desktop)
885 { 885 {
886 INF("Found in current cache, purge\n"); 886 INF("Found '%s' in current cache, purge", desktop->orig_path);
887 eina_hash_del_by_key(desktops, desktop->orig_path); 887 eina_hash_del_by_key(desktops, desktop->orig_path);
888 } 888 }
889 889
@@ -892,11 +892,11 @@ efreet_cache_desktop_free(Efreet_Desktop *desktop)
892 curr = eina_hash_find(d->hash, desktop->orig_path); 892 curr = eina_hash_find(d->hash, desktop->orig_path);
893 if (curr == desktop) 893 if (curr == desktop)
894 { 894 {
895 INF("Found in old cache, purge\n"); 895 INF("Found '%s' in old cache, purge", desktop->orig_path);
896 eina_hash_del_by_key(d->hash, desktop->orig_path); 896 eina_hash_del_by_key(d->hash, desktop->orig_path);
897 if (eina_hash_population(d->hash) == 0) 897 if (eina_hash_population(d->hash) == 0)
898 { 898 {
899 INF("Cache empty, close file\n"); 899 INF("Cache empty, close file");
900 eina_hash_free(d->hash); 900 eina_hash_free(d->hash);
901 eet_close(d->ef); 901 eet_close(d->ef);
902 free(d); 902 free(d);
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c
index f857de8fa7..2645c94c1e 100644
--- a/src/lib/efreet/efreet_desktop.c
+++ b/src/lib/efreet/efreet_desktop.c
@@ -571,8 +571,7 @@ efreet_desktop_string_list_parse(const char *string)
571 if (*s) 571 if (*s)
572 { 572 {
573#ifdef STRICT_SPEC 573#ifdef STRICT_SPEC
574 WRN("[Efreet]: Found a string list without ';' " 574 WRN("Found a string list without ';' at the end: '%s'", string);
575 "at the end: %s", string);
576#endif 575#endif
577 list = eina_list_append(list, (void *)eina_stringshare_add(s)); 576 list = eina_list_append(list, (void *)eina_stringshare_add(s));
578 } 577 }
@@ -644,7 +643,7 @@ efreet_desktop_read(Efreet_Desktop *desktop)
644 if (!ok) ok = efreet_ini_section_set(ini, "KDE Desktop Entry"); 643 if (!ok) ok = efreet_ini_section_set(ini, "KDE Desktop Entry");
645 if (!ok) 644 if (!ok)
646 { 645 {
647 ERR("efreet_desktop_new error: no Desktop Entry section"); 646 ERR("no Desktop Entry section in file '%s'", desktop->orig_path);
648 error = 1; 647 error = 1;
649 } 648 }
650 649
@@ -957,7 +956,7 @@ efreet_desktop_generic_fields_parse(Efreet_Desktop *desktop, Efreet_Ini *ini)
957 if (val) desktop->name = strdup(val); 956 if (val) desktop->name = strdup(val);
958 else 957 else
959 { 958 {
960 ERR("efreet_desktop_generic_fields_parse error: no Name or _Name fields"); 959 ERR("no Name or _Name fields in file '%s'", desktop->orig_path);
961 return 0; 960 return 0;
962 } 961 }
963 962
diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c
index c6c8d189e9..2748d0c40b 100644
--- a/src/lib/efreet/efreet_desktop_command.c
+++ b/src/lib/efreet/efreet_desktop_command.c
@@ -403,7 +403,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
403 break; 403 break;
404 case 'v': 404 case 'v':
405 case 'm': 405 case 'm':
406 WRN("[Efreet]: Deprecated conversion char: '%c' in file '%s'", 406 WRN("Deprecated conversion char: '%c' in file '%s'",
407 *p, command->desktop->orig_path); 407 *p, command->desktop->orig_path);
408 break; 408 break;
409 case '%': 409 case '%':
@@ -411,7 +411,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
411 break; 411 break;
412 default: 412 default:
413#ifdef STRICT_SPEC 413#ifdef STRICT_SPEC
414 WRN("[Efreet_desktop]: Unknown conversion character: '%c'", *p); 414 WRN("Unknown conversion character: '%c' in file '%s'", *p, command->desktop->orig_path);
415#endif 415#endif
416 break; 416 break;
417 } 417 }
diff --git a/src/lib/efreet/efreet_icon.c b/src/lib/efreet/efreet_icon.c
index 70e7fca278..4ad8a6bf7b 100644
--- a/src/lib/efreet/efreet_icon.c
+++ b/src/lib/efreet/efreet_icon.c
@@ -197,7 +197,7 @@ efreet_icon_remove_extension(const char *icon)
197 if (!strcmp(ext, ext2)) 197 if (!strcmp(ext, ext2))
198 { 198 {
199#ifdef STRICT_SPEC 199#ifdef STRICT_SPEC
200 WRN("[Efreet]: Requesting an icon with an extension: %s", 200 WRN("Requesting an icon with an extension: %s",
201 icon); 201 icon);
202#endif 202#endif
203 *ext = '\0'; 203 *ext = '\0';
@@ -232,7 +232,7 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz
232 Efreet_Cache_Icon *cache; 232 Efreet_Cache_Icon *cache;
233 cache = efreet_cache_icon_find(theme, tmp); 233 cache = efreet_cache_icon_find(theme, tmp);
234 value = efreet_icon_lookup_icon(cache, size); 234 value = efreet_icon_lookup_icon(cache, size);
235 if (!value) INF("lookup for `%s` failed in theme `%s` with %p.", icon, theme_name, cache); 235 if (!value) INF("lookup for '%s' failed in theme '%s' with %p.", icon, theme_name, cache);
236 } 236 }
237 237
238 /* we didn't find the icon in the theme or in the inherited directories 238 /* we didn't find the icon in the theme or in the inherited directories
@@ -244,7 +244,7 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz
244 244
245 cache = efreet_cache_icon_fallback_find(tmp); 245 cache = efreet_cache_icon_fallback_find(tmp);
246 value = efreet_icon_fallback_lookup_path(cache); 246 value = efreet_icon_fallback_lookup_path(cache);
247 if (!value) INF("lookup for `%s` failed in fallback too with %p.", icon, cache); 247 if (!value) INF("lookup for '%s' failed in fallback too with %p.", icon, cache);
248 } 248 }
249 249
250#ifdef SLOPPY_SPEC 250#ifdef SLOPPY_SPEC
diff --git a/src/lib/efreet/efreet_ini.c b/src/lib/efreet/efreet_ini.c
index fec11c3e3f..dc35d8550b 100644
--- a/src/lib/efreet/efreet_ini.c
+++ b/src/lib/efreet/efreet_ini.c
@@ -143,7 +143,7 @@ efreet_ini_parse(const char *file)
143 143
144 if (!section) 144 if (!section)
145 { 145 {
146 INF("Invalid file (%s) (missing section)", file); 146 INF("Invalid file '%s' (missing section)", file);
147 goto error; 147 goto error;
148 } 148 }
149 149
@@ -207,7 +207,7 @@ efreet_ini_parse(const char *file)
207 else 207 else
208 { 208 {
209 /* invalid file... */ 209 /* invalid file... */
210 INF("Invalid file (%s) (missing = from key=value pair)", file); 210 INF("Invalid file '%s' (missing = from key=value pair)", file);
211 goto error; 211 goto error;
212 } 212 }
213 } 213 }
diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c
index 0bd69eb4ca..ada789b7e0 100644
--- a/src/lib/efreet/efreet_menu.c
+++ b/src/lib/efreet/efreet_menu.c
@@ -625,7 +625,7 @@ efreet_menu_parse(const char *path)
625 /* make sure we've got a <Menu> to start with */ 625 /* make sure we've got a <Menu> to start with */
626 if (xml->tag != efreet_tag_menu) 626 if (xml->tag != efreet_tag_menu)
627 { 627 {
628 WRN("Efreet_menu: Menu file didn't start with <Menu> tag."); 628 WRN("Menu file didn't start with <Menu> tag: '%s'", path);
629 efreet_xml_del(xml); 629 efreet_xml_del(xml);
630 return NULL; 630 return NULL;
631 } 631 }
@@ -875,7 +875,7 @@ efreet_menu_handle_menu(Efreet_Menu_Internal *internal, Efreet_Xml *xml)
875 } 875 }
876 else 876 else
877 { 877 {
878 WRN("Unknown XML tag: %s", child->tag); 878 WRN("Unknown XML tag '%s' in file '%s/%s'", child->tag, internal->file.path, internal->file.name);
879 return 0; 879 return 0;
880 } 880 }
881 } 881 }
@@ -1068,7 +1068,7 @@ efreet_menu_handle_name(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1068 /* not allowed to have two Name settings in a menu */ 1068 /* not allowed to have two Name settings in a menu */
1069 if (parent->name.internal) 1069 if (parent->name.internal)
1070 { 1070 {
1071 INF("efreet_menu_handle_name() setting second name into menu"); 1071 INF("efreet_menu_handle_name() setting second name into menu: '%s/%s'", parent->file.path, parent->file.name);
1072 return 0; 1072 return 0;
1073 } 1073 }
1074 /* ignore the name if it is empty */ 1074 /* ignore the name if it is empty */
@@ -1351,7 +1351,7 @@ efreet_menu_handle_merge_file(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1351 1351
1352 if (!parent->file.path) 1352 if (!parent->file.path)
1353 { 1353 {
1354 INF("efreet_menu_handle_merge_file() missing menu path ..."); 1354 INF("efreet_menu_handle_merge_file() missing menu path ... '%s'", parent->file.name);
1355 return 0; 1355 return 0;
1356 } 1356 }
1357 1357
@@ -1443,7 +1443,7 @@ efreet_menu_merge(Efreet_Menu_Internal *parent, Efreet_Xml *xml, const char *pat
1443 if (!merge_xml) 1443 if (!merge_xml)
1444 { 1444 {
1445 INF("efreet_menu_merge() failed to read in the " 1445 INF("efreet_menu_merge() failed to read in the "
1446 "merge file (%s)", path); 1446 "merge file '%s'", path);
1447 return 0; 1447 return 0;
1448 } 1448 }
1449 1449
@@ -1855,7 +1855,8 @@ efreet_menu_handle_move(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1855 else 1855 else
1856 { 1856 {
1857 INF("efreet_menu_handle_move() unknown tag found " 1857 INF("efreet_menu_handle_move() unknown tag found "
1858 "in Move (%s)", child->tag); 1858 "in Move '%s' in file '%s/%s'", child->tag,
1859 parent->file.path, parent->file.name);
1859 return 0; 1860 return 0;
1860 } 1861 }
1861 } 1862 }
@@ -1882,7 +1883,8 @@ efreet_menu_handle_old(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1882 if (parent->current_move) 1883 if (parent->current_move)
1883 { 1884 {
1884 INF("efreet_menu_handle_old() saw second <Old> " 1885 INF("efreet_menu_handle_old() saw second <Old> "
1885 "before seeing <New>"); 1886 "before seeing <New> in file '%s/%s'",
1887 parent->file.path, parent->file.name);
1886 return 0; 1888 return 0;
1887 } 1889 }
1888 1890
@@ -1922,7 +1924,8 @@ efreet_menu_handle_new(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1922 1924
1923 if (!parent->current_move) 1925 if (!parent->current_move)
1924 { 1926 {
1925 INF("efreet_menu_handle_new() saw New before seeing Old"); 1927 INF("efreet_menu_handle_new() saw New before seeing Old in '%s/%s'",
1928 parent->file.path, parent->file.name);
1926 return 0; 1929 return 0;
1927 } 1930 }
1928 1931
@@ -1965,7 +1968,8 @@ efreet_menu_handle_layout(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
1965 else 1968 else
1966 { 1969 {
1967 INF("efreet_menu_handle_move() unknown tag found " 1970 INF("efreet_menu_handle_move() unknown tag found "
1968 "in Layout (%s)", child->tag); 1971 "in Layout '%s' in file '%s/%s'", child->tag,
1972 parent->file.path, parent->file.name);
1969 return 0; 1973 return 0;
1970 } 1974 }
1971 } 1975 }
@@ -2022,7 +2026,8 @@ efreet_menu_handle_default_layout(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
2022 else 2026 else
2023 { 2027 {
2024 INF("efreet_menu_handle_move() unknown tag found in " 2028 INF("efreet_menu_handle_move() unknown tag found in "
2025 "DefaultLayout (%s)", child->tag); 2029 "DefaultLayout '%s' in file '%s/%s'", child->tag,
2030 parent->file.path, parent->file.name);
2026 return 0; 2031 return 0;
2027 } 2032 }
2028 } 2033 }
@@ -2041,7 +2046,8 @@ efreet_menu_handle_layout_menuname(Efreet_Menu_Internal *parent, Efreet_Xml *xml
2041 if (!xml->text) 2046 if (!xml->text)
2042 { 2047 {
2043 INF("efreet_menu_handle_layout_menuname() The Menuname tag in " 2048 INF("efreet_menu_handle_layout_menuname() The Menuname tag in "
2044 "layout needs a filename."); 2049 "layout needs a filename in file '%s/%s'",
2050 parent->file.path, parent->file.name);
2045 return 0; 2051 return 0;
2046 } 2052 }
2047 2053
@@ -2080,7 +2086,8 @@ efreet_menu_handle_layout_filename(Efreet_Menu_Internal *parent, Efreet_Xml *xml
2080 if (!xml->text) 2086 if (!xml->text)
2081 { 2087 {
2082 INF("efreet_menu_handle_layout_filename() The Filename tag in " 2088 INF("efreet_menu_handle_layout_filename() The Filename tag in "
2083 "layout needs a filename."); 2089 "layout needs a filename in file '%s/%s'",
2090 parent->file.path, parent->file.name);
2084 return 0; 2091 return 0;
2085 } 2092 }
2086 2093
@@ -2122,14 +2129,16 @@ efreet_menu_handle_layout_merge(Efreet_Menu_Internal *parent, Efreet_Xml *xml, i
2122 if (!attr) 2129 if (!attr)
2123 { 2130 {
2124 INF("efreet_menu_handle_layout_merge() The Merge tag in layout " 2131 INF("efreet_menu_handle_layout_merge() The Merge tag in layout "
2125 "needs a type attribute."); 2132 "needs a type attribute in file '%s/%s'",
2133 parent->file.path, parent->file.name);
2126 return 0; 2134 return 0;
2127 } 2135 }
2128 2136
2129 if (strcmp(attr, "files") && strcmp(attr, "menus") && strcmp(attr, "all")) 2137 if (strcmp(attr, "files") && strcmp(attr, "menus") && strcmp(attr, "all"))
2130 { 2138 {
2131 INF("efreet_menu_handle_layout_merge() The type attribute for " 2139 INF("efreet_menu_handle_layout_merge() The type attribute for "
2132 "the Merge tag contains an unknown value (%s).", attr); 2140 "the Merge tag contains an unknown value '%s' in file '%s/%s'",
2141 attr, parent->file.path, parent->file.name);
2133 return 0; 2142 return 0;
2134 } 2143 }
2135 2144
@@ -2201,7 +2210,8 @@ efreet_menu_handle_filter_op(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml)
2201 } 2210 }
2202 else 2211 else
2203 { 2212 {
2204 INF("efreet_menu_handle_filter_op() unknown tag in filter (%s)", child->tag); 2213 INF("efreet_menu_handle_filter_op() unknown tag in filter '%s'",
2214 child->tag);
2205 return 0; 2215 return 0;
2206 } 2216 }
2207 } 2217 }
@@ -3152,7 +3162,7 @@ efreet_menu_path_get(Efreet_Menu_Internal *internal, const char *suffix)
3152 { 3162 {
3153 if (!internal->file.path) 3163 if (!internal->file.path)
3154 { 3164 {
3155 INF("efreet_menu_handle_app_dir() missing menu path ..."); 3165 INF("efreet_menu_handle_app_dir() missing menu path ... '%s'", internal->file.name);
3156 return NULL; 3166 return NULL;
3157 } 3167 }
3158 snprintf(path, sizeof(path), "%s/%s", internal->file.path, suffix); 3168 snprintf(path, sizeof(path), "%s/%s", internal->file.path, suffix);
diff --git a/src/lib/efreet/efreet_trash.c b/src/lib/efreet/efreet_trash.c
index e7592473fd..50a273b811 100644
--- a/src/lib/efreet/efreet_trash.c
+++ b/src/lib/efreet/efreet_trash.c
@@ -174,7 +174,7 @@ efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete)
174 trash_dir = efreet_trash_dir_get(uri->path); 174 trash_dir = efreet_trash_dir_get(uri->path);
175 if (!trash_dir) 175 if (!trash_dir)
176 { 176 {
177 ERR("EFREET TRASH ERROR: No trash directory."); 177 ERR("No trash directory for file '%s'", uri->path);
178 return 0; 178 return 0;
179 } 179 }
180 snprintf(dest, sizeof(dest), "%s/files/%s", trash_dir, fname); 180 snprintf(dest, sizeof(dest), "%s/files/%s", trash_dir, fname);
@@ -199,14 +199,14 @@ efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete)
199 199
200 if (!ecore_file_recursive_rm(uri->path)) 200 if (!ecore_file_recursive_rm(uri->path))
201 { 201 {
202 ERR("EFREET TRASH ERROR: Can't delete file."); 202 ERR("Can't delete file '%s'", uri->path);
203 eina_stringshare_del(trash_dir); 203 eina_stringshare_del(trash_dir);
204 return 0; 204 return 0;
205 } 205 }
206 } 206 }
207 else 207 else
208 { 208 {
209 ERR("EFREET TRASH ERROR: Can't move file to trash."); 209 ERR("Can't move file to trash '%s'", uri->path);
210 eina_stringshare_del(trash_dir); 210 eina_stringshare_del(trash_dir);
211 return 0; 211 return 0;
212 } 212 }
@@ -233,7 +233,7 @@ efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete)
233 } 233 }
234 else 234 else
235 { 235 {
236 ERR("EFREET TRASH ERROR: Can't create trash info file."); 236 ERR("Can't create trash info file '%s'", dest);
237 return 0; 237 return 0;
238 } 238 }
239 239
diff --git a/src/lib/efreet/efreet_xml.c b/src/lib/efreet/efreet_xml.c
index 35823bbe29..ed31774454 100644
--- a/src/lib/efreet/efreet_xml.c
+++ b/src/lib/efreet/efreet_xml.c
@@ -113,7 +113,7 @@ efreet_xml_new(const char *file)
113 return xml; 113 return xml;
114 114
115efreet_error: 115efreet_error:
116 ERR("could not parse xml file"); 116 ERR("could not parse xml file '%s'", file);
117 if (data != MAP_FAILED) munmap(data, size); 117 if (data != MAP_FAILED) munmap(data, size);
118 if (fd != -1) close(fd); 118 if (fd != -1) close(fd);
119 if (xml) efreet_xml_del(xml); 119 if (xml) efreet_xml_del(xml);