Commit 072e74b2 authored by Martin's avatar Martin

Imported Upstream version 1.0.0-alpha2

parent 4328f1a2
Gajim 0.98.2 (17 December 2017)
* Fix DB migration
Gajim 0.98.1 (15 December 2017)
* Ported to GTK3 / Python3
......
import subprocess
__version__ = "0.98.1"
__version__ = "0.98.2"
try:
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
......
......@@ -73,9 +73,8 @@ def create_log_db():
show INTEGER,
message TEXT,
subject TEXT,
additional_data TEXT DEFAULT '{}',
additional_data TEXT,
stanza_id TEXT,
mam_id TEXT,
encryption TEXT,
encryption_state TEXT,
marker INTEGER
......
......@@ -1523,8 +1523,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.connection.send(' ')
def _on_xmpp_ping_answer(self, iq_obj):
id_ = iq_obj.getAttr('id')
assert id_ == self.awaiting_xmpp_ping_id
self.awaiting_xmpp_ping_id = None
def sendPing(self, pingTo=None, control=None):
......
......@@ -1062,7 +1062,7 @@ class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
def generate(self):
archive_jid = self.stanza.getFrom()
own_jid = self.conn.get_own_jid().getStripped()
own_jid = self.conn.get_own_jid()
if archive_jid and not archive_jid.bareMatch(own_jid):
# MAM Message not from our Archive
return False
......@@ -1076,7 +1076,8 @@ class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
self.unique_id, origin_id = self.get_unique_id()
# Check for duplicates
if app.logger.find_stanza_id(own_jid, self.unique_id, origin_id):
if app.logger.find_stanza_id(own_jid.getStripped(),
self.unique_id, origin_id):
return
self.msgtxt = self.msg_.getTagData('body')
......
......@@ -247,6 +247,8 @@ class OptionsParser:
self.update_config_to_016111()
if old < [0, 16, 11, 2] and new >= [0, 16, 11, 2]:
self.update_config_to_016112()
if old < [0, 98, 2] and new >= [0, 98, 2]:
self.update_config_to_0982()
app.logger.init_vars()
app.logger.attach_cache_database()
......@@ -869,14 +871,13 @@ class OptionsParser:
self.call_sql(logger.LOG_DB_PATH,
'''ALTER TABLE logs
ADD COLUMN 'additinal_data' TEXT default '()';'''
ADD COLUMN 'additional_data' TEXT;'''
)
app.config.set('version', '0.16.10.2')
def update_config_to_016103(self):
self.call_sql(logger.LOG_DB_PATH,
'''ALTER TABLE logs ADD COLUMN 'stanza_id' TEXT;
ALTER TABLE logs ADD COLUMN 'mam_id' TEXT;
ALTER TABLE logs ADD COLUMN 'encryption' TEXT;
ALTER TABLE logs ADD COLUMN 'encryption_state' TEXT;
ALTER TABLE logs ADD COLUMN 'marker' INTEGER;
......@@ -909,7 +910,17 @@ class OptionsParser:
oldest_mam_timestamp TEXT,
last_muc_timestamp TEXT
);
ALTER TABLE logs ADD COLUMN 'account_jid' INTEGER;
ALTER TABLE logs ADD COLUMN 'account_id' INTEGER;
'''
)
app.config.set('version', '0.16.11.2')
def update_config_to_0982(self):
# This fixes a typo in update_config_to_016112()
self.call_sql(logger.LOG_DB_PATH,
'''
ALTER TABLE logs ADD COLUMN 'account_id' INTEGER;
ALTER TABLE logs ADD COLUMN 'additional_data' TEXT;
'''
)
app.config.set('version', '0.98.2')
......@@ -54,6 +54,7 @@ from gajim.common import logging_helpers
from gajim.common import crypto
MIN_NBXMPP_VER = "0.6.1"
MIN_GTK_VER = "3.20.0"
class GajimApplication(Gtk.Application):
......@@ -121,6 +122,14 @@ class GajimApplication(Gtk.Application):
'Quitting...' % MIN_NBXMPP_VER)
sys.exit(1)
gtk_ver = '%s.%s.%s' % (Gtk.get_major_version(),
Gtk.get_minor_version(),
Gtk.get_micro_version())
if V(gtk_ver) < V(MIN_GTK_VER):
print('Gajim needs GTK+ >= %s to run. '
'Quitting...' % MIN_GTK_VER)
sys.exit(1)
# Create and initialize Application Paths & Databases
from gajim.common import configpaths
configpaths.gajimpaths.init(
......
......@@ -263,7 +263,7 @@ class Interface:
if account in self.show_vcard_when_connect and obj.show not in (
'offline', 'error'):
self.edit_own_details(account)
self.show_vcard_when_connect.remove(self.name)
self.show_vcard_when_connect.remove(account)
def edit_own_details(self, account):
jid = app.get_jid_from_account(account)
......@@ -1109,6 +1109,9 @@ class Interface:
"""
# ('SIGNED_IN', account, ())
# block signed in notifications for 30 seconds
# Add our own JID into the DB
app.logger.insert_jid(obj.conn.get_own_jid().getStripped())
account = obj.conn.name
app.block_signed_in_notifications[account] = True
state = self.sleeper.getState()
......
......@@ -2828,7 +2828,7 @@ class RosterWindow:
sectext = _('You will no longer be able to send and receive '
'messages to contacts from these transports: %s') % jids
dialogs.ConfirmationDialog(pritext, sectext,
on_response_ok = (remove, list_))
on_response_ok = (remove, list_), transient_for=self.window)
def _nec_blocking(self, obj):
if obj.unblock_all or obj.blocklist:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment