17
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
# don't use dbus, triggers a gwibber start
21
24
#from dbus.mainloop.glib import DBusGMainLoop
23
25
#DBusGMainLoop(set_as_default=True)
26
from gwibber.lib import GwibberPublic
27
_gwibber_is_available = True
28
Gwibber = GwibberPublic()
29
Gwibber.service.refresh()
31
_gwibber_is_available = False
34
def gwibber_service_available():
35
if not _gwibber_is_available:
37
return len(json.loads(Gwibber.GetAccounts())) > 0
39
GWIBBER_SERVICE_AVAILABLE = gwibber_service_available()
27
# from gwibber.lib import GwibberPublic
28
# _gwibber_is_available = True
29
# Gwibber = GwibberPublic()
30
# Gwibber.service.refresh()
32
# _gwibber_is_available = False
35
# def gwibber_service_available():
36
# if not _gwibber_is_available:
38
# return len(json.loads(Gwibber.GetAccounts())) > 0
40
#GWIBBER_SERVICE_AVAILABLE = gwibber_service_available()
40
41
#print 'Gwibber Serice Available: %s' % GWIBBER_SERVICE_AVAILABLE
43
def gwibber_has_accounts_in_gconf():
45
client = gconf.client_get_default()
46
v = client.get("/apps/gwibber/accounts/index")
51
GWIBBER_SERVICE_AVAILABLE = gwibber_has_accounts_in_gconf()