Philipp Hörist pushed to branch master at gajim / gajim
Commits:
d9ab39b0 by Markus Böhme at 2017-03-25T18:58:35+01:00
Fix loading of additional_data column from log database
Currently, the additional_data column is not correctly loaded from the
log database in the logger module's methods get_last_conversation_lines
and get_conversation_for_date. While the JSON data in the column is
parsed, the parsed value is not saved, because the code assumes that
changes to a loop variable are reflected in the list that is iterated
over. Instead, the unparsed JSON string is returned. Fix this by building
a separate list with the JSON string replaced by the parsed JSON object.
- - - - -
6b34ea95 by Philipp Hörist at 2017-03-25T22:19:29+01:00
Merge branch 'fix-additional_data-loading' into 'master'
Fix loading of additional_data column from log database
See merge request !72
- - - - -
1 changed file:
- src/common/logger.py
Changes:
=====================================
src/common/logger.py
=====================================
--- a/src/common/logger.py
+++ b/src/common/logger.py
@@ -609,13 +609,16 @@ class Logger:
restore_how_many_rows, pending_how_many), jid_tuple)
results = self.cur.fetchall()
+ messages = []
for entry in results:
- entry = list(entry)
- entry[4] = json.loads(entry[4])
+ additional_data = json.loads(entry[4])
+ parsed_entry = entry[:4] + (additional_data, ) + entry[5:]
+ messages.append(parsed_entry)
except sqlite.DatabaseError:
raise exceptions.DatabaseMalformed
- results.reverse()
- return results
+
+ messages.reverse()
+ return messages
def get_unix_time_from_date(self, year, month, day):
# year (fe 2005), month (fe 11), day (fe 25)
@@ -655,10 +658,13 @@ class Logger:
''' % (where_sql, start_of_day, last_second_of_day), jid_tuple)
results = self.cur.fetchall()
+ messages = []
for entry in results:
- entry = list(entry)
- entry[6] = json.loads(entry[6])
- return results
+ additional_data = json.loads(entry[6])
+ parsed_entry = entry[:6] + (additional_data, ) + entry[7:]
+ messages.append(parsed_entry)
+
+ return messages
def get_search_results_for_query(self, jid, query, account, year=False,
month=False, day=False):
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/fbb19c5c505a6082e3de54cf80e2c6426…
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c8e990f8 by Markus Böhme at 2017-03-25T14:24:30+01:00
Do not close chat window on ESC key when roster filtering is active
When the roster window active it can be filtered by starting to type.
If the window behavior "single window for everything" is selected,
trying to abort the filtering by pressing the ESC key also closes a chat
window. Fix this behavior by stopping event propagation in case the ESC
key is pressed while roster filtering is active.
Fixes issue #8548.
- - - - -
fbb19c5c by Philipp Hörist at 2017-03-25T17:23:51+01:00
Merge branch 'issue-8548-master' into 'master'
Fix issue #8548 on master: Do not close chat window on ESC key when roster filtering is active
Closes #8548
See merge request !74
- - - - -
1 changed file:
- src/roster_window.py
Changes:
=====================================
src/roster_window.py
=====================================
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -3805,7 +3805,7 @@ class RosterWindow:
if event.keyval == Gdk.KEY_Escape:
if self.rfilter_enabled:
self.disable_rfilter()
- return
+ return True
if gajim.interface.msg_win_mgr.mode == \
MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER and \
gajim.interface.msg_win_mgr.one_window_opened():
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/ba0408855c3538d053fcace1d3f6cc17c…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
b31e1b6a by Markus Böhme at 2017-03-25T14:31:48+01:00
Do not close chat window on ESC key when roster filtering is active
When the roster window active it can be filtered by starting to type.
If the window behavior "single window for everything" is selected,
trying to abort the filtering by pressing the ESC key also closes a chat
window. Fix this behavior by stopping event propagation in case the ESC
key is pressed while roster filtering is active.
Fixes issue #8548.
- - - - -
051234f2 by Philipp Hörist at 2017-03-25T17:22:55+01:00
Merge branch 'issue-8548-gajim_0.16' into 'gajim_0.16'
Fix issue #8548 on gajim_0.16: Do not close chat window on ESC key when roster filtering is active
See merge request !73
- - - - -
1 changed file:
- src/roster_window.py
Changes:
=====================================
src/roster_window.py
=====================================
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -4059,7 +4059,7 @@ class RosterWindow:
if event.keyval == gtk.keysyms.Escape:
if self.rfilter_enabled:
self.disable_rfilter()
- return
+ return True
if gajim.interface.msg_win_mgr.mode == \
MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER and \
gajim.interface.msg_win_mgr.one_window_opened():
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/bdb22b9aea83123edde9c3a849f863c90…
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ba040885 by Philipp Hörist at 2017-03-24T23:35:08+01:00
Fix regression from ad9370af
- - - - -
1 changed file:
- src/common/jingle_content.py
Changes:
=====================================
src/common/jingle_content.py
=====================================
--- a/src/common/jingle_content.py
+++ b/src/common/jingle_content.py
@@ -202,7 +202,7 @@ class JingleContent:
# if the file is less than 10 mb, then it is small
# lets calculate it right away
if self.file_props.size < 10000000 and not self.file_props.hash_:
- hash_data = content._compute_hash()
+ hash_data = self._compute_hash()
if hash_data:
file_tag.addChild(node=hash_data)
pjid = gajim.get_jid_without_resource(self.session.peerjid)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/ba0408855c3538d053fcace1d3f6cc17c4…
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
142f2214 by Philipp Hörist at 2017-03-14T22:17:16+01:00
Dont notify on own sent carbon copies
- - - - -
4966b4bf by Philipp Hörist at 2017-03-14T22:17:48+01:00
Remove notifications on receiving own sent carbon copies
Notifications for a JID are removed when we see activity
in the form of a sent carbon copie from one of our other devices.
If we receive such carbon copies we can conclude that the message
we received earlier was answered from one of our other devices.
- - - - -
1 changed file:
- src/session.py
Changes:
=====================================
src/session.py
=====================================
--- a/src/session.py
+++ b/src/session.py
@@ -244,16 +244,21 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
event_type = 'single_message_received'
if self.control and obj.mtype != 'normal':
+ # We have a ChatControl open
obj.show_in_roster = False
obj.show_in_systray = False
+ elif obj.forwarded and obj.sent:
+ # Its a Carbon Copied Message we sent
+ obj.show_in_roster = False
+ obj.show_in_systray = False
+ gajim.events.remove_events(self.conn.name, fjid, types=['chat'])
else:
+ # Everything else
obj.show_in_roster = notify.get_show_in_roster(event_type,
self.conn.name, contact, self)
obj.show_in_systray = notify.get_show_in_systray(event_type,
self.conn.name, contact)
- if (not self.control and obj.mtype != 'normal') or \
- (obj.mtype == 'normal' and not obj.popup):
event = event_t(obj.msgtxt, obj.subject, obj.mtype, obj.timestamp,
obj.encrypted, obj.resource, obj.msg_log_id,
correct_id=(obj.id_, obj.correct_id), xhtml=obj.xhtml,
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/69022ab100dc65839c1d9f1e920fe1cdb…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
88314abf by Philipp Hörist at 2017-03-14T20:12:49+01:00
Dont notify on own sent carbon copies
- - - - -
e1575344 by Philipp Hörist at 2017-03-14T20:27:36+01:00
Remove notifications on receiving own sent carbon copies
Notifications for a JID are removed when we see activity
in the form of a sent carbon copie from one of our other devices.
If we receive such carbon copies we can conclude that the message
we received earlier was answered from one of our other devices.
- - - - -
bdb22b9a by Philipp Hörist at 2017-03-14T20:32:03+01:00
Merge branch 'gajim_0.16' into 'gajim_0.16'
Notification improvements
See merge request !67
- - - - -
1 changed file:
- src/session.py
Changes:
=====================================
src/session.py
=====================================
--- a/src/session.py
+++ b/src/session.py
@@ -244,16 +244,21 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
event_type = 'single_message_received'
if self.control and obj.mtype != 'normal':
+ # We have a ChatControl open
obj.show_in_roster = False
obj.show_in_systray = False
+ elif obj.forwarded and obj.sent:
+ # Its a Carbon Copied Message we sent
+ obj.show_in_roster = False
+ obj.show_in_systray = False
+ gajim.events.remove_events(self.conn.name, fjid, types=['chat'])
else:
+ # Everything else
obj.show_in_roster = notify.get_show_in_roster(event_type,
self.conn.name, contact, self)
obj.show_in_systray = notify.get_show_in_systray(event_type,
self.conn.name, contact)
- if (not self.control and obj.mtype != 'normal') or \
- (obj.mtype == 'normal' and not obj.popup):
event = event_t(obj.msgtxt, obj.subject, obj.mtype, obj.timestamp,
obj.encrypted, obj.resource, obj.msg_log_id,
correct_id=(obj.id_, obj.correct_id), xhtml=obj.xhtml,
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/d603a30f3a06319d5eecfb983615b50b6…