diff options
Diffstat (limited to 'limox.go')
| -rw-r--r-- | limox.go | 10 | 
1 files changed, 8 insertions, 2 deletions
@@ -34,7 +34,7 @@ type Limox struct {  }  func NewLimox() Limox { -	return Limox{ +	l := Limox{  		Window: app.NewWindow(  			app.Title("LimoX"),  			app.Size(unit.Dp(400), unit.Dp(600)), @@ -44,6 +44,10 @@ func NewLimox() Limox {  		XmppConn:   make(chan xmpp.Event),  		State:      Disconnected,  	} + +	l.JidEditor.SetText(getLastJid()) + +	return l  }  func (l *Limox) run() error { @@ -77,7 +81,9 @@ func (l *Limox) buttonCallback() {  	switch l.State {  	case Disconnected:  		log.Println("Starting connection establishment ...") -		go xmpp.Run(l.XmppConn, l.JidEditor.Text(), l.PwdEditor.Text()) +		jid := l.JidEditor.Text() +		setLastJid(jid) +		go xmpp.Run(l.XmppConn, jid, l.PwdEditor.Text())  		l.State = Connecting  	case Connecting:  		log.Println("Aborted connection establishment")  | 
