[polari/wip/fmuellner/tracker: 117/121] joinDialog: Replace TpLogger with tracker
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/tracker: 117/121] joinDialog: Replace TpLogger with tracker
- Date: Sat, 26 Nov 2016 16:05:11 +0000 (UTC)
commit d5b20e8893e16d0318d1b345bba3b93e8450a0a6
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Dec 24 05:02:35 2015 +0100
joinDialog: Replace TpLogger with tracker
src/joinDialog.js | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/joinDialog.js b/src/joinDialog.js
index 8c7f2be..214ae87 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -3,11 +3,11 @@ const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Tp = imports.gi.TelepathyGLib;
-const Tpl = imports.gi.TelepathyLogger;
const AccountsMonitor = imports.accountsMonitor;
const Connections = imports.connections;
const Lang = imports.lang;
+const LogManager = imports.logManager;
const Utils = imports.utils;
const DialogPage = {
@@ -171,16 +171,13 @@ const JoinDialog = new Lang.Class({
let account = this._accounts[selected];
if (!account)
return;
- let logManager = Tpl.LogManager.dup_singleton();
-
- logManager.get_entities_async(account, Lang.bind(this,
- function(m, res) {
- let [, entities] = logManager.get_entities_finish(res);
- let names = entities.filter(function(e) {
- return e.type == Tpl.EntityType.ROOM;
- }).map(function(e) {
- return e.alias;
- });
+
+ let logManager = LogManager.getDefault();
+
+ let sparql = 'select distinct nie:title(?chan) as ?title ' +
+ '{ ?chan a nmo:PermanentChannel } order by ?title';
+ logManager.query(sparql, null, Lang.bind(this,
+ function(names) {
for (let i = 0; i < names.length; i++) {
let model = this._nameCompletion.model;
let iter = model.append();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]