On 24 авг 2011 22:40:20 Valentin Rusu wrote: > On 08/24/2011 09:30 PM, 4ernov wrote: > >>> Sorry for unclear text, yes, I meant KWallet API, you're right. > >>> Here's > >>> those method itself: > >>> > >>> bool MicroBlog::enterWalletFolder(const QString &folder) > >>> { > >>> > >>> //TODO: seems a bit silly to have a function just for this > >>> here > >>> //why doesn't kwallet have this itself? > >> > >> What's this TODO exactly meaning? Check for setFolder? I don't get it > >> :-)> > > I actually don't know) It's not my code, I just wanted to fix it, so > > it's "as is" :-) > > Ok, NP. > > >> Use KWallet::isEnabled() as it calls the daemon to check for that and > >> it > >> eventually starts the daemon if it's not already started. > >> But you must have the Wallet system enabled system-wide, in System > >> Settings, for this to happen. > > > > Thank you for advice. And should I wait for it to return true or it > > returns true after the daemon is started? > > It's a synchronous call, so when you get the "true" result, the daemon > is already running.
Just test it. Both isEnabled() and openWallet() return true, but the behavior is just the same. I've got a thought: could it be because the "Open Wallet" dialog is already shown by the same app's call (as to this dialog text, all the plasmoids are treated as "Plasma Shell")? To be exact, the behavior is like this: 1. I start KDE. 2. Few seconds later the dialog from KWalletManager appears to make me enter master password. The application mentioned there is "Plasma Shell" (sorry if incorrect, I've got localized version). The Microblog plasmoid behaves itself as always: it's empty and no account is logged in. 3. I enter master password. The plasmoid is still the same. KWalletd is running this time (as of 'pidof kwalletd'). 4. I push Enter and right here the plasmoid fallbacks to the place of code mentioned above and make me enter login and password once again. If I enter, everything works correctly until the next KDE login. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<