You could make gun safes a mandatory accessory for all gun purchases.
OR
You could require that insurance companies that wish to sell home owners or renters insurance in your state, offer full coverage for any gun related incidents, to the maximum liability of the policy, regardless of whether or not the policy buyer declares himself to be a gun owner.
Then the insurance companies could adjust their rates accordingly, and offer discounts to owners who positively identify to the insurance company a secure place for their weapons.
Neither approach takes away anyone's guns, and for the poor, free simple lockups could be offered.
This has a hidden advantage of driving up the price of Black Market guns, as they will be harder to steal.
This is not rocket science. Git'er done.