Distinguish file types by extension instead than mime #202
Unanswered
Booting1852
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I posted the same topic on Mint Forum but no one answered, may be that here is more indicated.
Because often same mime type is used from different applications (like XML format for example, or plain text) I had to continuously reassign default application to files with different extension but the same mime type.
Yes editing mime type is possible; but it is very boring respect to simply act Open With from file browser.
So I modified nemo-file-utilities.c as follows:
[code]
gchar *
nemo_get_best_guess_file_mimetype (const gchar *filename,
GFileInfo *info,
goffset size)
{
}
[/code]
And nemo-mime-actions.c as follows:
[code]
[...]
char* toLower(char* s) { //Parte aggiunta
for(char *p=s; *p; p++) *p=tolower(*p);
return s;
}
GAppInfo *
nemo_mime_get_default_application_for_file (NemoFile *file)
{
GAppInfo *app = NULL;
char *mime_type;
char *uri_scheme;
[...]
[/code]
On Nemo 5.8.4 it works well but I have a question:
Where I could act to make so that icon of files is the same of the associated application ? At the moment showed icons are still based on mime type.
Which are files and functions involved ?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions