Commit graph

14246 commits

Author SHA1 Message Date
Markus Böhme
d75ebd95e5 Rework message highlighting in the history window to not use timestamps
Search results in the history window to are scrolled to and highlighted
once the user clicks on one of them. Messages are searched by text in
the log database, but then looked up in the history text buffer via a
visible or invisible timestamp obtained from the database record.

Timestamps in the history text buffer, depending on user configuration,
may only have a coarse granularity. Philipp Hörist discovered that this
may lead to the highlighting of the wrong line in the history text view
and proposed an alternative solution that is implemented in this patch.

Timestamps are abolished as a means of searching messages. Instead, add
a mark with the unique message id (log line id) at the start of every
message in the history text buffer when the conversation is loaded.
After fetching the search results from the database this id can be used
to unambiguously find the corresponding message in the history text
buffer.
2017-03-02 23:55:18 +01:00
Markus Böhme
665898864f Remove dead code in logger.py method get_search_results_for_query
The method get_search_results_for_query provides a means to search via a
passed in SQL query. This feature has been unused and dead since its initial
commit back in 2005 (commit e542fff69f), so just remove it.
2017-02-22 14:55:44 +01:00
Markus Böhme
65c6a1e7e5 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.
2017-02-22 12:56:31 +01:00
Markus Böhme
d9a2251582 Highlight all paragraphs of a search result in the history window
A single message may span multiple paragraphs. Highlight all paragraphs
of a search result because a keyword could be in any of them.

Every message already has the 'eol' tag on its newline character.
Highlight from the start of a search match up to the next 'eol' tag.
2017-02-22 12:56:31 +01:00
Markus Böhme
2e026335de Simplify appending new line in history window
ConversationTextview provides an abstraction for adding text with tags.
Use it instead of directly accessing its backing text buffer.
2017-02-22 12:56:31 +01:00
Philipp Hörist
18df7163d1 Merge branch 'roster' into 'master'
Fix endless loop in various CellRenderers

See merge request !59
2017-02-19 18:10:13 +01:00
Philipp Hörist
dd3a2f3abc Fix endless loop in various CellRenderers
context.get_background_color() first calls the CellRenderer to render
the cell before giving back the color.

When we call this inside a CellRenderer, this is an endless loop
2017-02-19 18:07:06 +01:00
Philipp Hörist
4a7e54347c Merge branch 'appmenu' into 'master'
Port application menu to GMenu

See merge request !52
2017-02-13 00:52:53 +01:00
Philipp Hörist
1b2324ca97 Merge branch 'small-fixes' into 'master'
Small fixes

Closes #8542

See merge request !58
2017-02-12 19:10:55 +01:00
Philipp Hörist
09f54f97d0 Use platform identifier with better granularity
Fixes #8542
2017-02-12 19:09:49 +01:00
Philipp Hörist
50514393f5 Fix key error on removing account 2017-02-12 19:09:48 +01:00
Philipp Hörist
d24bed12ce Dont try to select iter if there is none 2017-02-12 19:09:48 +01:00
Philipp Hörist
6f8452667d Port application menu to GMenu 2017-02-12 18:17:27 +01:00
Philipp Hörist
eec1a69efd Merge branch 'history-manager' into 'master'
History manager fixes

See merge request !57
2017-02-12 16:50:28 +01:00
Philipp Hörist
2a599d1e89 Fix constants usage in history manager 2017-02-12 16:45:56 +01:00
Philipp Hörist
aaef09fc54 Remove old gtk2 code 2017-02-12 16:45:56 +01:00
Philipp Hörist
7814f07bd3 Merge branch 'master' into 'master'
Refactor Gajim startup

See merge request !56
2017-02-11 23:44:19 +01:00
Philipp Hörist
33c9a1c584 Simplify module import 2017-02-11 23:40:42 +01:00
Philipp Hörist
5789c8a870 Start Interface after remote cmdline handling
Because otherwise we would lose log information
from Interface, because logging levels are set after
startup
2017-02-11 23:31:06 +01:00
Philipp Hörist
271af70885 Update Authors 2017-02-11 21:32:13 +01:00
Philipp Hörist
5215641c05 Move GajimApplication into gajim.py 2017-02-11 21:25:43 +01:00
Philipp Hörist
2ea30b3d55 Move nbxmpp import test into do_startup 2017-02-11 21:18:10 +01:00
Yann Leboulanger
c8e03993fe Merge branch 'master' into 'master'
Use more gender neutral language

See merge request !55
2017-02-11 21:16:26 +01:00
Philipp Hörist
4bf65a4039 Handle version option in Gtk.Application 2017-02-11 21:09:31 +01:00
Philipp Hörist
f9269d5ce0 Save log file into config dir when frozen 2017-02-11 21:07:11 +01:00
Johannes 'josch' Schauer
f5eb35cba3 Use more gender neutral language 2017-02-11 20:05:30 +01:00
Philipp Hörist
e30527f8ce Move Gajim startup code into do_startup 2017-02-11 19:38:45 +01:00
Philipp Hörist
819bee1253 Handle some commandline options only locally 2017-02-11 18:08:52 +01:00
Philipp Hörist
26aa0382d3 Merge branch 'pylint' into 'master'
Add a pylint configuration file and fix a few of the issues found

See merge request !54
2017-02-11 17:54:19 +01:00
Emmanuel Gil Peyrot
a4387e8489 Use “… is not …” everywhere instead of “not … is …”. 2017-02-11 02:40:10 +00:00
Emmanuel Gil Peyrot
eb51184a95 Fix a few things in common.connection_handlers_events. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
ad9370afa8 Fix a bunch of issues in common.jingle*. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
57fb80f1fa Remove every default argument using [] or {}. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
1f9ac730ce Replace long() in remaining python2 code with int(). 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
381a8f2be8 Remove unnecessary semicolons. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
a7349dc603 common.connection: Fix indentation. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot
2fbadc91e9 Use Enum or IntEnum instead of range() constants. 2017-02-11 02:40:07 +00:00
Philipp Hörist
d6ceca8344 Merge branch 'keypress' into 'master'
Close Windows with ESC Key

See merge request !53
2017-02-09 20:19:20 +01:00
Emmanuel Gil Peyrot
b6b1a7a074 ACE: Remove unused constants. 2017-02-08 02:26:21 +00:00
Emmanuel Gil Peyrot
fb221a692b Remove wrong usage of the list(range(…)) pattern. 2017-02-08 02:26:21 +00:00
Emmanuel Gil Peyrot
5f91455fb9 common.dh: Reformat to follow PEP-0008. 2017-02-08 02:26:20 +00:00
Emmanuel Gil Peyrot
289d82fae7 Remove unused imports. 2017-02-08 02:26:20 +00:00
Emmanuel Gil Peyrot
07716daec2 Use staticmethod decorator where it makes sense. 2017-02-08 02:26:20 +00:00
Emmanuel Gil Peyrot
51eb62bb73 Replace some wildcard imports with explicit ones. 2017-02-07 21:00:52 +00:00
Emmanuel Gil Peyrot
e2901f09f6 pylint: Tweak the configuration file a bit. 2017-02-07 21:00:43 +00:00
Emmanuel Gil Peyrot
b8c928c2ec Autogenerate a pylint configuration file. 2017-02-07 21:00:31 +00:00
Philipp Hörist
1ad087e577 Close Plugins Window with ESC 2017-02-06 23:21:04 +01:00
Philipp Hörist
fa54237164 Close Privacy Lists Window with ESC 2017-02-06 23:19:07 +01:00
Philipp Hörist
ad936b8df8 Close XML Console Window with ESC 2017-02-06 23:12:31 +01:00
Philipp Hörist
5dff9bb057 Close Archiving Preferences Window with ESC 2017-02-06 23:10:09 +01:00