equal
deleted
inserted
replaced
1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent efd9bcb9a96668b78749748e76c7982149c1bc40 |
2 # Parent d9c9ae52f0338a60d1626d9209248341815e597a |
3 Description: Add KDE integration to Firefox (toolkit parts) |
3 Description: Add KDE integration to Firefox (toolkit parts) |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
5 Author: Lubos Lunak <lunak@suse.com> |
5 Author: Lubos Lunak <lunak@suse.com> |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
2906 +{ |
2906 +{ |
2907 + nsTArray<nsCString> output; |
2907 + nsTArray<nsCString> output; |
2908 + if( nsKDEUtils::command( command, &output ) && output.Length() == 3 ) |
2908 + if( nsKDEUtils::command( command, &output ) && output.Length() == 3 ) |
2909 + { |
2909 + { |
2910 + nsCString mimetype = output[ 0 ]; |
2910 + nsCString mimetype = output[ 0 ]; |
2911 + nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype ); |
2911 + RefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype ); |
2912 + NS_ENSURE_TRUE(mimeInfo, nullptr); |
2912 + NS_ENSURE_TRUE(mimeInfo, nullptr); |
2913 + nsCString description = output[ 1 ]; |
2913 + nsCString description = output[ 1 ]; |
2914 + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); |
2914 + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); |
2915 + nsCString handlerAppName = output[ 2 ]; |
2915 + nsCString handlerAppName = output[ 2 ]; |
2916 + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); |
2916 + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); |