Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added copyright notice to all .swift files (#391) #403

Merged
merged 3 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions Keyboards/InterfaceConstants.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// Scribe
//
// Constants for Scribe keyboard interfaces.
//
/**
* Constants for the Scribe keyboard interfaces.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey!! 👋

Just wondering about something here..
How would we plan on maintaining this license header in all the relevant files? Not sure if some automation was used to make the changes in this PR, but could there be something like .editorconfig that we could use to generate these (especially if we'd like to tweak the text in the future)?

CC: @andrewtavis

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any level of automation would be appreciated for this. I believe that @Jag-Marcel was going through individually as this was also a task of better understanding the codebase. The file headers also have a description of the file, which we thought was important. Could you send along an example of how the license could be automated with this, @wkyoshida?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this might be possible with Xcode perhaps (ref)? I don't have Xcode to be able to validate if this works though..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a bit more for changing the default for when the file is made, but maybe I'm not reading it clearly 🤔 Would be good to include though! I'd say it's a different issue though.


enum SpecialKeys {
static let indent = "indent"
Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/Colors/ColorVariables.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// ColorVariables.swift
//
// Variables associated with coloration for Scribe.
//
/**
* Variables associated with coloration for Scribe keyboards.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
21 changes: 18 additions & 3 deletions Keyboards/KeyboardsBase/Colors/ScribeColor.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
//
// ScribeColor.swift
//
/**
* Converts strings for colors into the corresponding color.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
21 changes: 18 additions & 3 deletions Keyboards/KeyboardsBase/Colors/UIColor+ScribeColors.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
//
// UIColor+ScribeColors.swift
//
/**
* Adds Scribe colors to the UIColor pool.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// Extensions.swift
//
// Extensions for Scribe keyboards.
//
/**
* Extensions for Scribe keyboards.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/InterfaceVariables.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// InterfaceVariables.swift
//
// Variables associated with the base keyboard interface.
//
/**
* Variables associated with the base keyboard interface.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/KeyAltChars.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// KeyAltChars.swift
//
// Functions and variables to create alternate key views.
//
/**
* Functions and variables to create alternate key views.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/KeyAnimation.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// KeyAnimation.swift
//
// Functions to animate key pressed with pop up characters.
//
/**
* Functions to animate key presses with pop up characters.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/KeyboardKeys.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// KeyboardKey.swift
//
// Classes and variables that define keys for Scribe keyboards.
//
/**
* Classes and variables that define keys for Scribe keyboards.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/KeyboardStyling.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// KeyboardStyling.swift
//
// Functions to style keyboard elements.
//
/**
* Functions to style keyboard elements.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
33 changes: 23 additions & 10 deletions Keyboards/KeyboardsBase/KeyboardViewController.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// KeyboardViewController.swift
//
// Classes for the parent keyboard view controller that language keyboards inherit and keyboard keys.
//
/**
* Classes for the parent keyboard view controller that language keyboards.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import GRDB
import UIKit
Expand Down Expand Up @@ -193,10 +206,10 @@ class KeyboardViewController: UIInputViewController {
/// - A call to loadKeys to reload the display after an orientation change
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { (nil) in
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
self.updateViewConstraints()
}
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { (nil) in
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
isFirstKeyboardLoad = true
self.loadKeys()
isFirstKeyboardLoad = false
Expand Down Expand Up @@ -488,7 +501,7 @@ class KeyboardViewController: UIInputViewController {
func getDefaultAutosuggestions() {
completionWords = [String]()
for i in 0 ..< 3 {
if (allowUndo) {
if allowUndo {
completionWords.append(previousWord)
continue
}
Expand Down Expand Up @@ -541,7 +554,7 @@ class KeyboardViewController: UIInputViewController {
if suggestionsLowerCasePrefix[0] != "" {
completionWords = [String]()
for i in 0 ..< 3 {
if (allowUndo) {
if allowUndo {
completionWords.append(previousWord)
continue
}
Expand All @@ -566,7 +579,7 @@ class KeyboardViewController: UIInputViewController {
} else if suggestionsCapitalizedPrefix[0] != "" {
completionWords = [String]()
for i in 0 ..< 3 {
if (allowUndo) {
if allowUndo {
completionWords.append(previousWord)
continue
}
Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/LoadData.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// LoadData.swift
//
// Function for loading in data to the keyboards.
//
/**
* Function for loading in data to the keyboards.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import Foundation
import GRDB
Expand Down
23 changes: 18 additions & 5 deletions Keyboards/KeyboardsBase/ScribeFunctionality/Annotate.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
//
// Annotate.swift
//
// Functions and elements that control word annotations.
//
/**
* Functions and elements that control word annotations.
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import UIKit

Expand Down
Loading