[polari/wip/fmuellner/combined-gsoc: 6/136] joinDialog: Replace TpLogger with tracker
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 6/136] joinDialog: Replace TpLogger with tracker
- Date: Tue, 26 Jul 2016 23:16:29 +0000 (UTC)
commit 09195ae97b490b8fe0fe9fd8a350d86f6e225a7e
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]