Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bafd12821 | ||
|
|
6d292945b6 |
@@ -1,5 +1,11 @@
|
|||||||
|
3.1.91
|
||||||
|
======
|
||||||
|
|
||||||
|
* gajim: update for gnome-shell API changes
|
||||||
|
|
||||||
3.1.90
|
3.1.90
|
||||||
======
|
======
|
||||||
|
|
||||||
* All extensions have been ported to the new extension
|
* All extensions have been ported to the new extension
|
||||||
system (including live enable/disable)
|
system (including live enable/disable)
|
||||||
* Updated translations
|
* Updated translations
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell-extensions],[3.1.90],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
|
AC_INIT([gnome-shell-extensions],[3.1.91],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
|
||||||
|
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_AUX_DIR([config])
|
AC_CONFIG_AUX_DIR([config])
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const DBus = imports.dbus;
|
const DBus = imports.dbus;
|
||||||
const Gettext = imports.gettext.domain('gnome-shell');
|
const Gettext = imports.gettext.domain('gnome-shell');
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
@@ -55,6 +56,8 @@ function decode64(input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wrappedText(text, sender, timestamp, direction) {
|
function wrappedText(text, sender, timestamp, direction) {
|
||||||
|
if (!timestamp)
|
||||||
|
timestamp = (Date.now() / 1000);
|
||||||
return {
|
return {
|
||||||
messageType: Tp.ChannelTextMessageType.NORMAL,
|
messageType: Tp.ChannelTextMessageType.NORMAL,
|
||||||
text: text,
|
text: text,
|
||||||
@@ -81,7 +84,7 @@ Source.prototype = {
|
|||||||
this._iconUri = null;
|
this._iconUri = null;
|
||||||
this._presence = "online";
|
this._presence = "online";
|
||||||
|
|
||||||
this._notification = new TelepathyClient.Notification(this);
|
this._notification = new TelepathyClient.ChatNotification(this);
|
||||||
this._notification.setUrgency(MessageTray.Urgency.HIGH);
|
this._notification.setUrgency(MessageTray.Urgency.HIGH);
|
||||||
|
|
||||||
let jid = author.split('/')[0];
|
let jid = author.split('/')[0];
|
||||||
@@ -170,6 +173,10 @@ Source.prototype = {
|
|||||||
this.destroy();
|
this.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setChatState: function(state) {
|
||||||
|
// Gajim DBUS API doesn't support sending chatstate yet.
|
||||||
|
},
|
||||||
|
|
||||||
_messageReceived: function(emitter, data) {
|
_messageReceived: function(emitter, data) {
|
||||||
let author = data[1][0];
|
let author = data[1][0];
|
||||||
let text = data[1][1];
|
let text = data[1][1];
|
||||||
@@ -181,10 +188,11 @@ Source.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_messageSent: function(emitter, data) {
|
_messageSent: function(emitter, data) {
|
||||||
|
let recipient = data[1][0];
|
||||||
let text = data[1][1];
|
let text = data[1][1];
|
||||||
let chatstate = data[1][3];
|
let chatstate = data[1][3];
|
||||||
|
|
||||||
if (text) {
|
if (text && (recipient == this._author)) {
|
||||||
let message = wrappedText(text, this._author, null, TelepathyClient.NotificationDirection.SENT);
|
let message = wrappedText(text, this._author, null, TelepathyClient.NotificationDirection.SENT);
|
||||||
this._notification.appendMessage(message, false);
|
this._notification.appendMessage(message, false);
|
||||||
} else if (chatstate == 'gone')
|
} else if (chatstate == 'gone')
|
||||||
@@ -271,7 +279,10 @@ GajimClient.prototype = {
|
|||||||
|
|
||||||
enable: function() {
|
enable: function() {
|
||||||
this._cacheDir = GLib.get_user_cache_dir() + '/gnome-shell/gajim-avatars';
|
this._cacheDir = GLib.get_user_cache_dir() + '/gnome-shell/gajim-avatars';
|
||||||
GLib.mkdir_with_parents(this._cacheDir, 0x1c0); // 0x1c0 = octal 0700
|
let dir = Gio.file_new_for_path(this._cacheDir);
|
||||||
|
if (!dir.query_exists(null)) {
|
||||||
|
GLib.mkdir_with_parents(this._cacheDir, 0x1c0); // 0x1c0 = octal 0700
|
||||||
|
}
|
||||||
|
|
||||||
this._proxy = new Gajim(DBus.session, 'org.gajim.dbus', '/org/gajim/dbus/RemoteObject');
|
this._proxy = new Gajim(DBus.session, 'org.gajim.dbus', '/org/gajim/dbus/RemoteObject');
|
||||||
this._newMessageId = this._proxy.connect('NewMessage', Lang.bind(this, this._messageReceived));
|
this._newMessageId = this._proxy.connect('NewMessage', Lang.bind(this, this._messageReceived));
|
||||||
|
|||||||
Reference in New Issue
Block a user