зеркало из https://github.com/mozilla/pjs.git
Bug 389766 - "Hard-to-understand presentation of protocol-handlers on Linux" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=biesi a=blocking-firefox3+]
This commit is contained in:
Родитель
2365c28fb2
Коммит
a9051d4b6f
|
@ -274,6 +274,18 @@ nsGNOMERegistry::GetAppDescForScheme(const nsACString& aScheme,
|
|||
char *app = getAppForScheme(aScheme);
|
||||
|
||||
if (app) {
|
||||
// Try to only provide the executable name, as it is much simpler than with the path and arguments
|
||||
char *firstSpace = strchr(app, ' ');
|
||||
if (firstSpace) {
|
||||
*firstSpace = '\0';
|
||||
char *lastSlash = strrchr(app, '/');
|
||||
if (lastSlash) {
|
||||
CopyUTF8toUTF16(lastSlash + 1, aDesc);
|
||||
g_free(app);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CopyUTF8toUTF16(app, aDesc);
|
||||
g_free(app);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче