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
28fe6a06
Commit
28fe6a06
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
less columns in history. TODO: fill name for not groupchat
parent
40f3316b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/logger.py
+1
-1
1 addition, 1 deletion
src/common/logger.py
src/history_window.py
+9
-19
9 additions, 19 deletions
src/history_window.py
with
10 additions
and
20 deletions
src/common/logger.py
+
1
−
1
View file @
28fe6a06
...
...
@@ -336,7 +336,7 @@ class Logger:
else
:
# user just typed something, we search in message column
like_sql
=
'
%
'
+
query
+
'
%
'
cur
.
execute
(
'''
SELECT contact_name, time, kind, show, message FROM logs
SELECT contact_name, time, kind, show, message
, subject
FROM logs
WHERE jid_id = ? AND message LIKE ?
ORDER BY time
'''
,
(
jid_id
,
like_sql
))
...
...
This diff is collapsed.
Click to expand it.
src/history_window.py
+
9
−
19
View file @
28fe6a06
...
...
@@ -45,10 +45,8 @@ GTKGUI_GLADE = 'gtkgui.glade'
(
C_CONTACT_NAME
,
C_TIME
,
C_KIND
,
C_SHOW
,
C_MESSAGE
)
=
range
(
5
)
)
=
range
(
3
)
class
HistoryWindow
:
'''
Class for browsing logs of conversations with contacts
'''
...
...
@@ -66,8 +64,8 @@ class HistoryWindow:
self
.
query_entry
=
xml
.
get_widget
(
'
query_entry
'
)
self
.
expander_vbox
=
xml
.
get_widget
(
'
expander_vbox
'
)
self
.
results_treeview
=
xml
.
get_widget
(
'
results_treeview
'
)
# contact_name, time,
kind, show,
message
model
=
gtk
.
ListStore
(
str
,
str
,
str
,
str
,
str
)
# contact_name, time, message
model
=
gtk
.
ListStore
(
str
,
str
,
str
)
self
.
results_treeview
.
set_model
(
model
)
col
=
gtk
.
TreeViewColumn
(
_
(
'
Name
'
))
...
...
@@ -82,18 +80,6 @@ class HistoryWindow:
col
.
pack_start
(
renderer
)
col
.
set_attributes
(
renderer
,
text
=
C_TIME
)
col
=
gtk
.
TreeViewColumn
(
_
(
'
Kind
'
))
self
.
results_treeview
.
append_column
(
col
)
renderer
=
gtk
.
CellRendererText
()
col
.
pack_start
(
renderer
)
col
.
set_attributes
(
renderer
,
text
=
C_KIND
)
col
=
gtk
.
TreeViewColumn
(
_
(
'
Status
'
))
self
.
results_treeview
.
append_column
(
col
)
renderer
=
gtk
.
CellRendererText
()
col
.
pack_start
(
renderer
)
col
.
set_attributes
(
renderer
,
text
=
C_SHOW
)
col
=
gtk
.
TreeViewColumn
(
_
(
'
Message
'
))
self
.
results_treeview
.
append_column
(
col
)
renderer
=
gtk
.
CellRendererText
()
...
...
@@ -303,12 +289,16 @@ class HistoryWindow:
model
.
clear
()
if
text
==
''
:
return
# contact_name, time, kind, show, message
# 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?
for
row
in
results
:
local_time
=
time
.
localtime
(
row
[
1
])
tim
=
time
.
strftime
(
'
%x
'
,
local_time
)
iter
=
model
.
append
((
row
[
0
],
tim
,
row
[
2
],
row
[
3
],
row
[
4
]))
iter
=
model
.
append
((
row
[
0
],
tim
,
row
[
4
]))
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