mirror of https://github.com/OpenRCT2/OpenRCT2.git
improve file dialogs (zenity + kdialog)
This commit is contained in:
parent
13df54c9d0
commit
fb0661b55e
|
@ -376,7 +376,7 @@ bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(cmd, MAX_PATH, "%s --title \"%s\" %s ~ \"%s\"", executable, desc->title, action, filter);
|
snprintf(cmd, MAX_PATH, "%s --title \"%s\" %s '%s/' ~ \"%s\"", executable, desc->title, action, desc->initial_directory, filter);
|
||||||
break;
|
break;
|
||||||
case DT_ZENITY:
|
case DT_ZENITY:
|
||||||
action = "--file-selection";
|
action = "--file-selection";
|
||||||
|
@ -420,7 +420,7 @@ bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc,
|
||||||
snprintf(filterTemp, countof(filterTemp), " --file-filter=\"%s | *\"", (char *)language_get_string(STR_ALL_FILES));
|
snprintf(filterTemp, countof(filterTemp), " --file-filter=\"%s | *\"", (char *)language_get_string(STR_ALL_FILES));
|
||||||
safe_strcat(filter, filterTemp, countof(filter));
|
safe_strcat(filter, filterTemp, countof(filter));
|
||||||
|
|
||||||
snprintf(cmd, MAX_PATH, "%s %s %s --title=\"%s\" / %s", executable, action, flags, desc->title, filter);
|
snprintf(cmd, MAX_PATH, "%s %s --filename='%s/' %s --title=\"%s\" / %s", executable, action, desc->initial_directory, flags, desc->title, filter);
|
||||||
break;
|
break;
|
||||||
default: return 0;
|
default: return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue