firefox-kde.patch
branchfirefox70
changeset 1112 8a4f5aea2475
parent 1111 97a6da6d7e29
child 1121 004e4b1efb26
equal deleted inserted replaced
1111:97a6da6d7e29 1112:8a4f5aea2475
     1 # HG changeset patch
     1 # HG changeset patch
     2 # User msirringhaus@suse.de
     2 # User msirringhaus@suse.de
     3 # Date 1559300151 -7200
     3 # Date 1559300151 -7200
     4 #      Fri May 31 12:55:51 2019 +0200
     4 #      Fri May 31 12:55:51 2019 +0200
     5 # Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
     5 # Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
     6 # Parent  28bde69150771a1530f784903bf68214dd5790ea
     6 # Parent  4faaad3619f286bd6077754d8e59d339a5142b80
     7 How to apply this patch:
     7 How to apply this patch:
     8 1. Import and apply it
     8 1. Import and apply it
     9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
     9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
    10 3. Find editBookmarkPanelDoneButton
    10 3. Find editBookmarkPanelDoneButton
    11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style)
    11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style)
    12 5. hg qrefresh
    12 5. hg qrefresh
    13 
    13 
    14 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
    14 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
    15 --- a/browser/components/preferences/in-content/main.js
    15 --- a/browser/components/preferences/in-content/main.js
    16 +++ b/browser/components/preferences/in-content/main.js
    16 +++ b/browser/components/preferences/in-content/main.js
    17 @@ -339,16 +339,23 @@ var gMainPane = {
    17 @@ -341,16 +341,23 @@ var gMainPane = {
    18          }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
    18          }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
    19        };
    19        };
    20  
    20  
    21        window.setTimeout(() => {
    21        window.setTimeout(() => {
    22          window.requestIdleCallback(pollForDefaultBrowser);
    22          window.requestIdleCallback(pollForDefaultBrowser);
    36      let performanceSettingsLink = document.getElementById(
    36      let performanceSettingsLink = document.getElementById(
    37        "performanceSettingsLearnMore"
    37        "performanceSettingsLearnMore"
    38      );
    38      );
    39      let performanceSettingsUrl =
    39      let performanceSettingsUrl =
    40        Services.urlFormatter.formatURLPref("app.support.baseURL") +
    40        Services.urlFormatter.formatURLPref("app.support.baseURL") +
    41 @@ -1146,16 +1153,27 @@ var gMainPane = {
    41 @@ -1199,16 +1206,27 @@ var gMainPane = {
    42        this._backoffIndex = 0;
    42        this._backoffIndex = 0;
    43  
    43  
    44        let shellSvc = getShellService();
    44        let shellSvc = getShellService();
    45        if (!shellSvc) {
    45        if (!shellSvc) {
    46          return;
    46          return;
    69 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
    69 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
    70 --- a/browser/components/shell/moz.build
    70 --- a/browser/components/shell/moz.build
    71 +++ b/browser/components/shell/moz.build
    71 +++ b/browser/components/shell/moz.build
    72 @@ -28,16 +28,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
    72 @@ -28,16 +28,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
    73      ]
    73      ]
    74  elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
    74  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
    75      XPIDL_SOURCES += [
    75      XPIDL_SOURCES += [
    76          'nsIGNOMEShellService.idl',
    76          'nsIGNOMEShellService.idl',
    77      ]
    77      ]
    78  
    78  
    79      SOURCES += [
    79      SOURCES += [
    90      ]
    90      ]
    91 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
    91 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
    92 new file mode 100644
    92 new file mode 100644
    93 --- /dev/null
    93 --- /dev/null
    94 +++ b/browser/components/shell/nsKDEShellService.cpp
    94 +++ b/browser/components/shell/nsKDEShellService.cpp
    95 @@ -0,0 +1,150 @@
    95 @@ -0,0 +1,103 @@
    96 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
    96 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
    97 +/* This Source Code Form is subject to the terms of the Mozilla Public
    97 +/* This Source Code Form is subject to the terms of the Mozilla Public
    98 + * License, v. 2.0. If a copy of the MPL was not distributed with this
    98 + * License, v. 2.0. If a copy of the MPL was not distributed with this
    99 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    99 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
   100 +
   100 +
   194 +nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
   194 +nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
   195 +{
   195 +{
   196 +    return NS_ERROR_NOT_IMPLEMENTED;
   196 +    return NS_ERROR_NOT_IMPLEMENTED;
   197 +}
   197 +}
   198 +
   198 +
   199 +NS_IMETHODIMP
       
   200 +nsKDEShellService::OpenApplication(PRInt32 aApplication)
       
   201 +{
       
   202 +    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
       
   203 +    if (!command)
       
   204 +        return NS_ERROR_FAILURE;
       
   205 +
       
   206 +    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
       
   207 +    if (!str)
       
   208 +        return NS_ERROR_FAILURE;
       
   209 +
       
   210 +    if( aApplication == APPLICATION_MAIL )
       
   211 +        str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
       
   212 +    else if( aApplication == APPLICATION_NEWS )
       
   213 +        str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
       
   214 +    else
       
   215 +        return NS_ERROR_NOT_IMPLEMENTED;
       
   216 +
       
   217 +    command->AppendElement( str );
       
   218 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
       
   219 +}
       
   220 +
       
   221 +NS_IMETHODIMP
       
   222 +nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI)
       
   223 +{
       
   224 +    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
       
   225 +    if (!command)
       
   226 +        return NS_ERROR_FAILURE;
       
   227 +
       
   228 +    nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
       
   229 +    nsCOMPtr<nsISupportsCString> appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
       
   230 +    nsCOMPtr<nsISupportsCString> uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
       
   231 +    if (!cmdstr || !appstr || !uristr)
       
   232 +        return NS_ERROR_FAILURE;
       
   233 +
       
   234 +    cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
       
   235 +    command->AppendElement( cmdstr );
       
   236 +    nsAutoCString app;
       
   237 +    nsresult rv = aApplication->GetNativePath( app );
       
   238 +    NS_ENSURE_SUCCESS( rv, rv );
       
   239 +    appstr->SetData( app );
       
   240 +    command->AppendElement( appstr );
       
   241 +    uristr->SetData( aURI );
       
   242 +    command->AppendElement( uristr );
       
   243 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
       
   244 +}
       
   245 +
       
   246 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
   199 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
   247 new file mode 100644
   200 new file mode 100644
   248 --- /dev/null
   201 --- /dev/null
   249 +++ b/browser/components/shell/nsKDEShellService.h
   202 +++ b/browser/components/shell/nsKDEShellService.h
   250 @@ -0,0 +1,32 @@
   203 @@ -0,0 +1,32 @@