func (r *roster) renameContactPopup(conf *config.Account, jid string) { builder := builderForDefinition("RenameContact") obj, _ := builder.GetObject("RenameContactPopup") popup := obj.(*gtk.Dialog) builder.ConnectSignals(map[string]interface{}{ "on_rename_signal": func() { obj, _ = builder.GetObject("rename") renameTxt := obj.(*gtk.Entry) newName, _ := renameTxt.GetText() conf.RenamePeer(jid, newName) r.ui.SaveConfig() r.redraw() popup.Destroy() }, }) popup.ShowAll() }