diff -u firefox-3.5-3.5.5+nobinonly/debian/changelog firefox-3.5-3.5.5+nobinonly/debian/changelog
--- firefox-3.5-3.5.5+nobinonly/debian/changelog
+++ firefox-3.5-3.5.5+nobinonly/debian/changelog
@@ -1,3 +1,12 @@
+firefox-3.5 (3.5.5+nobinonly-0ubuntu3) lucid; urgency=low
+
+  * Apply KDE integration from openSUSE (LP: #494067)
+    - add debian/patches/kde-integration.patch
+    - update debian/patches/series
+    - update debian/rules
+
+ -- Felix Geyer <debfx-pkg@fobos.de>  Tue, 08 Dec 2009 17:53:49 +0100
+
 firefox-3.5 (3.5.5+nobinonly-0ubuntu2) lucid; urgency=low
 
   * New upstream release v3.5.5 (FIREFOX_3_5_5_RELEASE)
diff -u firefox-3.5-3.5.5+nobinonly/debian/rules firefox-3.5-3.5.5+nobinonly/debian/rules
--- firefox-3.5-3.5.5+nobinonly/debian/rules
+++ firefox-3.5-3.5.5+nobinonly/debian/rules
@@ -308,6 +308,7 @@
 		for i in $(DEBIAN_EXECUTABLES); do \
 			chmod a+x debian/$$i; \
 		done
+	cp $(DEB_SRCDIR)/browser/base/content/browser.xul $(DEB_SRCDIR)/browser/base/content/browser-kde.xul
 
 clean::
 	set -e; for i in $(UUDECODE); do \
diff -u firefox-3.5-3.5.5+nobinonly/debian/patches/series firefox-3.5-3.5.5+nobinonly/debian/patches/series
--- firefox-3.5-3.5.5+nobinonly/debian/patches/series
+++ firefox-3.5-3.5.5+nobinonly/debian/patches/series
@@ -11,0 +12 @@
+kde-integration.patch
only in patch2:
unchanged:
--- firefox-3.5-3.5.5+nobinonly.orig/debian/patches/kde-integration.patch
+++ firefox-3.5-3.5.5+nobinonly/debian/patches/kde-integration.patch
@@ -0,0 +1,474 @@
+Description: Firefox KDE integration from openSUSE
+Origin: http://gitorious.org/firefox-kde-opensuse/
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/494067
+Bug-openSUSE: https://bugzilla.novell.com/show_bug.cgi?id=170055
+Author: Lubos Lunak <l.lunak@suse.cz>
+
+--- mozilla/browser/app/Makefile.in.sav	2009-11-16 15:36:18.000000000 +0100
++++ mozilla/browser/app/Makefile.in	2009-11-16 15:37:59.000000000 +0100
+@@ -49,6 +49,7 @@ DIRS		= profile/extensions
+ 
+ PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
+ 		  $(srcdir)/profile/channel-prefs.js \
++		  $(srcdir)/profile/kde.js \
+ 		  $(NULL)
+ 
+ ifndef MOZ_BRANDING_DIRECTORY
+--- mozilla/browser/base/content/browser-kde.xul.sav	2009-11-05 20:08:56.000000000 +0100
++++ mozilla/browser/base/content/browser-kde.xul	2009-11-16 15:37:59.000000000 +0100
+@@ -157,7 +157,7 @@
+         <button id="editBookmarkPanelDeleteButton"
+                 label="&editBookmark.cancel.label;"
+                 oncommand="StarUI.cancelButtonOnCommand();"/>
+-#else
++#elif XP_UNIX_GNOME
+         <button id="editBookmarkPanelDeleteButton"
+                 label="&editBookmark.cancel.label;"
+                 oncommand="StarUI.cancelButtonOnCommand();"/>
+@@ -165,6 +165,14 @@
+                 label="&editBookmark.done.label;"
+                 default="true"
+                 oncommand="StarUI.panel.hidePopup();"/>
++#else
++        <button id="editBookmarkPanelDoneButton"
++                label="&editBookmark.done.label;"
++                default="true"
++                oncommand="StarUI.panel.hidePopup();"/>
++        <button id="editBookmarkPanelDeleteButton"
++                label="&editBookmark.cancel.label;"
++                oncommand="StarUI.cancelButtonOnCommand();"/>
+ #endif
+       </hbox>
+     </panel>
+--- mozilla/browser/base/jar.mn.sav	2009-11-05 20:08:56.000000000 +0100
++++ mozilla/browser/base/jar.mn	2009-11-16 15:37:59.000000000 +0100
+@@ -22,6 +22,8 @@ browser.jar:
+ *       content/browser/browser.css                   (content/browser.css)
+ *       content/browser/browser.js                    (content/browser.js)
+ *       content/browser/browser.xul                   (content/browser.xul)
++*       content/browser/browser-kde.xul               (content/browser-kde.xul)
++%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
+ *       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
+ *       content/browser/credits.xhtml                 (content/credits.xhtml)
+ *       content/browser/metaData.js                   (content/metaData.js)
+--- mozilla/browser/components/build/nsModule.cpp.sav	2009-11-05 20:08:56.000000000 +0100
++++ mozilla/browser/components/build/nsModule.cpp	2009-11-16 15:37:59.000000000 +0100
+@@ -46,7 +46,7 @@
+ #elif defined(XP_MACOSX)
+ #include "nsMacShellService.h"
+ #elif defined(MOZ_WIDGET_GTK2)
+-#include "nsGNOMEShellService.h"
++#include "nsUnixShellService.h"
+ #endif
+ 
+ #ifndef WINCE
+@@ -88,7 +88,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindows
+ #elif defined(XP_MACOSX)
+ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
+ #elif defined(MOZ_WIDGET_GTK2)
+-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
++// in nsUnixShellService
++//NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUnixShellService, Init)
+ #endif
+ 
+ #ifndef WINCE
+@@ -132,7 +133,7 @@ static const nsModuleComponentInfo compo
+   { "Browser Shell Service",
+     NS_SHELLSERVICE_CID,
+     NS_SHELLSERVICE_CONTRACTID,
+-    nsGNOMEShellServiceConstructor },
++    nsUnixShellServiceConstructor },
+ 
+ #endif
+ 
+--- mozilla/browser/components/shell/src/Makefile.in.sav	2009-11-05 20:08:56.000000000 +0100
++++ mozilla/browser/components/shell/src/Makefile.in	2009-11-16 15:37:59.000000000 +0100
+@@ -75,11 +75,12 @@ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_
+ CPPSRCS = nsMacShellService.cpp
+ else
+ ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
+-CPPSRCS = nsGNOMEShellService.cpp
++CPPSRCS = nsUnixShellService.cpp nsGNOMEShellService.cpp nsKDEShellService.cpp
+ REQUIRES	+= \
+ 		mozgnome \
+ 		thebes \
+ 		$(NULL)
++LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+ endif
+ endif
+ endif
+--- mozilla/browser/components/shell/src/nsKDEShellService.cpp.sav	2009-11-16 15:37:59.000000000 +0100
++++ mozilla/browser/components/shell/src/nsKDEShellService.cpp	2009-11-16 15:37:59.000000000 +0100
+@@ -0,0 +1,193 @@
++/* -*- 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
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is Shell Service.
++ *
++ * The Initial Developer of the Original Code is mozilla.org.
++ * Portions created by the Initial Developer are Copyright (C) 2004
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "nsKDEShellService.h"
++#include "nsShellService.h"
++#include "nsKDEUtils.h"
++#include "nsCOMPtr.h"
++#include "nsIPrefService.h"
++#include "nsIProcess.h"
++#include "nsILocalFile.h"
++#include "nsServiceManagerUtils.h"
++#include "nsComponentManagerUtils.h"
++
++nsresult
++nsKDEShellService::Init()
++    {
++    if( !nsKDEUtils::kdeSupport())
++        return NS_ERROR_NOT_AVAILABLE;
++    return NS_OK;
++    }
++
++NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
++
++NS_IMETHODIMP
++nsKDEShellService::IsDefaultBrowser(PRBool aStartupCheck,
++                                      PRBool* aIsDefaultBrowser)
++    {
++    *aIsDefaultBrowser = PR_FALSE;
++    if (aStartupCheck)
++        mCheckedThisSession = PR_TRUE;
++    nsCStringArray command;
++    command.AppendCString( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
++    if( nsKDEUtils::command( command ))
++        *aIsDefaultBrowser = PR_TRUE;
++    return NS_OK;
++    }
++
++NS_IMETHODIMP
++nsKDEShellService::SetDefaultBrowser(PRBool aClaimAllTypes,
++                                       PRBool aForAllUsers)
++    {
++    nsCStringArray command;
++    command.AppendCString( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
++    command.AppendCString( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
++    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
++    }
++
++NS_IMETHODIMP
++nsKDEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
++{
++  // If we've already checked, the browser has been started and this is a 
++  // new window open, and we don't want to check again.
++  if (mCheckedThisSession) {
++    *aResult = PR_FALSE;
++    return NS_OK;
++  }
++
++  nsCOMPtr<nsIPrefBranch> prefs;
++  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
++  if (pserve)
++    pserve->GetBranch("", getter_AddRefs(prefs));
++
++  if (prefs)
++    prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
++
++  return NS_OK;
++}
++
++NS_IMETHODIMP
++nsKDEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck)
++{
++  nsCOMPtr<nsIPrefBranch> prefs;
++  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
++  if (pserve)
++    pserve->GetBranch("", getter_AddRefs(prefs));
++
++  if (prefs)
++    prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
++
++  return NS_OK;
++}
++
++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)
++    {
++    nsCStringArray command;
++    if( aApplication == APPLICATION_MAIL )
++        command.AppendCString( NS_LITERAL_CSTRING( "OPENMAIL" ));
++    else if( aApplication == APPLICATION_NEWS )
++        command.AppendCString( NS_LITERAL_CSTRING( "OPENNEWS" ));
++    else
++        return NS_ERROR_NOT_IMPLEMENTED;
++    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
++    }
++
++NS_IMETHODIMP
++nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
++    {
++    nsCStringArray command;
++    command.AppendCString( NS_LITERAL_CSTRING( "RUN" ));
++    nsCString app;
++    nsresult rv = aApplication->GetNativePath( app );
++    NS_ENSURE_SUCCESS( rv, rv );
++    command.AppendCString( app );
++    command.AppendCString( aURI );
++    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
++    }
++
++NS_IMETHODIMP
++nsKDEShellService::GetDefaultFeedReader(nsILocalFile** _retval)
++    {
++    *_retval = nsnull;
++
++    nsCStringArray command;
++    command.AppendCString( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
++    nsCStringArray output;
++    if( !nsKDEUtils::command( command, &output ) || output.Count() != 1 )
++        return NS_ERROR_FAILURE;
++
++    nsCString path;
++    path = *output[ 0 ];
++    if (path.IsEmpty())
++        return NS_ERROR_FAILURE;
++
++    nsresult rv;
++    nsCOMPtr<nsILocalFile> defaultReader =
++        do_CreateInstance("@mozilla.org/file/local;1", &rv);
++    NS_ENSURE_SUCCESS(rv, rv);
++
++    rv = defaultReader->InitWithNativePath(path);
++    NS_ENSURE_SUCCESS(rv, rv);
++
++    PRBool exists;
++    rv = defaultReader->Exists(&exists);
++    NS_ENSURE_SUCCESS(rv, rv);
++    if (!exists)
++        return NS_ERROR_FAILURE;
++
++    NS_ADDREF(*_retval = defaultReader);
++    return NS_OK;
++    }
+--- mozilla/browser/components/shell/src/nsKDEShellService.h.sav	2009-11-16 15:37:59.000000000 +0100
++++ mozilla/browser/components/shell/src/nsKDEShellService.h	2009-11-16 15:37:59.000000000 +0100
+@@ -0,0 +1,59 @@
++/* -*- 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
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is Shell Service.
++ *
++ * The Initial Developer of the Original Code is mozilla.org.
++ * Portions created by the Initial Developer are Copyright (C) 2004
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#ifndef nskdeshellservice_h____
++#define nskdeshellservice_h____
++
++#include "nsIShellService.h"
++#include "nsStringAPI.h"
++
++class nsKDEShellService : public nsIShellService
++{
++public:
++  nsKDEShellService() : mCheckedThisSession(PR_FALSE) { }
++
++  NS_DECL_ISUPPORTS
++  NS_DECL_NSISHELLSERVICE
++
++  nsresult Init() NS_HIDDEN;
++
++private:
++  ~nsKDEShellService() {}
++
++  PRPackedBool mCheckedThisSession;
++};
++
++#endif // nskdeshellservice_h____
+--- mozilla/browser/components/shell/src/nsUnixShellService.cpp.sav	2009-11-16 15:37:59.000000000 +0100
++++ mozilla/browser/components/shell/src/nsUnixShellService.cpp	2009-11-16 15:37:59.000000000 +0100
+@@ -0,0 +1,52 @@
++/* -*- 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
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is Shell Service.
++ *
++ * The Initial Developer of the Original Code is mozilla.org.
++ * Portions created by the Initial Developer are Copyright (C) 2004
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "nsUnixShellService.h"
++#include "nsGNOMEShellService.h"
++#include "nsKDEShellService.h"
++#include "nsKDEUtils.h"
++#include "nsIGenericFactory.h"
++
++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
++
++NS_METHOD
++nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
++{
++    if( nsKDEUtils::kdeSupport())
++        return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
++    return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
++}
+--- mozilla/browser/components/shell/src/nsUnixShellService.h.sav	2009-11-16 15:37:59.000000000 +0100
++++ mozilla/browser/components/shell/src/nsUnixShellService.h	2009-11-16 15:37:59.000000000 +0100
+@@ -0,0 +1,45 @@
++/* -*- 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
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is Shell Service.
++ *
++ * The Initial Developer of the Original Code is mozilla.org.
++ * Portions created by the Initial Developer are Copyright (C) 2004
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#ifndef nsunixshellservice_h____
++#define nsunixshellservice_h____
++
++#include "nsIShellService.h"
++
++NS_METHOD
++nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
++
++#endif // nsunixshellservice_h____
+--- mozilla/browser/installer/unix/packages-static.sav	2009-11-05 20:08:56.000000000 +0100
++++ mozilla/browser/installer/unix/packages-static	2009-11-16 15:37:59.000000000 +0100
+@@ -290,6 +290,7 @@ bin/icons/*.png
+ bin/@PREF_DIR@/firefox.js
+ bin/@PREF_DIR@/firefox-branding.js
+ bin/@PREF_DIR@/channel-prefs.js
++bin/@PREF_DIR@/kde.js
+ bin/greprefs/all.js
+ bin/greprefs/security-prefs.js
+ bin/greprefs/xpinstall.js
+--- mozilla/browser/app/profile/kde.js.sav	2009-09-11 14:42:26.000000000 +0200
++++ mozilla/browser/app/profile/kde.js	2009-09-11 14:42:35.000000000 +0200
+@@ -0,0 +1 @@
++pref("browser.preferences.instantApply", false);