firefox-kde.patch
branchfirefox80
changeset 1141 edb0ebe8cccc
parent 1127 d5b284f833d5
child 1152 4cfe46c9a944
equal deleted inserted replaced
1140:a9aa543a508a 1141:edb0ebe8cccc
     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  0fd58e0df883086574263e0881e1503cf110562a
     6 # Parent  3804871eac4171b99e9049dbc881b5304b5ac207
     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/main.js b/browser/components/preferences/main.js
    14 diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
    15 --- a/browser/components/preferences/main.js
    15 --- a/browser/components/preferences/main.js
    16 +++ b/browser/components/preferences/main.js
    16 +++ b/browser/components/preferences/main.js
    17 @@ -336,16 +336,23 @@ var gMainPane = {
    17 @@ -335,16 +335,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 @@ -1301,16 +1308,27 @@ var gMainPane = {
    41 @@ -1291,16 +1298,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;
   137 +
   137 +
   138 +    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   138 +    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   139 +    if (!str)
   139 +    if (!str)
   140 +        return NS_ERROR_FAILURE;
   140 +        return NS_ERROR_FAILURE;
   141 +
   141 +
   142 +    str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
   142 +    str->SetData("ISDEFAULTBROWSER"_ns);
   143 +    command->AppendElement( str );
   143 +    command->AppendElement( str );
   144 +
   144 +
   145 +    if( nsKDEUtils::command( command ))
   145 +    if( nsKDEUtils::command( command ))
   146 +        *aIsDefaultBrowser = true;
   146 +        *aIsDefaultBrowser = true;
   147 +    return NS_OK;
   147 +    return NS_OK;
   158 +    nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   158 +    nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   159 +    nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   159 +    nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
   160 +    if (!cmdstr || !paramstr)
   160 +    if (!cmdstr || !paramstr)
   161 +        return NS_ERROR_FAILURE;
   161 +        return NS_ERROR_FAILURE;
   162 +
   162 +
   163 +    cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
   163 +    cmdstr->SetData("SETDEFAULTBROWSER"_ns);
   164 +    command->AppendElement( cmdstr );
   164 +    command->AppendElement( cmdstr );
   165 +
   165 +
   166 +    paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
   166 +    paramstr->SetData( aClaimAllTypes ? "ALLTYPES"_ns : "NORMAL"_ns );
   167 +    command->AppendElement( paramstr );
   167 +    command->AppendElement( paramstr );
   168 +
   168 +
   169 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
   169 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
   170 +}
   170 +}
   171 +
   171 +