summaryrefslogtreecommitdiff
path: root/src/Fl_File_Icon2.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-12-17 14:27:03 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-12-17 14:27:03 +0000
commit8408e863de860ef75a58be303b488b7c44701f9d (patch)
treebabab8356f5345c68e2e913896980ff3f8450f7e /src/Fl_File_Icon2.cxx
parent6d4bda28b5d98ec55178355bf567009bd22d4199 (diff)
Fl_Help_View now ignores links when the link callback returns NULL, and
displays a sensible error message when the URI scheme isn't handled. Fl_File_Icon no longer tries to load icon files that don't exist. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Icon2.cxx')
-rw-r--r--src/Fl_File_Icon2.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx
index bbb02df66..6be309468 100644
--- a/src/Fl_File_Icon2.cxx
+++ b/src/Fl_File_Icon2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon2.cxx,v 1.1.2.7 2001/12/05 00:21:40 easysw Exp $"
+// "$Id: Fl_File_Icon2.cxx,v 1.1.2.8 2001/12/17 14:27:03 easysw Exp $"
//
// Fl_File_Icon system icon routines.
//
@@ -819,6 +819,7 @@ load_kde_mimelnk(const char *filename)
{
if (!access("/usr/share/icons/hicolor", F_OK))
{
+ // KDE 2.x icons
int i; // Looping var
static const char *paths[] = { // Subdirs to look in...
"32x32/actions",
@@ -849,11 +850,14 @@ load_kde_mimelnk(const char *filename)
}
if (i >= (int)(sizeof(paths) / sizeof(paths[0]))) return;
- }
- else
+ } else {
+ // KDE 1.x icons
snprintf(full_iconfilename, sizeof(full_iconfilename),
"/usr/share/icons/%s", iconfilename);
+ if (access(full_iconfilename, F_OK)) return;
+ }
+
if (strncmp(mimetype, "inode/", 6) == 0) {
if (strcmp(mimetype + 6, "directory") == 0)
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
@@ -926,5 +930,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.7 2001/12/05 00:21:40 easysw Exp $".
+// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.8 2001/12/17 14:27:03 easysw Exp $".
//