[polari] Fix user times passed to channel requests
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] Fix user times passed to channel requests
- Date: Thu, 8 Aug 2013 13:12:23 +0000 (UTC)
commit f7ec2a774eaa0430cbb840499e3f2cf3b022afe6
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 27 03:12:17 2013 +0200
Fix user times passed to channel requests
Uhm, tp-glib actually uses a different constant to represent the
current event time, so using the Gdk constant doesn't work. Neither
does the tp-glib constant, because it's a define. And different from
the documented value. Sigh.
src/ircParser.js | 8 +++++---
src/joinDialog.js | 5 +++--
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/ircParser.js b/src/ircParser.js
index 92eb669..615d7ae 100644
--- a/src/ircParser.js
+++ b/src/ircParser.js
@@ -1,4 +1,4 @@
-const Gdk = imports.gi.Gdk;
+const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Pango = imports.gi.Pango;
const Tp = imports.gi.TelepathyGLib;
@@ -10,6 +10,8 @@ const Signals = imports.signals;
const _ = imports.gettext.gettext;
+const TP_CURRENT_TIME = GLib.MAXUINT32;
+
const knownCommands = {
/* commands that would be nice to support: */
/*
@@ -126,7 +128,7 @@ const IrcParser = new Lang.Class({
if (argv.length)
log('Excess arguments to JOIN command: ' + argv);
- let time = Gdk.CURRENT_TIME;
+ let time = TP_CURRENT_TIME;
let account = this._room.channel.connection.get_account();
let req = Tp.AccountChannelRequest.new_text(account, time);
@@ -229,7 +231,7 @@ const IrcParser = new Lang.Class({
break;
}
- let time = Gdk.CURRENT_TIME;
+ let time = TP_CURRENT_TIME;
let account = this._room.channel.connection.get_account();
let req = Tp.AccountChannelRequest.new_text(account, time);
let preferredHandler = Tp.CLIENT_BUS_NAME_BASE + 'Polari';
diff --git a/src/joinDialog.js b/src/joinDialog.js
index 1bf908e..5c3a266 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -1,4 +1,3 @@
-const Gdk = imports.gi.Gdk;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Tp = imports.gi.TelepathyGLib;
@@ -11,6 +10,8 @@ const MAX_RETRIES = 3;
const TP_ERROR_PREFIX = 'org.freedesktop.Telepathy.Error.'
const TP_ERROR_ALREADY_CONNECTED = TP_ERROR_PREFIX + 'AlreadyConnected';
+const TP_CURRENT_TIME = GLib.MAXUINT32;
+
const JoinDialog = new Lang.Class({
Name: 'JoinDialog',
@@ -81,7 +82,7 @@ const JoinDialog = new Lang.Class({
_ensureChannel: function() {
let account = this._requestData.account;
- let req = Tp.AccountChannelRequest.new_text(account, Gdk.CURRENT_TIME);
+ let req = Tp.AccountChannelRequest.new_text(account, TP_CURRENT_TIME);
req.set_target_id(Tp.HandleType.ROOM, this._requestData.target);
req.set_delegate_to_preferred_handler(true);
let preferredHandler = Tp.CLIENT_BUS_NAME_BASE + 'Polari';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]