Skip to content

Commit

Permalink
chore: add SPDX licensing for snippets and files missing attribution
Browse files Browse the repository at this point in the history
  • Loading branch information
andyholmes committed Nov 23, 2022
1 parent 1e856ae commit 6eeb1ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion nautilus-extension/nautilus-gsconnect.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect
# SPDX-FileCopyrightText: 2016 KDE Connect Indicator Developers
# SPDX-FileContributor: GSConnect Developers https://github.com/GSConnect
#
# SPDX-License-Identifier: GPL-2.0-or-later

Expand Down
16 changes: 12 additions & 4 deletions src/service/plugins/contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,15 @@ var Plugin = GObject.registerClass({
/**
* Decode a string encoded as "QUOTED-PRINTABLE" and return a regular string
*
* See: https://github.com/mathiasbynens/quoted-printable/blob/master/src/quoted-printable.js
*
* @param {string} input - The QUOTED-PRINTABLE string
* @return {string} The decoded string
*/
_decodeQuotedPrintable(input) {
/* SPDX-SnippetBegin
* SPDX-License-Identifier: MIT
* SPDX-SnippetCopyrightText: Mathias Bynens
* SPDX-SnippetComment: https://github.com/mathiasbynens/quoted-printable/blob/master/src/quoted-printable.js
*/
return input
// https://tools.ietf.org/html/rfc2045#section-6.7, rule 3
.replace(/[\t\x20]$/gm, '')
Expand All @@ -162,18 +165,22 @@ var Plugin = GObject.registerClass({
const codePoint = parseInt($1, 16);
return String.fromCharCode(codePoint);
});
/* SPDX-SnippetEnd */
}

/**
* Decode a string encoded as "UTF-8" and return a regular string
*
* See: https://github.com/kvz/locutus/blob/master/src/php/xml/utf8_decode.js
*
* @param {string} input - The UTF-8 string
* @return {string} The decoded string
*/
_decodeUTF8(input) {
try {
/* SPDX-SnippetBegin
* SPDX-License-Identifier: MIT
* SPDX-SnippetCopyrightText: Kevin van Zonneveld
* SPDX-SnippetComment: https://github.com/kvz/locutus/blob/master/src/php/xml/utf8_decode.js
*/
const output = [];
let i = 0;
let c1 = 0;
Expand Down Expand Up @@ -212,6 +219,7 @@ var Plugin = GObject.registerClass({
}

return output.join('');
/* SPDX-SnippetEnd */

// Fallback to old unfaithful
} catch (e) {
Expand Down
5 changes: 4 additions & 1 deletion src/shell/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect
// SPDX-FileCopyrightText: Franco Bianconi
// SPDX-FileContributor: Karel Mácha
// SPDX-FileContributor: Raphael Rochet
// SPDX-FileContributor: GSConnect Developers https://github.com/GSConnect
//
// SPDX-License-Identifier: GPL-2.0-or-later

Expand Down

0 comments on commit 6eeb1ff

Please sign in to comment.