Commit Graph

165 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 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
Emmanuel Gil Peyrot 381a8f2be8 Remove unnecessary semicolons. 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
Tomasz Miąsko 0dce40bb57 Fix history scrolling in gtk3 #8481.
* Delay scrolling using GLib.idle_add. According to the GTK
  documentation the scroll_to_mark should be doing this internally
  already, but it is not the case.

* Center highlighted message vertically.
2017-01-24 15:29:15 +01:00
Emmanuel Gil Peyrot 0e929b7777 Add forgotten import dialogs in history_window. 2016-11-05 15:22:59 +00:00
tmolitor 86345055cc Added ability to read additional_data from history db and use it in gui extension point print_special_text.
I also found an iterator reuse in common/logger.py, maybe this fixes bug #8277
2016-09-05 03:25:37 +02:00
Yann Leboulanger e585c579cb print timestamp as invisible in history window when we don't want to see it so we can search for it. See #3939 2016-04-17 20:31:19 +02:00
Yann Leboulanger bc4a4a06e2 ability to retrieve PM logs in history window when typing room_jid. Autocompletion can now complete to room_jid/nicks. Fixes #7670 2016-04-04 22:51:47 +02:00
Denis Fomin 4b33634a0b Copyright 2013>2014 2014-01-02 12:33:54 +04:00
Yann Leboulanger 137ae2b54a GObject -> GLib 2013-07-29 18:35:49 +02:00
Yann Leboulanger 9c8c1de03f update my copyright 2013-04-05 21:35:39 +02:00
Yann Leboulanger ef1d89bb95 ability to hide / show status changes in history window. Fixes #7255 2013-02-21 19:47:30 +01:00
Yann Leboulanger d07c423b30 fix error when opening history window 2013-01-20 22:50:04 +01:00
Denis Fomin 1927c13028 prevent tracebacks in history window 2013-01-08 19:58:06 +04:00
Denis Fomin 402e1e241d fix newline in history textview and timestamp in conversation textview 2013-01-08 13:22:33 +04:00
Yann Leboulanger 80fcd4d577 fix history window 2013-01-03 23:30:17 +01:00
Yann Leboulanger d27591076f fix exception handling 2013-01-01 23:18:36 +01:00
Yann Leboulanger 414e349345 python uses unicode internally 2013-01-01 19:44:25 +01:00
Yann Leboulanger 8f71d9f219 start porting Gajim to gobject introspection and GTK3 2012-12-23 16:23:43 +01:00
Yann Leboulanger ff87483b32 correctly select result row in history window. Fixes #3939 2012-04-18 10:36:39 +02:00
Yann Leboulanger b846ac8793 save config regulary when we change an option. 2012-04-18 10:15:53 +02:00
Yann Leboulanger 3a3f99d618 upgrade copyright 2012-01-11 22:20:34 +01:00
Denis Fomin 783cf55ba7 optimize history search. Fixes #6997 2011-12-18 21:28:47 +04:00
Yann Leboulanger ff0c0dc1c5 ability to save xhtml messages. Fixes #5736 2011-05-30 19:47:05 +02:00
Yann Leboulanger 87d430d726 don't go before 1/1/1900 in history window. Fixes #5684 2010-04-02 09:21:56 +02:00
Yann Leboulanger 2be53c4aac update my copyright to 2010 2010-03-11 16:52:36 +01:00
Éric Araujo 357d7db07d fixed some whitespace thanks to 2to3 -f ws_comma 2010-02-10 19:24:11 +01:00
Éric Araujo fedd7dc8e2 convert tabs to spaces in source code thanks to reindent.py
holy diff batman!
2010-02-08 15:08:40 +01:00
Yann Leboulanger ac535f708c fix history window usage. Fixes #5571 2010-01-23 13:03:44 +01:00
Yann Leboulanger 956accf010 Bye bye glade, Hi gtk builder. Fixes #4945 2010-01-22 19:57:59 +01:00
Alexander Cherniuk a23961fbf6 Big portion of doc-string refactoring 2009-11-25 22:59:43 +02:00
Yann Leboulanger c59f4f7d73 show incoming and outgoing style in history window too. Fixes #5321 2009-10-14 08:40:28 +02:00
Yann Leboulanger 4723194bca show message subject in chat history. Fixes #5185 2009-10-05 14:25:47 +02:00
Yann Leboulanger 893e6bcfd6 Don't show errors as status change in history viewer. Fixes #2881 2009-08-30 23:20:13 +02:00
Yann Leboulanger a562bfdcb6 [punchagan & me] print /me in history correctly. Fixes #4852 2009-04-08 07:31:56 +00:00
Yann Leboulanger d8c9aa0c5a make widgets insensitive in history window where there is no jid selected. Fixes #4553 2008-12-05 10:38:44 +00:00
Yann Leboulanger e389e0b16b [thorstenp] remove whitespace at eol 2008-12-03 21:56:12 +00:00
Yann Leboulanger c163e90b10 [thorstenp] fix unused variables 2008-12-02 15:53:23 +00:00
js 2c7c345a7c [kaylan] Remember size and position of history window. Closes #2824. 2008-11-23 19:17:58 +00:00
Yann Leboulanger 1078112473 prevent a traceback with completion. Fixes #4461 2008-11-09 21:40:14 +00:00
Yann Leboulanger b68a7a944b fix missing import 2008-11-07 21:47:26 +00:00
Yann Leboulanger 540fba2aaa prevent some disk write error and show error dialog. 2008-11-06 08:10:36 +00:00
Yann Leboulanger 06ab4a7b6d revert thorstenp patches for now. They introduce bugs. 2008-10-20 21:38:06 +00:00
Yann Leboulanger f801a50260 [thorstenp] fix unused variables 2008-10-20 21:17:48 +00:00
Yann Leboulanger 9d7c80d522 [thorstenp] replace has_key by key in dict. Fixes #4392 2008-10-07 20:41:59 +00:00
Yann Leboulanger fc8d21fd5e fix traceback when changing month/year in history window with no selected jid. Fixes #4240 2008-08-26 10:55:18 +00:00
Julien Pivotto de4a23e751 See #4200.
* remove js from some headers
 * set coding:utf-8 to allow real names in headers
2008-08-15 17:31:51 +00:00