[Evolution-hackers] Evolution-data-server offline handling
- From: Alexander Larsson <alexl redhat com>
- To: evolution-hackers gnome org
- Subject: [Evolution-hackers] Evolution-data-server offline handling
- Date: Fri, 03 Feb 2012 11:38:52 +0100
The google addressbook backends only allows writes while online, and I
need to reliably detect this and display the editable state in
Gnome Contacts. The addressbook readonly property is propagated via
folks, so theoretically this should be doable. However, a series of
failures is causing problems for this.
The google backend is looking at e_backend_get_online and
notifications for that property, which gets propagated to
all backends in a single dbus service instance from EDataFactory.
However, EDataFactory looks at the /apps/evolution/shell/start_offline
GConf key, and evolution is not touching this, as it got upgraded
to set the "start-offline" GSettings key in
"org.gnome.evolution.shell" instead. This means that no eds backends
will ever see an offline mode atm.
However, even if eds was fixed to read from GSettings this is pretty
bad for Gnome Contacts. The network availible tracking is implemented
as evolution plugins, which require evolution to be running to
propagate network status to the eds backends.
I could duplicate the network manager stuff in gnome-contacts, but
then we run into conflicts if both evolution and gnome-contacts are
running at the same time. This happens because the "start-offline" key
doesn't purely represent the network_available property, but is a
combination of that and whether the user forced offline mode. For
instance, there is no way for Gnome Contacts to know whether it should
go online again if start_offline=TRUE and we transition from no network
to network availible, because EShell.auto_reconnect is evolution-private
state.
IMHO we should implement actual network availibility tracking in
EDataFactory (using NM or ConnMan) to get the real state inside the
backends (i.e. if there is no network the backends should always be
offline).
The question remains however what to do about the forced offline
state. If you put evolution in forced offline mode, do you truly want
to turn the desktop-global addressbooks and calendard into offline
mode too? It might be pretty suprising that suddenly the contacts and
calendar integration in the shell and contacts is readonly because you
switched your mailer to offline mode. It can be especially problematic
if you then close evolution, and have no other place to disable
offline mode.
Maybe we should make the "offline" mode in evolution really only
affect the camel_session online state? I don't know exactly what the
usecase is for the evolution offline mode, so I don't know what the
best approach is here.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]