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
982db963
Commit
982db963
authored
15 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
add 2 advanced option to configure how many log lines we want when entering a room. Fixes #5237
parent
062add13
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/config.py
+2
-0
2 additions, 0 deletions
src/common/config.py
src/common/connection.py
+10
-0
10 additions, 0 deletions
src/common/connection.py
with
12 additions
and
0 deletions
src/common/config.py
+
2
−
0
View file @
982db963
...
...
@@ -160,6 +160,8 @@ class Config:
'
change_roster_title
'
:
[
opt_bool
,
True
,
_
(
'
Add * and [n] in roster title?
'
)],
'
restore_lines
'
:
[
opt_int
,
4
,
_
(
'
How many lines to remember from previous conversation when a chat tab/window is reopened.
'
)],
'
restore_timeout
'
:
[
opt_int
,
60
,
_
(
'
How many minutes should last lines from previous conversation last.
'
)],
'
muc_restore_lines
'
:
[
opt_int
,
20
,
_
(
'
How many lines to request to server when entering a groupchat.
'
)],
'
muc_restore_timeout
'
:
[
opt_int
,
60
,
_
(
'
How many minutes back to request logs when a entering a groupchat.
'
)],
'
send_on_ctrl_enter
'
:
[
opt_bool
,
False
,
_
(
'
Send message on Ctrl+Enter and with Enter make new line (Mirabilis ICQ Client default behaviour).
'
)],
'
show_roster_on_startup
'
:
[
opt_bool
,
True
],
'
key_up_lines
'
:
[
opt_int
,
25
,
_
(
'
How many lines to store for Ctrl+KeyUP.
'
)],
...
...
This diff is collapsed.
Click to expand it.
src/common/connection.py
+
10
−
0
View file @
982db963
...
...
@@ -1746,6 +1746,16 @@ class Connection(ConnectionHandlers):
self
.
add_lang
(
p
)
if
not
change_nick
:
t
=
p
.
setTag
(
common
.
xmpp
.
NS_MUC
+
'
x
'
)
last_date
=
gajim
.
logger
.
get_last_date_that_has_logs
(
room_jid
,
self
.
name
,
is_room
=
True
)
if
last_date
is
None
:
last_date
=
time
.
time
()
-
gajim
.
config
.
get
(
'
muc_restore_timeout
'
)
*
60
else
:
last_time
=
min
(
last_date
,
time
.
time
()
-
gajim
.
config
.
get
(
'
muc_restore_timeout
'
)
*
60
)
last_date
=
time
.
strftime
(
'
%Y-%m-%dT%H:%M:%SZ
'
,
time
.
gmtime
(
last_date
))
t
.
setTag
(
'
history
'
,
{
'
maxstanzas
'
:
gajim
.
config
.
get
(
'
muc_restore_lines
'
),
'
since
'
:
last_date
})
if
password
:
t
.
setTagData
(
'
password
'
,
password
)
self
.
connection
.
send
(
p
)
...
...
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