termux-packages/x11-packages/libfm-extra/fix-hardcoded-paths.patch

37 lines
2.4 KiB
Diff
Raw Normal View History

2019-02-07 01:04:51 +01:00
diff -uNr libfm-1.3.1/src/base/fm-file-info.c libfm-1.3.1.mod/src/base/fm-file-info.c
--- libfm-1.3.1/src/base/fm-file-info.c 2018-04-26 22:40:12.000000000 +0300
+++ libfm-1.3.1.mod/src/base/fm-file-info.c 2019-02-07 01:54:20.104240640 +0200
@@ -1393,7 +1393,7 @@
which may be considered as a safe desktop entry path
then check if that is a shortcut to a native file
otherwise it is a link to a file under menu:// */
- if (!g_str_has_prefix(fi->target, "/usr/share/"))
+ if (!g_str_has_prefix(fi->target, "@TERMUX_PREFIX@/share/"))
{
FmPath *target = fm_path_new_for_str(fi->target);
gboolean is_native = fm_path_is_native(target);
diff -uNr libfm-1.3.1/src/gtk/fm-app-chooser-dlg.c libfm-1.3.1.mod/src/gtk/fm-app-chooser-dlg.c
--- libfm-1.3.1/src/gtk/fm-app-chooser-dlg.c 2018-04-16 22:11:33.000000000 +0300
+++ libfm-1.3.1.mod/src/gtk/fm-app-chooser-dlg.c 2019-02-07 01:55:08.441177018 +0200
@@ -231,7 +231,7 @@
gtk_file_filter_add_custom(filter,
GTK_FILE_FILTER_FILENAME|GTK_FILE_FILTER_MIME_TYPE, exec_filter_func, NULL, NULL);
/* gtk_file_filter_set_name(filter, _("Executable files")); */
- file = fm_select_file(GTK_WINDOW(data->dlg), NULL, "/usr/bin", TRUE, FALSE, filter, NULL);
+ file = fm_select_file(GTK_WINDOW(data->dlg), NULL, "@TERMUX_PREFIX@/bin", TRUE, FALSE, filter, NULL);
if (file == NULL)
return;
diff -uNr libfm-1.3.1/src/modules/gtk-fileprop-x-desktop.c libfm-1.3.1.mod/src/modules/gtk-fileprop-x-desktop.c
--- libfm-1.3.1/src/modules/gtk-fileprop-x-desktop.c 2018-04-16 22:11:33.000000000 +0300
+++ libfm-1.3.1.mod/src/modules/gtk-fileprop-x-desktop.c 2019-02-07 01:54:43.961041507 +0200
@@ -67,7 +67,7 @@
NULL, GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL);
- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), "/usr/bin");
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), "@TERMUX_PREFIX@/bin");
filter = gtk_file_filter_new();
gtk_file_filter_set_name(GTK_FILE_FILTER(filter), _("Executable files") );
gtk_file_filter_add_custom(GTK_FILE_FILTER(filter), GTK_FILE_FILTER_FILENAME,