Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weblate
gajim
Commits
56f535da
Commit
56f535da
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
in history search results now name column is filled even if we are in normal chat
parent
af242e38
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/history_window.py
+20
-7
20 additions, 7 deletions
src/history_window.py
with
20 additions
and
7 deletions
src/history_window.py
+
20
−
7
View file @
56f535da
...
...
@@ -321,15 +321,28 @@ class HistoryWindow:
return
# contact_name, time, kind, show, message, subject
results
=
gajim
.
logger
.
get_search_results_for_query
(
self
.
jid
,
text
)
#FIXME: investigate on kind and put name for normal chatting
#and add "subject: | message: " in message column is kind is
# single*
# also do we need show at all?
#FIXME:
# add "subject: | message: " in message column if kind is single
# also do we need show at all? (we do not search on subject)
for
row
in
results
:
local_time
=
time
.
localtime
(
row
[
1
])
tim
=
time
.
strftime
(
'
%x
'
,
local_time
)
contact_name
=
row
[
0
]
if
not
contact_name
:
kind
=
row
[
2
]
if
kind
==
constants
.
KIND_CHAT_MSG_SENT
:
# it's us! :)
contact_name
=
gajim
.
nicks
[
self
.
account
]
else
:
if
self
.
account
and
gajim
.
contacts
[
self
.
account
].
has_key
(
self
.
jid
):
contact
=
gajim
.
get_first_contact_instance_from_jid
(
self
.
account
,
self
.
jid
)
contact_name
=
contact
.
name
else
:
contact_name
=
self
.
jid
tim
=
row
[
1
]
message
=
row
[
4
]
local_time
=
time
.
localtime
(
tim
)
date
=
time
.
strftime
(
'
%x
'
,
local_time
)
# name, date, message, time (full unix time)
model
.
append
((
row
[
0
],
tim
,
row
[
4
],
row
[
1
]
))
model
.
append
((
contact_name
,
date
,
message
,
tim
))
def
on_results_treeview_row_activated
(
self
,
widget
,
path
,
column
):
'''
a row was double clicked, get date from row, and select it in calendar
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment