Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
272c26e7 by Philipp Hörist at 2017-01-30T22:35:27+01:00
Update ChangeLog
- - - - -
1 changed file:
- ChangeLog
Changes:
=====================================
ChangeLog
=====================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,16 @@
+Gajim 0.16.7 (30 January 2017)
+
+ * Better compatibility with XEP-0191: Blocking Command
+ * Windows Credential Vault is used for password storage on Windows
+ * Gajim now depends on python-gnupg for PGP encryption
+ * Add portable installer for Windows
+ * Remove usage of demandimport
+ * Many minor bugfixes
+
Gajim 0.16.6 (02 October 2016)
* Fix using gpg2
- * Improve message receips usage
+ * Improve message receipts usage
* Improve roster filtering
* several minor bugs
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/272c26e75fcc9dcf8cef1473357d8f7bd0…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
46a19733 by aszlig at 2017-01-27T20:43:45+01:00
tests: Don't mock received_message_hashes
This fixes the following two test cases from TestChatControlSession in
test/unit/test_sessions.py:
* test_receive_1nocontrol
* test_receive_2already_has_control
The MockConnection object already defines various attributes from the
real Connection object to their corresponding types so that calling code
is able to for example iterate on dicts or lists.
Since 40a3f80aa1afc0cde885d23da28e5c2330f3583c, there exists a new
received_message_hashes attribute, which is expected to be a list but
the default Mock object doesn't define an __iter__ method.
So this leads to the following exception:
Traceback (most recent call last):
File ".../share/gajim/src/common/ged.py", line 93, in raise_event
if handler(*args, **kwargs):
File ".../share/gajim/src/common/connection_handlers.py", line 1137, in _nec_message_received
conn=self, msg_obj=obj))
File ".../share/gajim/src/common/nec.py", line 74, in push_incoming_event
if event_object.generate():
File ".../share/gajim/src/common/connection_handlers_events.py", line 1468, in generate
if self.msghash in self.conn.received_message_hashes:
TypeError: argument of type 'instance' is not iterable
Defining received_message_hashes to be a list fixes this.
Signed-off-by: aszlig <aszlig(a)redmoonstudios.org>
- - - - -
ab3b363e by Philipp Hörist at 2017-01-27T20:55:21+01:00
Merge branch 'fix-connection-mock' into 'gajim_0.16'
tests: Don't mock received_message_hashes
See merge request !47
- - - - -
1 changed file:
- test/lib/gajim_mocks.py
Changes:
=====================================
test/lib/gajim_mocks.py
=====================================
--- a/test/lib/gajim_mocks.py
+++ b/test/lib/gajim_mocks.py
@@ -24,6 +24,7 @@ class MockConnection(Mock, ConnectionHandlers):
self.blocked_groups = {}
self.sessions = {}
self.nested_group_delimiter = '::'
+ self.received_message_hashes = []
gajim.interface.instances[account] = {'infos': {}, 'disco': {},
'gc_config': {}, 'search': {}, 'sub_request': {}}
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/27618b2dbe668cc81a41e381d44462a98…
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
18a3258c by Tomasz Miąsko at 2017-01-25T17:05:49+01:00
Fix inserting a newline on shift-enter.
Return false from key-press-event to propagate event to a default
handler that will insert a newline into the entry widget.
- - - - -
ffeeb8f9 by Tomasz Miąsko at 2017-01-25T17:05:49+01:00
Simplify send or insert newline logic.
- - - - -
2e133d25 by Tomasz Miąsko at 2017-01-25T17:05:49+01:00
Fix tab switching with ctrl+page up and ctrl+page down.
- - - - -
0b7d6cc1 by Tomasz Miąsko at 2017-01-25T17:05:49+01:00
Fix moving between lines with up and down arrows.
- - - - -
b678165d by Tomasz Miąsko at 2017-01-25T18:04:12+01:00
Use the same code path for shift-enter as for ctrl-enter.
- - - - -
b1940459 by Philipp Hörist at 2017-01-26T19:17:32+01:00
Merge branch 'fix-gtk3-shortcuts' into 'master'
Fix keyboard shortcuts in GTK3
See merge request !41
- - - - -
2 changed files:
- src/chat_control_base.py
- src/message_window.py
Changes:
=====================================
src/chat_control_base.py
=====================================
--- a/src/chat_control_base.py
+++ b/src/chat_control_base.py
@@ -668,49 +668,37 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
self.scroll_messages('up', message_buffer, 'received')
else: # Ctrl+UP
self.scroll_messages('up', message_buffer, 'sent')
- return True
+ return True
elif event.keyval == Gdk.KEY_Down:
if event_state & Gdk.ModifierType.CONTROL_MASK:
if event_state & Gdk.ModifierType.SHIFT_MASK: # Ctrl+Shift+Down
self.scroll_messages('down', message_buffer, 'received')
else: # Ctrl+Down
self.scroll_messages('down', message_buffer, 'sent')
- return True
-
+ return True
elif event.keyval == Gdk.KEY_Return or \
event.keyval == Gdk.KEY_KP_Enter: # ENTER
- if event_state & Gdk.ModifierType.SHIFT_MASK:
- return True
message_textview = widget
message_buffer = message_textview.get_buffer()
start_iter, end_iter = message_buffer.get_bounds()
message = message_buffer.get_text(start_iter, end_iter, False)
xhtml = self.msg_textview.get_xhtml()
- if gajim.config.get('send_on_ctrl_enter'):
- if event_state & Gdk.ModifierType.CONTROL_MASK: # CTRL + ENTER
- send_message = True
- else:
- end_iter = message_buffer.get_end_iter()
- message_buffer.insert_at_cursor('\n')
- send_message = False
-
- else: # send on Enter, do newline on Ctrl Enter
- if event_state & Gdk.ModifierType.CONTROL_MASK: # Ctrl + ENTER
- end_iter = message_buffer.get_end_iter()
- message_buffer.insert_at_cursor('\n')
- send_message = False
- else: # ENTER
- send_message = True
-
- if gajim.connections[self.account].connected < 2 and send_message:
+ if event_state & Gdk.ModifierType.SHIFT_MASK:
+ send_message = False
+ else:
+ is_ctrl_enter = bool(event_state & Gdk.ModifierType.CONTROL_MASK)
+ send_message = is_ctrl_enter == gajim.config.get('send_on_ctrl_enter')
+
+ if send_message and gajim.connections[self.account].connected < 2:
# we are not connected
dialogs.ErrorDialog(_('A connection is not available'),
- _('Your message can not be sent until you are connected.'))
- send_message = False
+ _('Your message can not be sent until you are connected.'))
+ elif send_message:
+ self.send_message(message, xhtml=xhtml)
+ else:
+ message_buffer.insert_at_cursor('\n')
- if send_message:
- self.send_message(message, xhtml=xhtml) # send the message
return True
elif event.keyval == Gdk.KEY_z: # CTRL+z
if event_state & Gdk.ModifierType.CONTROL_MASK:
=====================================
src/message_window.py
=====================================
--- a/src/message_window.py
+++ b/src/message_window.py
@@ -401,7 +401,7 @@ class MessageWindow(object):
elif keyval in (Gdk.KEY_Page_Up, Gdk.KEY_Page_Down):
# CTRL + PageUp | PageDown
# Create event and send it to notebook
- event = Gdk.Event(Gdk.EventType.KEY_PRESS)
+ event = Gdk.Event.new(Gdk.EventType.KEY_PRESS)
event.window = self.window.get_window()
event.time = int(time.time())
event.state = Gdk.ModifierType.CONTROL_MASK
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/179777239e17ae9917051e8ab218c4d48…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
7d39b384 by Markus Böhme at 2017-01-25T10:46:31+01:00
Highlight all paragraphs of a search result in the history window
A single message may span multiple paragraphs. Highlight all lines
belonging to the paragraph containing the search keyword.
When filling the history textbuffer, tag each newline character that
is ending a message with an invisible tag. Then at search time
highlight all lines up to that tag.
- - - - -
b2e41e93 by Markus Böhme at 2017-01-25T10:48:33+01:00
Remove unnecessary code in message highlighting in the history window
The message to be highlighted is searched via an already formatted
timestamp, and the match contains the whole timestamp with any
preceding characters (like "["). Therefore, calling backward_char on
the start iterator of the match just goes back to the previous line
and is not needed.
- - - - -
27618b2d by Philipp Hörist at 2017-01-26T19:17:06+01:00
Merge branch 'gajim_0.16' into 'gajim_0.16'
History window: Highlight all paragraphs of a search result
See merge request !31
- - - - -
1 changed file:
- src/history_window.py
Changes:
=====================================
src/history_window.py
=====================================
--- a/src/history_window.py
+++ b/src/history_window.py
@@ -75,6 +75,8 @@ class HistoryWindow:
self.history_buffer = self.history_textview.tv.get_buffer()
self.history_buffer.create_tag('highlight', background = 'yellow')
self.history_buffer.create_tag('invisible', invisible=True)
+ self.eom_tag = self.history_buffer.create_tag('endofmessage',
+ invisible=True)
self.checkbutton = xml.get_object('log_history_checkbutton')
self.checkbutton.connect('toggled',
self.on_log_history_checkbutton_toggled)
@@ -515,7 +517,7 @@ class HistoryWindow:
else:
self.history_textview.print_real_text(message, name=contact_name,
xhtml=xhtml)
- self.history_textview.print_real_text('\n')
+ self.history_textview.print_real_text('\n', ['endofmessage'])
def on_query_entry_activate(self, widget):
text = self.query_entry.get_text()
@@ -624,13 +626,10 @@ class HistoryWindow:
self.calendar.select_day(day)
unix_time = model[path][C_TIME]
self._scroll_to_result(unix_time)
- #FIXME: one day do not search just for unix_time but the whole and user
- # specific format of the textbuffer line [time] nick: message
- # and highlight all that
def _scroll_to_result(self, unix_time):
"""
- Scroll to the result using unix_time and highlight line
+ Scroll to the result using unix_time and highlight message
"""
start_iter = self.history_buffer.get_start_iter()
local_time = time.localtime(float(unix_time))
@@ -641,9 +640,9 @@ class HistoryWindow:
None)
if result is not None:
match_start_iter, match_end_iter = result
- # include '[' or other character before time
- match_start_iter.backward_char()
- match_end_iter.forward_line() # highlight all message not just time
+ while not match_end_iter.has_tag(self.eom_tag):
+ if not match_end_iter.forward_to_line_end():
+ break
self.history_buffer.apply_tag_by_name('highlight', match_start_iter,
match_end_iter)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/32085e8bd7b92d37b5cab52d59b77e54f…
Yann Leboulanger pushed to branch gajim_0.16 at gajim / gajim
Commits:
32085e8b by Yann Leboulanger at 2017-01-25T14:07:14+00:00
update po files
- - - - -
4 changed files:
- po/bg.po
- po/da.po
- po/de.po
- po/el.po
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/32085e8bd7b92d37b5cab52d59b77e54f4…