[polari/wip/fmuellner/combined-gsoc: 2/103] sample tracker queries
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 2/103] sample tracker queries
- Date: Fri, 22 Jul 2016 13:34:08 +0000 (UTC)
commit 2dff08bf11e767e7f8de593fa3ebbcf946226523
Author: Kunaal Jain <kunaalus gmail com>
Date: Thu Jun 9 02:02:36 2016 +0530
sample tracker queries
src/mainWindow.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 27d5f89..f0b32e3 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -8,6 +8,7 @@ const Tp = imports.gi.TelepathyGLib;
const AccountsMonitor = imports.accountsMonitor;
const AppNotifications = imports.appNotifications;
const ChatroomManager = imports.chatroomManager;
+const LogManager = imports.logManager;
const JoinDialog = imports.joinDialog;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
@@ -219,6 +220,14 @@ const MainWindow = new Lang.Class({
GObject.BindingFlags.SYNC_CREATE |
GObject.BindingFlags.BIDIRECTIONAL);
this._search_bar.connect_entry(this._search_entry);
+
+ //test
+ let logManager = LogManager.getDefault();
+ let query = "select ?text as ?mms where { ?msg a nmo:IMMessage; nie:plainTextContent ?text. ?msg
nmo:communicationChannel ?channel. ?channel nie:title '#tracker'. ?msg nmo:from ?contact. ?contact
nco:nickname 'bijan' . ?msg fts:match 'wonderful' }"
+ let query1 = "select ?nick as ?name ?text as ?mms where { ?msg a nmo:IMMessage; nie:plainTextContent
?text. ?msg nmo:communicationChannel ?channel. ?channel nie:title '#tracker'. ?msg nmo:from ?contact.
?contact nco:nickname ?nick }"
+ logManager.query(query1,null,Lang.bind(this, this._Log));
+ log("hello");
+ //test
// search end
let size = this._settings.get_value('window-size').deep_unpack();
@@ -231,6 +240,12 @@ const MainWindow = new Lang.Class({
this.show_all();
},
+ _Log: function(events) {
+ log(events);
+ for (let i = 0; i < events.length; i++)
+ log(events[i].mms);
+ },
+
get subtitle() {
return this._subtitle;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]