Calling this nationalization is is misleading. The bank in question (and a few others) were on the verge of bankruptcy. Shares of any bankrupt company are worth nothing. The state set up a bad bank which took over the poisoned assets (bad loans etc.) and pumped several billion € of fresh capital into these banks, so they can now function normally.
All of this was conducted under strict EU supervision and with previous approval. Such procedures (healing troubled banks with a bad bank) took place in many EU countries like Finland, Germany, Spain and UK. Some of these bad bank were set up in the 1990s See "bad bank" on wikipedia to learn more.
PS
Slovenia as a state isn't bankrupt. Public debt after this bad bank scenario increased for those billions that were pumped in these banks, but still it is about 65% of GDP which is average. E.g. Italian debt is 125% of GDB, Greece 160% and Poland 53% ...