fix ui scaler. fix font colours on kde. fix p2p settings crash #34
|
@ -4,7 +4,7 @@ import (
|
||||||
"cwtch.im/ui/go/gobjects"
|
"cwtch.im/ui/go/gobjects"
|
||||||
"cwtch.im/ui/go/the"
|
"cwtch.im/ui/go/the"
|
||||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||||
"log"
|
"git.openprivacy.ca/openprivacy/libricochet-go/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func PostmanPat(messages chan gobjects.Letter) {
|
func PostmanPat(messages chan gobjects.Letter) {
|
||||||
|
@ -31,7 +31,7 @@ func andHisBlackAndWhiteCat(incomingMessages chan gobjects.Letter) {
|
||||||
connection.DoOnChannel("im.ricochet.chat", channels.Outbound, func(channel *channels.Channel) {
|
connection.DoOnChannel("im.ricochet.chat", channels.Outbound, func(channel *channels.Channel) {
|
||||||
chatchannel, ok := channel.Handler.(*channels.ChatChannel)
|
chatchannel, ok := channel.Handler.(*channels.ChatChannel)
|
||||||
if ok {
|
if ok {
|
||||||
log.Printf("Sending packet")
|
log.Debugln("Sending packet")
|
||||||
the.AcknowledgementIDs[chatchannel.SendMessage(m.Message)] = m.MID
|
the.AcknowledgementIDs[chatchannel.SendMessage(m.Message)] = m.MID
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -245,7 +245,7 @@ func (this *GrandCentralDispatcher) importString(str string) {
|
||||||
|
|
||||||
_, err := base32.StdEncoding.DecodeString(strings.ToUpper(onion[:56]))
|
_, err := base32.StdEncoding.DecodeString(strings.ToUpper(onion[:56]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("%v", err)
|
log.Debugln(err)
|
||||||
this.InvokePopup("bad format. missing characters?")
|
this.InvokePopup("bad format. missing characters?")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"cwtch.im/ui/go/gobjects"
|
"cwtch.im/ui/go/gobjects"
|
||||||
"cwtch.im/ui/go/the"
|
"cwtch.im/ui/go/the"
|
||||||
"encoding/base32"
|
"encoding/base32"
|
||||||
"log"
|
"git.openprivacy.ca/openprivacy/libricochet-go/log"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ func (this *InterfaceState) AddContact(c *gobjects.Contact) {
|
||||||
|
|
||||||
return
|
return
|
||||||
} else if len(c.Handle) != 56 {
|
} else if len(c.Handle) != 56 {
|
||||||
log.Printf("sorry, unable to handle AddContact(%v)", c.Handle)
|
log.Errorf("sorry, unable to handle AddContact(%v)", c.Handle)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
main.go
17
main.go
|
@ -13,11 +13,11 @@ import (
|
||||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||||
"git.openprivacy.ca/openprivacy/libricochet-go/connectivity"
|
"git.openprivacy.ca/openprivacy/libricochet-go/connectivity"
|
||||||
|
"git.openprivacy.ca/openprivacy/libricochet-go/log"
|
||||||
"github.com/therecipe/qt/core"
|
"github.com/therecipe/qt/core"
|
||||||
"github.com/therecipe/qt/quick"
|
"github.com/therecipe/qt/quick"
|
||||||
"github.com/therecipe/qt/quickcontrols2"
|
"github.com/therecipe/qt/quickcontrols2"
|
||||||
"github.com/therecipe/qt/widgets"
|
"github.com/therecipe/qt/widgets"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
"path"
|
"path"
|
||||||
|
@ -98,7 +98,7 @@ func loadCwtchData(gcd *gothings.GrandCentralDispatcher) {
|
||||||
|
|
||||||
/*_, err := app2.NewApp(dirname, "/data/data/org.qtproject.example.go/lib/libtor.so")
|
/*_, err := app2.NewApp(dirname, "/data/data/org.qtproject.example.go/lib/libtor.so")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("ERROR CREATING CWTCH APP: %v", err)
|
log.Errorf("ERROR CREATING CWTCH APP: %v", err)
|
||||||
}
|
}
|
||||||
time.Sleep(time.Second * 10)
|
time.Sleep(time.Second * 10)
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,8 @@ func loadCwtchData(gcd *gothings.GrandCentralDispatcher) {
|
||||||
|
|
||||||
mn, err := connectivity.StartTor(the.CwtchDir, "")
|
mn, err := connectivity.StartTor(the.CwtchDir, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[!!!] Could not start Tor: %v", err)
|
log.Errorf("Could not start Tor: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
the.CwtchApp = libapp.NewApp(mn, the.CwtchDir)
|
the.CwtchApp = libapp.NewApp(mn, the.CwtchDir)
|
||||||
|
@ -114,14 +115,16 @@ func loadCwtchData(gcd *gothings.GrandCentralDispatcher) {
|
||||||
err = the.CwtchApp.LoadProfiles("be gay do crime")
|
err = the.CwtchApp.LoadProfiles("be gay do crime")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
//TODO no more fatalfs
|
//TODO no more fatalfs
|
||||||
log.Fatalf("couldn't load profiles: %v", err)
|
log.Errorf("couldn't load profiles: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(the.CwtchApp.ListPeers()) == 0 {
|
if len(the.CwtchApp.ListPeers()) == 0 {
|
||||||
log.Printf("couldn't load your config file. attempting to create one now")
|
log.Infoln("couldn't load your config file. attempting to create one now")
|
||||||
the.Peer, err = the.CwtchApp.CreatePeer("alice", "be gay do crime")
|
the.Peer, err = the.CwtchApp.CreatePeer("alice", "be gay do crime")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("couldn't create one. is your cwtch folder writable?")
|
log.Errorf("couldn't create one. is your cwtch folder writable?")
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
the.CwtchApp.SaveProfile(the.Peer)
|
the.CwtchApp.SaveProfile(the.Peer)
|
||||||
} else {
|
} else {
|
||||||
|
@ -162,7 +165,7 @@ func loadCwtchData(gcd *gothings.GrandCentralDispatcher) {
|
||||||
|
|
||||||
groups := the.Peer.GetGroups()
|
groups := the.Peer.GetGroups()
|
||||||
for i := range groups {
|
for i := range groups {
|
||||||
log.Printf("adding saved group %v", groups[i])
|
log.Infof("adding saved group %v", groups[i])
|
||||||
group := the.Peer.GetGroup(groups[i])
|
group := the.Peer.GetGroup(groups[i])
|
||||||
group.NewMessage = make(chan model.Message)
|
group.NewMessage = make(chan model.Message)
|
||||||
go characters.CwtchListener(gcd.UIState.AddMessage, groups[i], group.NewMessage)
|
go characters.CwtchListener(gcd.UIState.AddMessage, groups[i], group.NewMessage)
|
||||||
|
|
Reference in New Issue