[polari/wip/fmuellner/tracker: 2/5] joinDialog: Replace TpLogger with tracker
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/tracker: 2/5] joinDialog: Replace TpLogger with tracker
- Date: Fri, 20 May 2016 16:53:35 +0000 (UTC)
commit 03592a17f1aecfad3ba3b4babf4ec00ff8415c25
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 9194786..394520c 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -3,12 +3,12 @@ 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 ChatroomManager = imports.chatroomManager;
const Connections = imports.connections;
const Lang = imports.lang;
+const LogManager = imports.logManager;
const Utils = imports.utils;
const DialogPage = {
@@ -176,16 +176,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]