aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-01-17 14:13:25 +0200
committerTulir Asokan <tulir@maunium.net>2019-01-23 00:26:51 +0200
commitbf2a5e9b3495912bc4e266052e15cceedab131cf (patch)
tree140aac130323f5585a87c7dddb5af49dadb03f33 /ui
parentcdb79be7d7ba10807bc1db1f3e52887b04a4b0fd (diff)
Update license and sort imports
Diffstat (limited to 'ui')
-rw-r--r--ui/command-processor.go13
-rw-r--r--ui/commands.go16
-rw-r--r--ui/fuzzy-search-modal.go16
-rw-r--r--ui/message-view.go16
-rw-r--r--ui/messages/base.go15
-rw-r--r--ui/messages/expandedtextmessage.go13
-rw-r--r--ui/messages/imagemessage.go16
-rw-r--r--ui/messages/message.go10
-rw-r--r--ui/messages/meta.go10
-rw-r--r--ui/messages/parser/htmlparser.go18
-rw-r--r--ui/messages/parser/parser.go10
-rw-r--r--ui/messages/textbase.go13
-rw-r--r--ui/messages/textmessage.go13
-rw-r--r--ui/messages/tstring/cell.go11
-rw-r--r--ui/messages/tstring/string.go13
-rw-r--r--ui/room-list.go16
-rw-r--r--ui/room-view.go20
-rw-r--r--ui/tag-room-list.go15
-rw-r--r--ui/ui.go16
-rw-r--r--ui/view-login.go15
-rw-r--r--ui/view-main.go20
-rw-r--r--ui/widget/advanced-inputfield.go11
-rw-r--r--ui/widget/border.go10
-rw-r--r--ui/widget/center.go10
-rw-r--r--ui/widget/color.go10
-rw-r--r--ui/widget/form-text-view.go10
-rw-r--r--ui/widget/util.go10
27 files changed, 194 insertions, 172 deletions
diff --git a/ui/command-processor.go b/ui/command-processor.go
index eb24f19..0aed4b2 100644
--- a/ui/command-processor.go
+++ b/ui/command-processor.go
@@ -1,27 +1,28 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
"fmt"
+ "strings"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/interface"
- "strings"
)
type gomuksPointerContainer struct {
diff --git a/ui/commands.go b/ui/commands.go
index 50aedd2..12a99de 100644
--- a/ui/commands.go
+++ b/ui/commands.go
@@ -1,30 +1,32 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
"encoding/json"
"fmt"
- "maunium.net/go/mautrix"
- "maunium.net/go/mautrix/format"
"strings"
"unicode"
"github.com/lucasb-eyer/go-colorful"
+
+ "maunium.net/go/mautrix"
+ "maunium.net/go/mautrix/format"
+
"maunium.net/go/gomuks/debug"
)
diff --git a/ui/fuzzy-search-modal.go b/ui/fuzzy-search-modal.go
index b58a367..995b4ba 100644
--- a/ui/fuzzy-search-modal.go
+++ b/ui/fuzzy-search-modal.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
@@ -22,11 +22,13 @@ import (
"strconv"
"github.com/lithammer/fuzzysearch/fuzzy"
+
+ "maunium.net/go/tcell"
+ "maunium.net/go/tview"
+
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tcell"
- "maunium.net/go/tview"
)
type FuzzySearchModal struct {
diff --git a/ui/message-view.go b/ui/message-view.go
index 2dffa57..4af0ba9 100644
--- a/ui/message-view.go
+++ b/ui/message-view.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
@@ -24,6 +24,10 @@ import (
"strings"
"github.com/mattn/go-runewidth"
+
+ "maunium.net/go/tcell"
+ "maunium.net/go/tview"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/interface"
@@ -31,8 +35,6 @@ import (
"maunium.net/go/gomuks/ui/messages"
"maunium.net/go/gomuks/ui/messages/tstring"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tcell"
- "maunium.net/go/tview"
)
type MessageView struct {
diff --git a/ui/messages/base.go b/ui/messages/base.go
index 441aca1..ba1902d 100644
--- a/ui/messages/base.go
+++ b/ui/messages/base.go
@@ -1,31 +1,32 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
import (
"encoding/gob"
- "maunium.net/go/mautrix"
"time"
+ "maunium.net/go/mautrix"
+ "maunium.net/go/tcell"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/interface"
"maunium.net/go/gomuks/ui/messages/tstring"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tcell"
)
func init() {
diff --git a/ui/messages/expandedtextmessage.go b/ui/messages/expandedtextmessage.go
index fbb373d..d889771 100644
--- a/ui/messages/expandedtextmessage.go
+++ b/ui/messages/expandedtextmessage.go
@@ -1,26 +1,27 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
import (
"encoding/gob"
- "maunium.net/go/mautrix"
"time"
+ "maunium.net/go/mautrix"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/ui/messages/tstring"
)
diff --git a/ui/messages/imagemessage.go b/ui/messages/imagemessage.go
index 8ccff67..0efe676 100644
--- a/ui/messages/imagemessage.go
+++ b/ui/messages/imagemessage.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
@@ -20,17 +20,17 @@ import (
"bytes"
"encoding/gob"
"fmt"
- "maunium.net/go/mautrix"
+ "image/color"
"time"
- "image/color"
+ "maunium.net/go/mautrix"
+ "maunium.net/go/tcell"
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/interface"
"maunium.net/go/gomuks/lib/ansimage"
"maunium.net/go/gomuks/ui/messages/tstring"
- "maunium.net/go/tcell"
)
func init() {
diff --git a/ui/messages/message.go b/ui/messages/message.go
index b5ef1b8..076cd87 100644
--- a/ui/messages/message.go
+++ b/ui/messages/message.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
diff --git a/ui/messages/meta.go b/ui/messages/meta.go
index 23a52e9..0712be1 100644
--- a/ui/messages/meta.go
+++ b/ui/messages/meta.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
diff --git a/ui/messages/parser/htmlparser.go b/ui/messages/parser/htmlparser.go
index 850dc52..ddf6d36 100644
--- a/ui/messages/parser/htmlparser.go
+++ b/ui/messages/parser/htmlparser.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package parser
@@ -20,16 +20,18 @@ import (
"fmt"
"math"
"regexp"
+ "strconv"
"strings"
"github.com/lucasb-eyer/go-colorful"
"golang.org/x/net/html"
+
+ "maunium.net/go/mautrix"
+ "maunium.net/go/tcell"
+
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/messages/tstring"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/mautrix"
- "maunium.net/go/tcell"
- "strconv"
)
var matrixToURL = regexp.MustCompile("^(?:https?://)?(?:www\\.)?matrix\\.to/#/([#@!].*)")
diff --git a/ui/messages/parser/parser.go b/ui/messages/parser/parser.go
index 05dd0e9..94ab5b6 100644
--- a/ui/messages/parser/parser.go
+++ b/ui/messages/parser/parser.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package parser
diff --git a/ui/messages/textbase.go b/ui/messages/textbase.go
index 4b242b4..01e7b5c 100644
--- a/ui/messages/textbase.go
+++ b/ui/messages/textbase.go
@@ -1,26 +1,27 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
import (
"fmt"
+ "regexp"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/ui/messages/tstring"
- "regexp"
)
// Regular expressions used to split lines when calculating the buffer.
diff --git a/ui/messages/textmessage.go b/ui/messages/textmessage.go
index 8622c32..8ce9482 100644
--- a/ui/messages/textmessage.go
+++ b/ui/messages/textmessage.go
@@ -1,27 +1,28 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package messages
import (
"encoding/gob"
"fmt"
- "maunium.net/go/mautrix"
"time"
+ "maunium.net/go/mautrix"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/interface"
"maunium.net/go/gomuks/ui/messages/tstring"
diff --git a/ui/messages/tstring/cell.go b/ui/messages/tstring/cell.go
index c3e22a3..aee1716 100644
--- a/ui/messages/tstring/cell.go
+++ b/ui/messages/tstring/cell.go
@@ -1,23 +1,24 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package tstring
import (
"github.com/mattn/go-runewidth"
+
"maunium.net/go/tcell"
)
diff --git a/ui/messages/tstring/string.go b/ui/messages/tstring/string.go
index 3de876f..7feeda0 100644
--- a/ui/messages/tstring/string.go
+++ b/ui/messages/tstring/string.go
@@ -1,27 +1,28 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package tstring
import (
"strings"
+ "unicode"
"github.com/mattn/go-runewidth"
+
"maunium.net/go/tcell"
- "unicode"
)
type TString []Cell
diff --git a/ui/room-list.go b/ui/room-list.go
index d82f870..a3ae17e 100644
--- a/ui/room-list.go
+++ b/ui/room-list.go
@@ -1,31 +1,31 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
+ "math"
"regexp"
"strings"
- "math"
+ "maunium.net/go/tcell"
+ "maunium.net/go/tview"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
- "maunium.net/go/tcell"
- "maunium.net/go/tview"
)
type RoomList struct {
diff --git a/ui/room-view.go b/ui/room-view.go
index a978346..67d4e83 100644
--- a/ui/room-view.go
+++ b/ui/room-view.go
@@ -1,24 +1,23 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
"fmt"
- "maunium.net/go/mautrix"
"path/filepath"
"sort"
"strconv"
@@ -26,14 +25,17 @@ import (
"time"
"github.com/mattn/go-runewidth"
+
+ "maunium.net/go/mautrix"
+ "maunium.net/go/tcell"
+ "maunium.net/go/tview"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/interface"
"maunium.net/go/gomuks/lib/util"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/messages"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tcell"
- "maunium.net/go/tview"
)
type RoomView struct {
@@ -155,7 +157,7 @@ func (view *RoomView) GetStatus() string {
var buf strings.Builder
if len(view.completions.list) > 0 {
- if view.completions.textCache != view.input.GetText() || view.completions.time.Add(10*time.Second).Before(time.Now()) {
+ if view.completions.textCache != view.input.GetText() || view.completions.time.Add(10 * time.Second).Before(time.Now()) {
view.completions.list = []string{}
} else {
buf.WriteString(strings.Join(view.completions.list, ", "))
diff --git a/ui/tag-room-list.go b/ui/tag-room-list.go
index 60b4350..3c30914 100644
--- a/ui/tag-room-list.go
+++ b/ui/tag-room-list.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
@@ -21,10 +21,11 @@ import (
"strconv"
"strings"
- "maunium.net/go/gomuks/matrix/rooms"
- "maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tcell"
"maunium.net/go/tview"
+
+ "maunium.net/go/gomuks/matrix/rooms"
+ "maunium.net/go/gomuks/ui/widget"
)
type OrderedRoom struct {
diff --git a/ui/ui.go b/ui/ui.go
index b2662d7..5188278 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -1,26 +1,28 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
- "maunium.net/go/gomuks/interface"
+ "os"
+
"maunium.net/go/tcell"
"maunium.net/go/tview"
- "os"
+
+ "maunium.net/go/gomuks/interface"
)
type View string
diff --git a/ui/view-login.go b/ui/view-login.go
index 3d42506..603899c 100644
--- a/ui/view-login.go
+++ b/ui/view-login.go
@@ -1,28 +1,29 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
+ "maunium.net/go/mautrix"
+ "maunium.net/go/tview"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/interface"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/mautrix"
- "maunium.net/go/tview"
)
type LoginView struct {
diff --git a/ui/view-main.go b/ui/view-main.go
index 96daf1b..254dc9f 100644
--- a/ui/view-main.go
+++ b/ui/view-main.go
@@ -1,32 +1,34 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package ui
import (
+ "bufio"
"fmt"
+ "os"
"time"
"unicode"
"github.com/kyokomi/emoji"
- "bufio"
- "os"
-
"maunium.net/go/mautrix"
+ "maunium.net/go/tcell"
+ "maunium.net/go/tview"
+
"maunium.net/go/gomuks/config"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/interface"
@@ -35,8 +37,6 @@ import (
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/messages/parser"
"maunium.net/go/gomuks/ui/widget"
- "maunium.net/go/tcell"
- "maunium.net/go/tview"
)
type MainView struct {
diff --git a/ui/widget/advanced-inputfield.go b/ui/widget/advanced-inputfield.go
index 44d988b..741ae3d 100644
--- a/ui/widget/advanced-inputfield.go
+++ b/ui/widget/advanced-inputfield.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Based on https://github.com/rivo/tview/blob/master/inputfield.go
@@ -26,6 +26,7 @@ import (
"github.com/mattn/go-runewidth"
"github.com/zyedidia/clipboard"
+
"maunium.net/go/tcell"
"maunium.net/go/tview"
)
diff --git a/ui/widget/border.go b/ui/widget/border.go
index 834eedb..8ec772d 100644
--- a/ui/widget/border.go
+++ b/ui/widget/border.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package widget
diff --git a/ui/widget/center.go b/ui/widget/center.go
index 07dbfd7..cc994bb 100644
--- a/ui/widget/center.go
+++ b/ui/widget/center.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package widget
diff --git a/ui/widget/color.go b/ui/widget/color.go
index 37a931a..a121731 100644
--- a/ui/widget/color.go
+++ b/ui/widget/color.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package widget
diff --git a/ui/widget/form-text-view.go b/ui/widget/form-text-view.go
index 207bdde..2a8683c 100644
--- a/ui/widget/form-text-view.go
+++ b/ui/widget/form-text-view.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package widget
diff --git a/ui/widget/util.go b/ui/widget/util.go
index cd1fcd0..ed51735 100644
--- a/ui/widget/util.go
+++ b/ui/widget/util.go
@@ -1,18 +1,18 @@
// gomuks - A terminal Matrix client written in Go.
-// Copyright (C) 2018 Tulir Asokan
+// Copyright (C) 2019 Tulir Asokan
//
// 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
+// it under the terms of the GNU Affero 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.
+// GNU Affero 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 <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
package widget