termux-packages/x11-packages/fltk/fltk-1.3.4_src_Fl_File_Icon...

108 lines
6.2 KiB
Diff
Raw Normal View History

2018-09-10 00:42:26 +02:00
diff -uNr fltk-1.3.4/src/Fl_File_Icon2.cxx fltk-1.3.4.mod/src/Fl_File_Icon2.cxx
--- fltk-1.3.4/src/Fl_File_Icon2.cxx 2016-10-14 19:35:44.000000000 +0300
+++ fltk-1.3.4.mod/src/Fl_File_Icon2.cxx 2017-12-10 15:33:40.275018367 +0200
@@ -677,9 +677,9 @@
if (!kdedir) {
// Figure out where KDE is installed...
if ((kdedir = getenv("KDEDIR")) == NULL) {
- if (!access("/opt/kde", F_OK)) kdedir = "/opt/kde";
- else if (!access("/usr/local/share/mimelnk", F_OK)) kdedir = "/usr/local";
- else kdedir = "/usr";
+ if (!access("/data/data/com.termux/files/usr/opt/kde", F_OK)) kdedir = "/data/data/com.termux/files/usr/opt/kde";
+ else if (!access("/data/data/com.termux/files/usr/share/mimelnk", F_OK)) kdedir = "/data/data/com.termux/files/usr";
+ else kdedir = "/data/data/com.termux/files/usr";
}
}
@@ -715,66 +715,66 @@
snprintf(filename, sizeof(filename), "%s/share/mimelnk", kdedir);
load_kde_icons(filename, icondir);
- } else if (!access("/usr/share/icons/folder.xpm", F_OK)) {
+ } else if (!access("/data/data/com.termux/files/usr/share/icons/folder.xpm", F_OK)) {
// Load GNOME icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/share/icons/page.xpm");
+ icon->load_image("/data/data/com.termux/files/usr/share/icons/page.xpm");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_image("/usr/share/icons/folder.xpm");
- } else if (!access("/usr/dt/appconfig/icons", F_OK)) {
+ icon->load_image("/data/data/com.termux/files/usr/share/icons/folder.xpm");
+ } else if (!access("/data/data/com.termux/files/usr/dt/appconfig/icons", F_OK)) {
// Load CDE icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtdata.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtdata.m.pm");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_image("/usr/dt/appconfig/icons/C/DtdirB.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/DtdirB.m.pm");
icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtcore.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtcore.m.pm");
icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtimage.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtimage.m.pm");
icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtps.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtps.m.pm");
icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
- } else if (!access("/usr/lib/filetype", F_OK)) {
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
+ } else if (!access("/data/data/com.termux/files/usr/lib/filetype", F_OK)) {
// Load SGI icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.doc.fti");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.folder.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.folder.closed.fti");
icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/default/iconlib/CoreFile.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/default/iconlib/CoreFile.fti");
icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/ImageFile.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/ImageFile.fti");
- if (!access("/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
icon = new Fl_File_Icon("*.{eps|ps}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
icon = new Fl_File_Icon("*.pdf", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/install/iconlib/acroread.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/acroread.doc.fti");
} else {
icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
}
- if (!access("/usr/lib/filetype/install/iconlib/html.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/html.fti", F_OK)) {
icon = new Fl_File_Icon("*.{htm|html|shtml}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
- icon->load_fti("/usr/lib/filetype/install/iconlib/html.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/html.fti");
}
- if (!access("/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
}
} else {
// Create the default icons...