43
43
self.connection.connect_to_signal("ConnectionOnline", self.on_connection_online)
44
44
self.connection.connect_to_signal("ConnectionOffline", self.on_connection_offline)
47
microblog.util.getbus("Streams").connect_to_signal("SettingChanged", self.on_setting_changed)
49
if len(json.loads(self.service.GetAccounts())) == 0:
51
account_migrate = upgrade.GwibberAccountMigrate()
52
if not account_migrate.run():
53
if os.path.exists(os.path.join("bin", "gwibber-accounts")):
54
cmd = os.path.join("bin", "gwibber-accounts")
56
cmd = "gwibber-accounts"
59
ret = subprocess.call([cmd])
46
self.accounts = microblog.util.getbus("Accounts")
49
# check for existing accounts
50
if len(json.loads(self.accounts.List())) == 0:
51
# if there are no accounts configured, prompt the user to add some
53
if os.path.exists(os.path.join("bin", "gwibber-accounts")):
54
cmd = os.path.join("bin", "gwibber-accounts")
56
cmd = "gwibber-accounts"
59
ret = subprocess.call([cmd])
64
# Since we didn't have accounts configured when gwibber-service started
65
# force it to refresh now that accounts have been added
60
66
self.service.Refresh()
65
68
# Migrate the autostart gconf key to the new location
66
69
if config.GCONF.get("/apps/gwibber/autostart"):