Mouse support is now optional but activated by default. Solves
MODIFY
app/app.go
app/app.go
@@ -55,14 +55,15 @@ func Run() {
app.SetRoot(splashScreen, true)
runNext := make(chan bool, 1)
- go func() {
configuration, configLoadError := config.LoadConfig()
if configLoadError != nil {
- app.Stop()
log.Fatalf("Error loading configuration file (%s).\n", configLoadError.Error())
}
+ app.MouseEnabled = configuration.MouseEnabled
+
+ go func() {
shortcutsLoadError := shortcuts.Load()
if shortcutsLoadError != nil {
panic(shortcutsLoadError)

MODIFY
config/config.go
config/config.go
@@ -46,6 +46,7 @@ var (
FocusChannelAfterGuildSelection: true,
FocusMessageInputAfterChannelSelection: true,
OnTypeInListBehaviour: SearchOnTypeInList,
+ MouseEnabled: true,
ShortenLinks: false,
ShortenerPort: 63212,
DesktopNotifications: true,
@@ -89,6 +90,8 @@ type Config struct {
// OnTypeInListBehaviour defines whether the application focus the input
// input field on typing, searches the list or does nothing.
OnTypeInListBehaviour int
+ // MouseEnabled decides whether the mouse is useable or not.
+ MouseEnabled bool
// ShortenLinks decides whether cordless starts a local webserver in order
// to be able to shorten links

MODIFY
go.mod
go.mod
@@ -7,7 +7,7 @@ require (
github.com/Bios-Marcel/discordgo v0.20.4-0.20190707104755-31ead081b5b1
github.com/Bios-Marcel/goclipimg v0.0.0-20190417192721-b58a8831f27d
github.com/Bios-Marcel/shortnotforlong v0.0.0-20190220133053-9074a923cf4d
- github.com/Bios-Marcel/tview v0.0.0-20190712141809-88224656e575
+ github.com/Bios-Marcel/tview v0.0.0-20190712142836-ea9b4a50a84f
github.com/DimitarPetrov/stegify v0.0.0-20190515112438-ee237f3bbbdd
github.com/alecthomas/chroma v0.6.3
github.com/atotto/clipboard v0.1.2

MODIFY
go.sum
go.sum
@@ -10,6 +10,8 @@ github.com/Bios-Marcel/tview v0.0.0-20190707092717-2f13c1111adc h1:TAmBE6k99Vaff
github.com/Bios-Marcel/tview v0.0.0-20190707092717-2f13c1111adc/go.mod h1:1yM6ZD3hxlpiHugsW1MuABv9x42KTvxFUocQ4uEorN0=
github.com/Bios-Marcel/tview v0.0.0-20190712141809-88224656e575 h1:IOp07vNmBCP+8tVJvQ3vkcGepA3pibUA/MltHYs6G/U=
github.com/Bios-Marcel/tview v0.0.0-20190712141809-88224656e575/go.mod h1:1yM6ZD3hxlpiHugsW1MuABv9x42KTvxFUocQ4uEorN0=
+github.com/Bios-Marcel/tview v0.0.0-20190712142836-ea9b4a50a84f h1:BAqDSUAdafJsX5U3//FtvPVUZmuyGAyuhjhTxlbSRhk=
+github.com/Bios-Marcel/tview v0.0.0-20190712142836-ea9b4a50a84f/go.mod h1:1yM6ZD3hxlpiHugsW1MuABv9x42KTvxFUocQ4uEorN0=
github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DimitarPetrov/stegify v0.0.0-20190515112438-ee237f3bbbdd h1:0TYseHj7yTW7Mi2rTrTHa6PfiOWUG6yCOmMHnjb2J04=

Mouse support is now optional but activated by default. Solves #87