Introduction of the TnyLockable



The new type TnyLockable is used by the TnySessionCamel type to lock and
unlock your ui toolkit.

There's an implementation called TnyGtkLockable that utilises
gdk_threads_enter and gdk_threads_leave for implementing the lock and
unlock methods.

The TnySessionCamel type will assume that your toolkit is in locked
state at the time that you give the TnySessionCamel your locker using
tny_session_camel_set_ui_locker

It will then unlock and lock when in-a-thread it will call the alert,
get_pass and forget_pass implementations of your TnyAccountStore (it
indeed assumes that your TnyAccountStore has set the ui_locker in a fot
itself right way, as usually the TnyAccountStore is the creator and
guard of the TnySessionCamel instance too)

The existing TnyAcountStore implementations have all been adapted to use
the TnyGtkLockable as ui_locker for the TnySessionCamel instance.

This has not yet been put in the documentation, which is something I
will do sooner or later (in a meaningful way, the API around this might
still change a bit).

Feel free to go ahead and create that documentation (like, copy-paste
this E-mail to the wiki somewhere and make it meaningful).


-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]