# HG changeset patch # User Wolfgang Rosenauer # Date 1401741832 -7200 # Node ID e178ad08fed62ac1adba345080ce86de4fc9b673 # Parent f118b88b7d7f35b09190e0dffd52d1992f438f59 update patch to Gecko 31 diff -r f118b88b7d7f -r e178ad08fed6 firefox-kde.patch --- a/firefox-kde.patch Wed May 28 22:17:03 2014 +0200 +++ b/firefox-kde.patch Mon Jun 02 22:43:52 2014 +0200 @@ -1376,16 +1376,18 @@ new file mode 100644 --- /dev/null +++ b/browser/components/shell/src/nsKDEShellService.cpp -@@ -0,0 +1,234 @@ +@@ -0,0 +1,238 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + ++#include "mozilla/ArrayUtils.h" ++ ++#include "nsCOMPtr.h" +#include "nsKDEShellService.h" +#include "nsShellService.h" +#include "nsKDEUtils.h" -+#include "nsCOMPtr.h" +#include "nsIPrefService.h" +#include "nsIProcess.h" +#include "nsIFile.h" @@ -1395,21 +1397,23 @@ +#include "nsISupportsPrimitives.h" +#include "nsArrayUtils.h" + ++using namespace mozilla; ++ +nsresult +nsKDEShellService::Init() -+ { ++{ + if( !nsKDEUtils::kdeSupport()) + return NS_ERROR_NOT_AVAILABLE; + return NS_OK; -+ } ++} + -+NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService) ++NS_IMPL_ISUPPORTS(nsKDEShellService, nsIShellService) + +NS_IMETHODIMP +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck, + bool aForAllTypes, + bool* aIsDefaultBrowser) -+ { ++{ + *aIsDefaultBrowser = false; + if (aStartupCheck) + mCheckedThisSession = true; @@ -1428,12 +1432,12 @@ + if( nsKDEUtils::command( command )) + *aIsDefaultBrowser = true; + return NS_OK; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes, + bool aForAllUsers) -+ { ++{ + nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); + if (!command) + return NS_ERROR_FAILURE; @@ -1450,7 +1454,7 @@ + command->AppendElement( paramstr, false ); + + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult) @@ -1497,25 +1501,25 @@ +NS_IMETHODIMP +nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement, + PRInt32 aPosition) -+ { ++{ + return NS_ERROR_NOT_IMPLEMENTED; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) -+ { ++{ + return NS_ERROR_NOT_IMPLEMENTED; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor) -+ { ++{ + return NS_ERROR_NOT_IMPLEMENTED; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::OpenApplication(PRInt32 aApplication) -+ { ++{ + nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); + if (!command) + return NS_ERROR_FAILURE; @@ -1533,11 +1537,11 @@ + + command->AppendElement( str, false ); + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI) -+ { ++{ + nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); + if (!command) + return NS_ERROR_FAILURE; @@ -1558,11 +1562,11 @@ + uristr->SetData( aURI ); + command->AppendElement( uristr, false ); + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; -+ } ++} + +NS_IMETHODIMP +nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval) -+ { ++{ + *_retval = nullptr; + + nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID ); @@ -1610,12 +1614,12 @@ + + NS_ADDREF(*_retval = defaultReader); + return NS_OK; -+ } ++} diff --git a/browser/components/shell/src/nsKDEShellService.h b/browser/components/shell/src/nsKDEShellService.h new file mode 100644 --- /dev/null +++ b/browser/components/shell/src/nsKDEShellService.h -@@ -0,0 +1,59 @@ +@@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1657,11 +1661,12 @@ + +#include "nsIShellService.h" +#include "nsStringAPI.h" ++#include "mozilla/Attributes.h" + -+class nsKDEShellService : public nsIShellService ++class nsKDEShellService MOZ_FINAL : public nsIShellService +{ +public: -+ nsKDEShellService() : mCheckedThisSession(PR_FALSE) { } ++ nsKDEShellService() : mCheckedThisSession(false) { } + + NS_DECL_ISUPPORTS + NS_DECL_NSISHELLSERVICE @@ -1671,7 +1676,7 @@ +private: + ~nsKDEShellService() {} + -+ PRPackedBool mCheckedThisSession; ++ bool mCheckedThisSession; +}; + +#endif // nskdeshellservice_h____