Last upload for mozilla-based products
Mike Hommey
mh at glandium.org
Wed Mar 14 10:23:47 CET 2007
On Wed, Mar 14, 2007 at 09:53:28AM +0100, Andreas Barth wrote:
> * Mike Hommey (mh at glandium.org) [070314 08:27]:
> > - Apply the new version of the patch, that I sent to
> > https://bugzilla.mozilla.org/attachment.cgi?id=258000, see the
> > interdiff with the previous patch, attached.
>
> I miss the interdiff.
Dammit. Here it is.
Mike
-------------- next part --------------
diff -u xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp
--- xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp (local)
+++ xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp (local)
@@ -50,6 +50,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
+#include "nsIStringEnumerator.h"
#include "nsXPIDLString.h"
#include "nsIURL.h"
#include "nsIFileStreams.h"
@@ -1494,7 +1495,12 @@
nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry\n"));
- return gnomeInfo;
+ nsCOMPtr<nsIUTF8StringEnumerator> extensions;
+ gnomeInfo->GetFileExtensions(getter_AddRefs(extensions));
+ PRBool hasMore;
+ extensions->HasMore(&hasMore);
+ if (hasMore)
+ return gnomeInfo;
}
#endif
@@ -1523,7 +1529,13 @@
minorType,
extensions,
mime_types_description);
-
+#ifdef MOZ_WIDGET_GTK2
+ if (gnomeInfo) {
+ if (!extensions.IsEmpty())
+ gnomeInfo->SetFileExtensions(NS_ConvertUCS2toUTF8(extensions));
+ return gnomeInfo;
+ }
+#endif
nsAutoString mailcap_description, handler, mozillaFlags;
DoLookUpHandlerAndDescription(majorType,
More information about the pkg-mozilla-maintainers
mailing list